ph_simpleblog


  • Global Moderator

    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?


  • Global Moderator

    mdekker could you solve this?

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


  • Global Moderator

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


  • administrators

    It’s a rewrite regex collission. It’s not a good idea to just name it rewrite in a module, because it is already used by products, categories, etc.

    Maybe we could fix it from thirty bees’ side. Gotta research that. In the meanwhile I can give you a version that’s been made to work with tb.



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


  • administrators

    Yes, time to search for something better.


  • administrators

    @moy2010 said in ph_simpleblog:

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

    Do you have some actual names of modules that are known to be incompatible, btw?



  • 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 :)


  • Global Moderator

    Thanks Sir! That solved my problem…


  • administrators

    A fix has been just been pushed to the repo and will be available with 1.0.2


Log in to reply
 

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