Jump to content
thirty bees forum

braffas

Members
  • Posts

    30
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by braffas

  1. 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 :)
  2. I totally agree. It was just a quick fix (I'm only using 1 lang so it worked for me). But you are totally right about the can of worms :) I think the routes are better stored with no language dependency. It should be a pretty easy fix.
  3. I just looked at my notes. I'm pretty sure the config is still stored in configuration_lang without the patch (AdminMetaController.php ~ 711 - 715), but the default values are shown because 'type' => 'text' are not handled by generateOptions in HelperOptions.php which fills the form. (textLang is handled)
  4. The problem for me was that my changes did not show in the admin section, but they were applied. The problem seems to be with the method below in AdminMetaController /** * @param string $routeId * @param string $title * * @since 1.0.0 */ public function addFieldRoute($routeId, $title) { $keywords = array(); foreach (Dispatcher::getInstance()->default_routes[$routeId]['keywords'] as $keyword => $data) { $keywords[] = ((isset($data['param'])) ? '<span class="red">'.$keyword.'*</span>' : $keyword); } $this->fields_options['routes']['fields']['PS_ROUTE_'.$routeId] = array( 'title' => $title, 'desc' => sprintf($this->l('Keywords: %s'), implode(', ', $keywords)), 'validation' => 'isString', 'type' => 'text', //<----- that needs to be 'textLang' 'size' => 70, 'defaultValue' => Dispatcher::getInstance()->default_routes[$routeId]['rule'], ); }
  5. Hello First of all: Thanks for doing this! I really like the code changes in have seen in TB so far :) There seems to be a problem with saving SEO url routes (nothing is saved in configuration). The default values from the dispatcher class is used when the form is reloaded. I have upgradede a PS shop (1.6.1.11) to TB (1.0.1). I have tried with no overrides and only native modules.
×
×
  • Create New...