Hello everyone :)
In the head section, canonical link doesn't update when you click on a pagination link (bottom of a category).
Get the real canoncical URL after a user clicks on a pagination link at the bottom of a category.
Steps to reproduce the behavior:
=> Prestashop 1.7.6.3 (fresh installation) with default template (classic), PHP : 7.0, Chrome 80 <=
=> /config/defines.inc.php define('_PS_MODE_DEV_', **FALSE**);
=> PS BO / Advanced Parameters / Performance / Smarty :
Force compilation=> PS BO / Advanced Parameters / Performance / CCC :
NONONO=> PS BO / Advanced Parameters / Performance / Caching : NO
=> Clear cache & delete (if exist) /var/cache prod and dev
Unfortunately it means that googlebot will show up errors and duplicate contents unless, it refreshes the page before indexing, meh, don't thing he will :s
How can we fix this issue or force the update of these Smarty Objects ?
Screenshots
If applicable, add screenshots or screen recordings to help explain your problem.
Hi @Veeckymalt,
Is it the same issue with this issue: https://github.com/PrestaShop/PrestaShop/issues/13737?
Thanks!
Hi @khouloudbelguith ,
Thanks for answering.
I've checked this issue before posting this one, unfortunately it looks like, but it's not.
Clik on page 2 in the pagination area (bottom of category) : the URL in the browser is OK, then in Smarty Debug Console the $listing & $page don't receive updated informations :


If you refresh or manually type in the URL including ?page=2 :


Edit: Even the
Got an idea ? :)
@Veeckymalt, Have you check those issues?
https://github.com/PrestaShop/PrestaShop/issues/17122
https://github.com/PrestaShop/PrestaShop/issues/17516
Thanks!
@khouloudbelguith Yes I just did.
It is not the same issue, BUT related to the same problem => as soon as you click on a pagination link, Smarty objects are not updated.
edit : I've checked websites featured on prestashop.com, the ones using 1.7 have the same issue.
@Veeckymalt, thanks for your feedback.
I followed this step:
Edit prestashop/themes/classic/templates/_partials/head.tpl and add {DEBUG} at the very first line
But I have an exception in the FO

Thanks to check and feedback.
@khouloudbelguith
In config/defines.inc.php you may have define('_PS_MODE_DEV_', true); set it to false then clear cache and empty var/cache/prod & dev if needed ;)
edit : Steps to reproduce in OP updated
@Veeckymalt, thanks for your feedback.
I manage to reproduce the issue with PS1.7.5.2 and PS1.7.6.4.
When I click on the Next or Previous button force the Smarty Objects are not updated.
If I refresh the page =>OK
https://drive.google.com/file/d/1h5mbEuv6bcb28MzN194N3T5lCO0OUNUy/view
Iāll add this to the debug roadmap so that itās fixed. If you have already fixed it on your end or if you think you can do it, please do send us a pull request!
Ping @PrestaShop/prestashop-product-team it is related to the SEO.
Thanks!
@khouloudbelguith Thank you ! This was driving me nuts (the client as well).
Solving this will solve the issues you mentionned before (#17122 #17516 #13737).
I've just noticed it will also fix a problem with the language selector : if you are on a paginated page and change the language through language selector, it brings you back at the root of category.
How will I know when it is fixed ? (new to github)
@Veeckymalt,
How will I know when it is fixed ? (new to github)
it should be closed with the label fixed
@khouloudbelguith Thanks!
Hello. Has anyone found a solution to this error?
When will this bug be fixed? The first time the bug was reported 9 months ago, it's not serious that nobody does anything about it for so long.
Hi @Mreco83 it's actually very serious that nothing is happening about this bug for so long. The reason is simple: the project team resources are limited and we have a huge backlog with more important items to process for now. Until the issues that are more critical have been fixed, the project team will not look at this bug: we have to deal with the important stuff first. We cannot put the cart before the horse.
You will find a thorough explanation about this here https://m.signalvnoise.com/software-has-bugs-this-is-normal/
But here's the upside: you do not have to wait for us to start working on this bug. Because PrestaShop is an open source, community project. If you find that any issue is critical for you, and it's important to have it fixed ASAP, then you can _invest_ into having it done. You can hire a developer to fix it, or if you are a developer yourself, you can try doing it on your own. The most important thing is to share that fix with everyone by submitting a Pull Request -- that's what the open source spirit is all about.
Open source works because everybody invests in it, both the project maintainers and the community. If you want things to speed up, you have the power to make it happen š
Hello. I understand everything, however, this error should be treated as a priority, especially since it has a large impact on the website seo meanwhile, as you can see in the topic https://github.com/PrestaShop/PrestaShop/issues/18402, there are a lot of these errors and no one does anything with them. Isn't it better to finally improve one version of prestashop than keep releasing new ones with duplicate errors?
Hi @Mreco83 I do not sort the backlog, the Product Team does š and they are always open to discussion. You can discuss with them on our Slack channel if you want to highlight that one issue is not considered critical enough š . As for me I trust their work: they provide me a least of bugs/features to process and I go from the top to the bottom.
Isn't it better to finally improve one version of prestashop than keep releasing new ones with duplicate errors?
The answer is in https://m.signalvnoise.com/software-has-bugs-this-is-normal/ too:
"The only reliable, widely used way to ensure impeccable software quality is to write less software that does less stuff, and then spend eons honing that tiny lot. Such an approach, however, is very rarely compatible with commercial success or even programmer motivations (despite what many may claim).
How do you think the market would receive the iPhone 7, if its headline improvement was cutting 1/3 of the features to shrink the code base so itād have fewer bugs? Yeah, I thought so. While people may get excited in concept by āstop the train, we need to fix the tracksā directives for software development, itās not what they would buy.
Well, but then thereās the argument: Apple is so rich, canāt they just hire more developers and testers to fix all the bugs? To paraphrase Frederick Brooks: No. Software development doesnāt work like that. Throwing ever bigger teams at problems usually just makes the problems bigger still.
Bugs are an inevitable byproduct of writing software. Sure, there are all sorts of techniques and potions that promise to decrease how many of the damn critters run about, but only the comically hyperbole pretends that complete eradication is possible."
It's sad to say but @dhh got it absolutely right: what he wrote is exactly what is happening to large scale projects such as Magento, PrestaShop, WordPress or Drupal.
"Large software packages and organizations will have hundreds if not thousands if not tens of thousand of open bugs of various criticality. This is normal. This is expected."
We will continue to ship more bug fixes and more refactoring and more features in each incoming PrestaShop versions and though the reported numbers of bugs will never go down significantly.
Most helpful comment
@khouloudbelguith Thanks!