Jump to content

1.4 Stable (1.4.0.17) CMS URL rewrites are incorrect? possible bug


Recommended Posts

Just upgraded from 1.4.0.5 to 1.4.0.17 stable and came upon this possible bug:

Friendly URLS are active. I have 3 languages installed. Assume I view a CMS page in English (default lang). The other flags in the languages block on top link to this CMS page in different languages. BUT, the links there are NOT the friendly ones.

I solved this by making the changing the following code in CMSController.php:

public function preProcess()
{
   if ($id_cms = (int)Tools::getValue('id_cms'))
       $this->cms = new CMS($id_cms, self::$cookie->id_lang); 
   if ($id_cms_category = (int)Tools::getValue('id_cms_category'))
       $this->cms_category = new CMSCategory($id_cms_category, self::$cookie->id_lang);



to this:

public function preProcess()
{
   if ($id_cms_val = (int)Tools::getValue('id_cms'))
   {
       $id_cms = $id_cms_val;
       $this->cms = new CMS($id_cms, self::$cookie->id_lang);
   } 
   if ($id_cms_category_val = (int)Tools::getValue('id_cms_category'))
   {
       $id_cms_category = $id_cms_category_val;
       $this->cms_category = new CMSCategory($id_cms_category, self::$cookie->id_lang);
   }



Can anyone confirm I'm not making a total mess of things?

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...