I have tried adding the code mentioned in the BlogHolder.php file as a function and it does not work for me. David, can you elaborate on what you mean put it in the BlogHolder_Controller class - I tried that also and didn't work. Can you provide the code please?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
- Previous 10 entries
- 1
- Page 22(current)
Hi Steve
in blog/code/BlogHolder.php look for
class BlogHolder_Controller extends Page_Controller {
Under that the static $allowed_actions is defined. The you should see the init() function. Below that function I pasted
//fix the broken archives
function checkAccessAction($action) {
if (preg_match('/[0-9]{4}/', $action))
{
return true;
}
return parent::checkAccessAction($action);
}
Which worked for me.
I think that is working. I just realized that I only just wrote a few posts this month, so it is showing only this month - I think it worked, thank you!
Edit: I changed the date on one and tested, worked perfectly!
good stuff :)
I have the latest trunk and the same problem.
Here's a temporary solution that doesn't involve hacking the module code. Put this line in mysite/_config.php:
BlogHolder_Controller::$allowed_actions[] = '2009';
... and for any other years in which blog posts were made.
Hopefully, by 2010 this issue will have been solved!
Does anyone know if this is the same as the issue we have here: http://silverstripe.org/blog-module-forum/show/269745#post269745 ?
We've tried various fixes and no success so far.
It could be. If it is, the above code should fix it...
- Previous 10 entries
- 1
- Page 22(current)