wakabayashi Posted May 26, 2017 Posted May 26, 2017 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?
Traumflug Posted May 26, 2017 Posted May 26, 2017 mdekker could you solve this? I'm not mdekker, but I think one should ask module authors to fix their modules.
wakabayashi Posted May 26, 2017 Author Posted May 26, 2017 I doubt he will fix it, since he doesn't even upgrade his module anymore...
moy2010 Posted May 26, 2017 Posted May 26, 2017 These errors will affect other PS modules that deal with URLs aswell, @mdekker.
braffas Posted May 30, 2017 Posted May 30, 2017 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 :)
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now