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

Changing order of Pages is not reflesting in the footer #16134

Open
Peterr-K opened this issue Oct 25, 2019 · 10 comments
Open

Changing order of Pages is not reflesting in the footer #16134

Peterr-K opened this issue Oct 25, 2019 · 10 comments
Labels
Feature Type: New Feature FO Category: Front Office Link widget Label: Which BO under menu is concerned Linklist Module: ps_linklist Module Module Must-have Kanban prioritization: issue must be included in next version Needs Specs Status: issue needs to be specified Pages Label: Which BO under menu is concerned Waiting for PM Status: action required, waiting for product feedback Workaround available Solution: issue can be worked around

Comments

@Peterr-K
Copy link

Peterr-K commented Oct 25, 2019

When I change order of the pages in Backend -> Design -> Pages, it is not changed on front end - footer via Link Widget module.

Numbers in "Position" column in the backend is changed, but again not reflesting in Link Widget. Maybe by mistake Link Widget is sorting modules by "ID of the page" and not by "Position ID" ?

Steps to reproduce the issue:

You need to check that all pages are checked in the link block
image

  1. Go to the BO => Design => Pages => change position of some pages.
  2. Check the position of these in the BO => Design => link widget => OK
  3. check the FO => Those pages are not well sorted

We can solve this problem by following these steps:

  1. Change the position of pages
    image

  2. Go to the BO => Design => Link widget page => position => OK

  3. check the FO => NOK => Issue

  4. Uncheck all pages
    image

  5. Save

  6. Edit the block again & check all pages
    image

  7. Save

  8. check the FO => OK
    image

@khouloudbelguith
Copy link
Contributor

Hi @jannyba,

In your case, this issue occurs in the FO?
I tried with PS1.7.6.1. & the Link Widget module v3.0.4.
In the BO => After changing the page's position, in the link widget configuration, pages are well displayed.
I attached a screen record
https://drive.google.com/file/d/1W-bwecKZroteXa-9fsdU7Qvj9nS9oMQp/view
Thanks to check & feedback.

@khouloudbelguith khouloudbelguith added Link widget Label: Which BO under menu is concerned NMI Status: issue needs more information Pages Label: Which BO under menu is concerned Bug Type: Bug labels Oct 28, 2019
@Peterr-K
Copy link
Author

Peterr-K commented Oct 29, 2019

@khouloudbelguith Thanks for your time,
what you showed is ok, re-ordered pages are re-ordered in the Link Widget module. But you have disabled all these pages in the module. If you will enable them, in the FO they are not respecting the changed order.
Please check these screenshots and try if you have the same behaviour:
https://www.prestashop.com/forums/topic/1005446-pages-reordering-is-not-reflecting-in-link-widget-module/?tab=comments#comment-3165478

@khouloudbelguith
Copy link
Contributor

@jannyba, I manage to reproduce the issue with PS1.7.5.2 & PS1.7.6.1 & the ps_linklist v3.0.4.
Steps to reproduce the issue:

You need to check that all pages are checked in the link block
image

  1. Go to the BO => Design => Pages => change position of some pages.
  2. Check the position of these in the BO => Design => link widget => OK
  3. check the FO => Those pages are not well sorted

We can solve this problem by following these steps:

  1. Change the position of pages
    image

  2. Go to the BO => Design => Link widget page => position => OK

  3. check the FO => NOK => Issue

  4. Uncheck all pages
    image

  5. Save

  6. Edit the block again & check all pages
    image

  7. Save

  8. check the FO => OK
    image

PS the link widget v2.1.6 doesn't work correctly.
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!
Thanks!

@khouloudbelguith khouloudbelguith added 1.7.5.2 Affects versions 1.7.6.1 Affects versions FO Category: Front Office Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification Ready Status: Issue is ready to be worked on Workaround available Solution: issue can be worked around and removed NMI Status: issue needs more information labels Oct 30, 2019
@khouloudbelguith khouloudbelguith added this to To do in Native modules integration via automation Oct 30, 2019
@khouloudbelguith
Copy link
Contributor

Ping @jolelievre

@colinegin colinegin moved this from To do to To be reviewed in Native modules integration Dec 30, 2019
@NeOMakinG
Copy link

Order should be handled in backend, can't do something there... What do you think @jolelievre @matks ?

@NeOMakinG NeOMakinG removed their assignment Jan 3, 2020
@Peterr-K
Copy link
Author

Order should be handled in backend, can't do something there... What do you think @jolelievre @matks ?
thank you

@HartLarsson
Copy link

HartLarsson commented Apr 26, 2020

image
Order works but links are shown in FO not in order
PS 1.7.6.4

@marionf marionf moved this from To be reviewed to To do in Native modules integration May 4, 2020
@marionf marionf added the Must-have Kanban prioritization: issue must be included in next version label Oct 28, 2020
@matks
Copy link
Contributor

matks commented Mar 17, 2022

I explored a bit this issue tonight.

The content of a block inside "Link list module" is stored inside MySQL table ps_link_block.

If you add the 5 first Pages to the block to the default configuration, the storage will contain that:

{"cms":["1","2","3","4","5"],"product":[false],"static":["contact","sitemap","stores"],"category":[false]}

So the problem is that, when you save from the "BO > Design > Link list" page the configuration of the block, it stores the order of these pages like above. Then it displays them following this sort. The sorting of these blocks is being hard written inside the database, any change you perform on "BO > Design > Pages" is ignored.

So what this mean

What cannot be done

A scenario where you go to "BO > Design > Link list" page and you add 3 Pages to a block, they have position 2, 6 and 9.
Then you go to "BO > Design > Pages" and you modify the Pages positions to 5, 6 and 9.
Then automatically this re-orders the Pages displayed in the footer.

This scenario cannot happen unless a big change in the module data model is done.

What can be done

A new feature could be added to Link list module, it would allow to sort the items added to a block. It would allow BO user to choose the order to use for this list:

Capture d’écran 2022-03-17 à 21 52 24

This order would be stored inside MySQL to be displayed exactly as the BO user wanted it.

@MatShir following this exploration I suggest to re-qualify this issue.

AFAIK this is not a bug but a limitation of the current system.

I can suggest to transform this issue into an improvement

  • if we want to improve it following my suggestion to allow BO user to sort items manually
  • if we want to have the "automatic acknowledgement of Pages positions" feature we need to modify the data model

Or if it does not make sense for the project to follow this path I suggest to close this issue.

But this is not a bug. A bug is a behavior that is not working as expected. From the data model I see, the behavior reported here was never planned or expected.

@kpodemski
Copy link
Contributor

@matks

It's exactly what I was thinking: add a sortable plugin to the list of pages so we can easily change via drag&drop.

If you have 🟢 from PM I can do it :-)

@matks matks added Waiting for PM Status: action required, waiting for product feedback and removed Ready Status: Issue is ready to be worked on labels Mar 18, 2022
@matks matks added Improvement Type: Improvement and removed Bug Type: Bug labels Mar 18, 2022
@matks matks moved this from To do to Need more specs/Blocked in Native modules integration Mar 18, 2022
@matks
Copy link
Contributor

matks commented Mar 18, 2022

Adding the waiting for PM

@hibatallahAouadni hibatallahAouadni added Bug Type: Bug Verified The issue has been reproduced Linklist Module: ps_linklist Module Module Feature Type: New Feature Needs Specs Status: issue needs to be specified and removed Improvement Type: Improvement 1.7.6.1 Affects versions Bug Type: Bug Minor Severity: minor bug > https://build.prestashop.com/news/severity-classification 1.7.5.2 Affects versions Verified The issue has been reproduced labels Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Type: New Feature FO Category: Front Office Link widget Label: Which BO under menu is concerned Linklist Module: ps_linklist Module Module Must-have Kanban prioritization: issue must be included in next version Needs Specs Status: issue needs to be specified Pages Label: Which BO under menu is concerned Waiting for PM Status: action required, waiting for product feedback Workaround available Solution: issue can be worked around
Projects
Native modules integration
  
Need more specs/Blocked
Development

No branches or pull requests

8 participants