Jump to content
thirty bees forum


Recommended Posts

This is the blog module from kpodemksi. I have some issues to make it work.

It seems to be caused by the rewrite system. Unfortunately this module now even breaks other frontControllers.

For example I get: Fatal error: Call to a member function isAccessGranted() on null in /home/genzo/publichtml/modules/phsimpleblog/controllers/front/single.php on line 33

But when commenting this function out, I get a 404 error.

@mdekker could you solve this?

Link to comment
Share on other sites

I ran into this issue myself.

It's pretty easy to fix this rewrite error. You need to change 2 lines:

In: modules/phsimpleblog/phsimpleblog.php -> hookModuleRoutes

        'module-ph_simpleblog-single' => array(
            'controller' => 'single',
            'rule' =>       $blog_slug.'/{sb_category}/{rewrite}',
            'keywords' => array(
                'sb_category' =>       array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'sb_category'),
                'rewrite' =>        array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'sb_rewrite'), //<--- change 'rewrite' to 'sb_rewrite'
               //'rewrite' =>        array('regexp' => '[_a-zA-Z0-9-\pL]*', 'param' => 'rewrite'),
            'params' => array(
                'fc' => 'module',
                'module' => 'ph_simpleblog',

In: modules/ph_simpleblog/controllers/front/single.php -> init

    $simpleblog_post_rewrite = Tools::getValue('sb_rewrite', 0); //<--- change 'rewrite' to 'sb_rewrite'
    //$simpleblog_post_rewrite = Tools::getValue('rewrite', 0);

Thats it :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...