Jump to content

CMS categories bug in 1.5.3 ?


Recommended Posts

There's something unfresh about CMS too. I had put all the details like privacy, delivery, shipping, payment, returning goods, refunds etc... under one category "Terms and Conditions", and with the right configuration of the module "C M S Block" it worked fine for 1.5.2

 

In 1.5.3, the CMS categories all return "This page does not exist."

 

- I uninstalled and reinstalled the module, the same shit happens.

- I created a new category with some subcategories, and configured them right. The newly category shows up in the left nav bar, but clicking on it also shows the same error message.

 

As there's no clear error message, I have a hard time finding out what's up here.

 

Yet another bug? :-(

Link to comment
Share on other sites

No, I just put all the subcategories plain in the "left side" menu, as a workaround.

I haven't looked for a template that should display the content yet. Maybe the problem is that a template for cms categories is missing. I'm not good enoug at it to edit something that's missing. ;-) The data is there, but no page, so this might be a clue.

 

It also does not display the content of the CMS category page, so, if customers are supposed to see the general conditions to round up an order, they get an empty page. :-(

Link to comment
Share on other sites

Have you tried regenerating your .htaccess file, go to preferences, SEO & URLs, uncheck friendly URLs and Canonical URls and save re-check and save again this should rewrite the .htaccess file.

In my 1.5.3.1 fresh install CMS works just fine, was yours an upgrade or fresh install.

Link to comment
Share on other sites

My case is exactly like intimi's one.

 

Updated from 1.5.2 to 1.5.3.1 and CMS category's page cann't be found.

I have a custom template.

The url generated is something like domain.com/content/category/N-strings where N is the ID of CMS category.

 

Thank-you.

Link to comment
Share on other sites

I have the same problem: Upgrade from 1.5.2 to 1.5.3. No Sub category CMS page is displayed in any CMS category. THe URL is correct, the page breadcrumbs in the header are correct. Only instead of sub-categories list the page says "This page does not exist.".

Regenerating the .htaccess did not resolve the problem.

 

 

Have you tried regenerating your .htaccess file, go to preferences, SEO & URLs, uncheck friendly URLs and Canonical URls and save re-check and save again this should rewrite the .htaccess file.

In my 1.5.3.1 fresh install CMS works just fine, was yours an upgrade or fresh install.

Edited by AppleEater (see edit history)
Link to comment
Share on other sites

+1

 

Same issue as everyone. Same symptoms. I also update from 1.5.2 to 1.5.3.1 successfully. This is the only anomaly I detected so far.

I bought a custom template and if I switch to default it will works. My support did a fresh install with 1.5.3.1 and appply the custom template. In this case no issue.

 

This problem seems to occurs with 2 factors:

1- Upgrade from 1.XXX to 1.5.3.1

2- Use whatever template which isnt the default one.

 

Now I am using a workaround tryin avoid the category and show straight the CMS link but this is clean.

 

Hope someone can have a fix.

 

Cheers

 

Mike

Link to comment
Share on other sites

Have you tried regenerating your .htaccess file, go to preferences, SEO & URLs, uncheck friendly URLs and Canonical URls and save re-check and save again this should rewrite the .htaccess file.

In my 1.5.3.1 fresh install CMS works just fine, was yours an upgrade or fresh install.

Have you tried regenerating your .htaccess file, go to preferences, SEO & URLs, uncheck friendly URLs and Canonical URls and save re-check and save again this should rewrite the .htaccess file.

In my 1.5.3.1 fresh install CMS works just fine, was yours an upgrade or fresh install.

Have you tried regenerating your .htaccess file, go to preferences, SEO & URLs, uncheck friendly URLs and Canonical URls and save re-check and save again this should rewrite the .htaccess file.

In my 1.5.3.1 fresh install CMS works just fine, was yours an upgrade or fresh install.

 

This is the one that should do the trick guys.

Link to comment
Share on other sites

Hi guys,

I had the same issue. After updating from 1.5.2 to 1.5.3.1, I got "page not found" error when I clicked to CMS category.

I have replaced file in my custom theme "\themes\default-custom\cms.tpl" by file from prestashop installation "prestashop_1.5.3.1\prestashop\themes\default\cms.tpl"

And it's working like a sharm :)

Link to comment
Share on other sites

Hi, every one.

This is a backward compatibility bug.

If you don't want to replace the cms.tpl of the default theme just modify the file CmsController.php at line 114 like this : add 'category' => $this->cms_category, in the array

 

 

$this->context->smarty->assign(array(
'category' => $this->cms_category,
'cms_category' => $this->cms_category,
'sub_category' => $this->cms_category->getSubCategories($this->context->language->id),
'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id) ),
'path' => ($this->cms_category->id !== 1) ? Tools::getPath($this->cms_category->id, $this->cms_category->name, false, 'CMS') : '',
  ));

  • Like 3
Link to comment
Share on other sites

Hi,

 

From code maintenance and future upgrade, what would be the proper change method:

  1. Modify the <root>/controllers/front/CmsController.php OR
  2. Edit <root>/override/controllers/front/CmsController.php by copying the complete function of public function initContent(), and modify it per your suggestion?

 

Hi, every one.

This is a backward compatibility bug.

If you don't want to replace the cms.tpl of the default theme just modify the file CmsController.php at line 114 like this : add 'category' => $this->cms_category, in the array

 

 

$this->context->smarty->assign(array(
'category' => $this->cms_category,
'cms_category' => $this->cms_category,
'sub_category' => $this->cms_category->getSubCategories($this->context->language->id),
'cms_pages' => CMS::getCMSPages($this->context->language->id, (int)($this->cms_category->id) ),
'path' => ($this->cms_category->id !== 1) ? Tools::getPath($this->cms_category->id, $this->cms_category->name, false, 'CMS') : '',
  ));

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

2. of course! worked create for me :)

Thanks to all.

:rolleyes:

Hi,

 

From code maintenance and future upgrade, what would be the proper change method:

  1. Modify the <root>/controllers/front/CmsController.php OR
  2. Edit <root>/override/controllers/front/CmsController.php by copying the complete function of public function initContent(), and modify it per your suggestion?

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Hi!

 

Ive a problem i cant solve by myself! new categories in my shop www.antonymorato-online.es, like polos, chaquetas,... makes 404 errors, with and without friendly url activated.

 

Ive tried what you say in this post, but the problem is still there,...

 

can someone help me?

Link to comment
Share on other sites

I was having issues with CSV import(error reporting and timeout) version 1.5.1, so I did a fresh install of 1.5.3. I am delighted that my categories and products went in and I got error reporting. My issue is that the products have not been added into categories. Has anybody else experienced this?

 

 

Many thanks

 

 

makavelistein

Link to comment
Share on other sites

I was having issues with CSV import(error reporting and timeout) version 1.5.1, so I did a fresh install of 1.5.3. I am delighted that my categories and products went in and I got error reporting. My issue is that the products have not been added into categories. Has anybody else experienced this?

 

 

Many thanks

 

 

makavelistein

 

 

I think I found the Solution to my issue about products not going into categories

 

http://forge.prestashop.com/browse/PSCFV-6052

 

 

Is Marc Carné Bori's solution valid?

 

Please can someone confirm the quote below?

 

Marc Carné Bori added a comment - 07/Jan/13 3:38 PM - edited

 

Yann,

I modified this from the Prestashop 1.5.3.0 download. Maybe in your code this works correctly. My split method, from the 1.5.3.0 download is as follows:

 

 

 

protected static function split($field)

{

if (empty($field))

return array();

 

$separator = Tools::getValue('multiple_value_separator');

if (is_null($separator) || trim($separator) == '')

$separator = ',';

 

do $uniqid = uniqid(); while (file_exists(_PS_UPLOAD_DIR_.$uniqid));

$tmp_file = file_put_contents(_PS_UPLOAD_DIR_.$uniqid, $field);

$fd = fopen($temp, 'r');

$tab = fgetcsv($fd, MAX_LINE_SIZE, $separator);

fclose($fd);

unlink($tmp_file);

 

if (empty($tab) || (!is_array($tab)))

return array();

return $tab;

}

 

As you can see, in this code the problem is that $temp is never assigned. Maybe this is already corrected in the current revision. I shall clone the repo on github and take a look there to ensure this is solved. Meanwhile, I think it's a good idea to post the current solution to this problem for all these who are stuck with the problem.

Regards,

Marc

 

Many thanks makavelistein

Link to comment
Share on other sites

I think I found the Solution to my issue about products not going into categories

 

http://forge.prestas...owse/PSCFV-6052

 

 

Is Marc Carné Bori's solution valid?

 

Please can someone confirm the quote below?

 

 

 

Many thanks makavelistein

 

 

CAnnot be the solution as it is identical to what I have in controllers/admin/AdminImportController.php

Link to comment
Share on other sites

  • 2 weeks later...

HI

I did what you said, but it did not make any change for me

 

here is my cms block:

screenshot45ux.png

 

NOTHING WORKS like you can see

 

here is what it shows under "preferences" > "CMS":

 

screenshot46ac.png

AS YOU CAN SEE

I HAVE NO CHOICE TO ADD A CATEGORY !!

 

And to manage it under "CMS Block"

 

I CANT EVEN CREATE PAGES!!

And I really need to put some legal informations on the website!

 

please help ASAP

 

Hi,

 

From code maintenance and future upgrade, what would be the proper change method:

  1. Modify the <root>/controllers/front/CmsController.php OR
  2. Edit <root>/override/controllers/front/CmsController.php by copying the complete function of public function initContent(), and modify it per your suggestion?

Link to comment
Share on other sites

  • 6 months later...

-- EDIT --

No did not fix it, now the category get's ignored and every item is shown in every category :-(

 

-- / Edit--

 

 

I think i fixed it by myself.

 

categorycontroller.php, Line 56.

Delete "!$this->category->inShop()"

 

Before: 

if (!Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop())

After 

if (!Validate::isLoadedObject($this->category) || !$this->category->isAssociatedToShop())

Now it works.

But my breadcrumb does not work any more :-(

Edited by p-d-s (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...