Jump to content

Category 404 not found


pinci

Recommended Posts

Hi people have such a problem after importing products by emagic one store manager. When i create a new category so it does not show when i turn it on, in category menu, but when I open a link that reports 404 Not Found.I noticed in database that left n = 0 and n = right 0 . Any ideas?  web is www.workie.sk thx.

Link to comment
Share on other sites

Try creating a file like regenerate.php in your website's root, then enter the following:

<?php

require(dirname(__FILE__).'/config/config.inc.php');
echo 'Regenerating tree...';
Category::regenerateEntireNtree();
echo 'done';

You can then go to http://www.yoursite.com/regenerate.php to regenerate the ntree values. If you see "Regenerating tree...done", then it worked. You can then delete regenerate.php.

  • Like 1
Link to comment
Share on other sites

Try creating a file like regenerate.php in your website's root, then enter the following:

<?php

require(dirname(__FILE__).'/config/config.inc.php');
echo 'Regenerating tree...';
Category::regenerateEntireNtree();
echo 'done';

You can then go to http://www.yoursite.com/regenerate.php to regenerate the ntree values. If you see "Regenerating tree...done", then it worked. You can then delete regenerate.php.

Thx, Regenerating tree...done  but does not work . Still n values are 0 

Link to comment
Share on other sites

Strange. It works fine on my PrestaShop v1.6.1.11 test site. Perhaps there's code preventing the function working? Check whether override/classes/Category.php exists and the regenerateEntireNtree() function hasn't been overridden.

 

Are your level_depth values 0 too? If so, you can run the following to regenerate the level depths too:

<?php

require(dirname(__FILE__).'/config/config.inc.php');
echo 'Regenerating tree...';
Category::regenerateEntireNtree();
echo 'done<br />';
echo 'Recalculating level depths...';
$category = new Category((int)Configuration::get('PS_ROOT_CATEGORY'));
$category->recalculateLevelDepth($category->id);
echo 'done';
Link to comment
Share on other sites

 

Strange. It works fine on my PrestaShop v1.6.1.11 test site. Perhaps there's code preventing the function working? Check whether override/classes/Category.php exists and the regenerateEntireNtree() function hasn't been overridden.

 

Are your level_depth values 0 too? If so, you can run the following to regenerate the level depths too:

<?php

require(dirname(__FILE__).'/config/config.inc.php');
echo 'Regenerating tree...';
Category::regenerateEntireNtree();
echo 'done<br />';
echo 'Recalculating level depths...';
$category = new Category((int)Configuration::get('PS_ROOT_CATEGORY'));
$category->recalculateLevelDepth($category->id);
echo 'done';

Thx for your response. 

Regenerating tree...done

Recalculating level depths...done

 

but still 0 . And in override/classes/Category.php category.php does not exist , is it problem? 

Link to comment
Share on other sites

Hi people have such a problem after importing products by emagic one store manager. When i create a new category so it does not show when i turn it on, in category menu, but when I open a link that reports 404 Not Found.I noticed in database that left n = 0 and n = right 0 . Any ideas?  web is www.workie.sk thx.

 

 

 
Hello
Have you imported category tree with Store Manager or categories with products? 
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...