Prestashop: Modules positions not works for pages with dash in url

Created on 8 Feb 2019  路  9Comments  路  Source: PrestaShop/PrestaShop

It seems like module position stopped work for me in Prestahop 1.7.5, but only for pages with 2 or more words in url, like "new-products".

To Reproduce
Install clean Prestashop 1.7.5
Go to Design - Positions - take for example Newsletter subscription module in FooterBefore hook - click Edit - in list we can select "newproducts" - save.
Now go to new products page - module still there: https://gyazo.com/8bf46714cda5fa09b0c65f8928c982a6

Back to list of exceptions for this module, and type "new-products" (with dash):
https://gyazo.com/b1637c5c9065ceeeae9783be0fd3af76

Save, go to page - now module is hidden, as it should be.
https://gyazo.com/17ba7e660155e2215c34d6ff7e0d972f

By the way, it works for pages with one word urls, like "index" or "contact".

Also I have another 1.7.4.3, and it works normal with all pages.

1.7.5.0 1.7.6.0 Bug Duplicate FO Minor PR available Positions Regression

Most helpful comment

@marionf @khouloudbelguith

this should fix it:
https://github.com/PrestaShop/PrestaShop/pull/12547

All 9 comments

Hi @rtvt,

Thanks for your report.
I did not manage to reproduce the issue with PS1.7.5.0.
I attached a video record.
https://drive.google.com/file/d/1StVeYA7X5iMWr9bNbBV3-Bn2WTCFtvlU/view
Thanks to check & feedback.

Hi @khouloudbelguith
Thank you for answer, but I think you understand me not correct.

I tried to type "new-products" by hands to show, that it works, but default "newproducts" not works. Also you checked homepage on video, but we test new products page.

So what's the problem:

1) You have clean 1.7.5.0
2) Newsletter subscription module shows on every page in FooterBefore hook by default.
3) You want to hide this module on New products page.
4) So for it you go to Design - Positions - displayFooterBefore - Newsletter subscription - Edit - Select "newproducts" from the list of existing pages - Save.
5) Now you go to Front office - go to New products page (for example by using default link to new products in the footer) - and you can see that module still visible.

@rtvt, thanks for these clarifications.
I manage to reproduce the issue with PS1.7.5.0.
When I go to Front office => New products page and the module still visible.
I tried with the machine shuffle (PS1.7.5.0 => NOK.
With PS1.7.4.4 => OK.
I鈥檒l add this to the debug roadmap so that it鈥檚 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!
Thanks!

I tried with featured products on display home for index page and it's well not displayed
I tried with blocknewsletter on displayfooterbefore for index page and it's well not displayed

I tried with blocksearch on displpaytop for the following pages and it's still displayed :

  • new product
  • my account
  • order slip
  • best sales
  • prices drop
  • order detail

Hi @marionf,

I tried with blocksearch on the "displayTop" hook for the "New products", "Prices drop", "Best Sales" page, it is displayed => NOK, I tried with cart page => it is not displayed => OK.
I think that the problem related to the pages with dash in URL(prices-drop, new-products, best-sales)
Thanks!

@marionf @khouloudbelguith

this should fix it:
https://github.com/PrestaShop/PrestaShop/pull/12547

@kpodemski Thanks! It works

Duplicate of #19226

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matks picture matks  路  53Comments

krasnycz picture krasnycz  路  52Comments

gorkij77 picture gorkij77  路  58Comments

bm-services picture bm-services  路  91Comments

ChineseNorris picture ChineseNorris  路  64Comments