Skip to content

PrestaShop 9 front runtime fixes: Tools::redirectLink + product-page related posts - #275

Merged
CySSoO merged 1 commit into
TeamEver:masterfrom
nicohery:fix/ps9-front-runtime-fixes
Aug 27, 2026
Merged

CySSoO merged 1 commit into
TeamEver:masterfrom
nicohery:fix/ps9-front-runtime-fixes

Conversation

@nicohery

@nicohery nicohery commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Context

Two more PrestaShop 9 runtime breakages found while running v7.0.3 on PS 9.1.5 (follow-up of #273 / #274):

  1. Tools::redirectLink() no longer exists in PS 9 — AbstractFrontController::canonicalRedirection() fatals as soon as a post/category URL is requested with a wrong slug (the canonical redirect path). Replaced by Tools::redirect().
  2. hookDisplayFooterProduct() calls EverPsBlogPost::getPostsByProduct() and EverPsBlogCategory::getAllCategories(), two classes that no longer exist in the module — the "related posts" block on product pages can never render (it only survives because EVERBLOG_RELATED_POST is unset by default; enabling it fatals). Rewritten to query ever_blog_post_product directly, in the same shape as getStarredPostsForHome(), and to reuse getFrontLocalizedCategories().

(The PrestaShop\PrestaShop\Core\Product\ProductListingPresenter import that also fatals on PS 9 in v7.0.3 is already handled on master by LegacyProductListingPresenterAdapter — not included here.)

Tests

PS 9.1.5 / PHP 8.4: wrong-slug post URL → 301 to the canonical URL; product page renders the related posts block with EVERBLOG_RELATED_POST = 1. No behaviour change otherwise.

…ListingPresenter namespace, product-page related posts
@nicohery nicohery changed the title PrestaShop 9 front runtime fixes: Tools::redirectLink, ProductListingPresenter namespace, product-page related posts PrestaShop 9 front runtime fixes: Tools::redirectLink + product-page related posts Aug 27, 2026
@CySSoO
CySSoO merged commit 0074aed into TeamEver:master Aug 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants