Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude: Home category ID = 2 (404) from sitemap #12

Closed
wants to merge 1 commit into from
Closed

Exclude: Home category ID = 2 (404) from sitemap #12

wants to merge 1 commit into from

Conversation

moncef-essid
Copy link

Exclude: Home category ID = 2 (404) from sitemap

Exclude: Home category ID = 2 (404) from sitemap
@gRoussac
Copy link

gRoussac commented Feb 2, 2015

Hi,

Thank you for your PR.
Home category can be another id than 2.

Please open your PRs on dev branch for modules, not master branch.

Regards

@gRoussac gRoussac closed this Feb 2, 2015
@Philippe-B-
Copy link

Hi.
I have the same problem with version 3.2.1 of the module on Prestashop 1.6.
On this version of Prestashop the "home" category returns a 404 error.
By default there is:

category name id_category id_parent is_root_category
root 1 0 0
home 2 1 1

As you can see the "home" category is actually the root category as materialized by the "is_root_category" field.
Its fields values make it match the following conditions that don't test the "is_root_category" field value:

WHERE c.id_category >= '.intval($id_category).' AND c.active = 1 AND c.id_category != 1 AND c.id_parent > 0 AND c.id_category > 0 AND cs.id_shop = '.(int)$this->context->shop->id.' ORDER BY c.id_category ASC'

The "home" category is then included in the sitemap file and as a result the file is rejected by Google after it gets the 404 error on the "home" category page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants