ph_simpleblog



  • 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/public_html/modules/ph_simpleblog/controllers/front/single.php on line 33

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

    @mdekker could you solve this?



  • mdekker could you solve this?

    I’m not mdekker, but I think one should ask module authors to fix their modules.



  • I doubt he will fix it, since he doesn’t even upgrade his module anymore…



  • These errors will affect other PS modules that deal with URLs aswell, @mdekker.



  • I ran into this issue myself.

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

    In: modules/ph_simpleblog/ph_simpleblog.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 🙂



  • Thanks Sir! That solved my problem…


 

Looks like your connection to thirty bees forum was lost, please wait while we try to reconnect.