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

ps_facetedsearch - When an attribute value is deleted, it is still displayed even after rebuilding the index #35331

Closed
2 tasks done
florine2623 opened this issue Feb 12, 2024 · 2 comments
Labels
Bug Type: Bug Fixed Resolution: issue closed because fixed

Comments

@florine2623
Copy link
Contributor

Prerequisites

Describe the bug and add attachments

After deleting an attribute and rebuilding the index from the faceted search module, I still see the deleted item on the FO. I tried clearing the cache from ps_facetedsearch module, from PS and from the browser. The item is still displayed and I can select it. I will see the page loading without result.

Screen.Recording.2024-02-12.at.11.32.16.mov

Related to PrestaShop/ps_facetedsearch#979

Expected behavior

The deleted attribute should not be displayed in the FO

Steps to reproduce

  1. Create an attribute group + some attribute values
  2. Create a combination product with these attributes
  3. Go to faceted_search module > Enable attribute group > Build attributes and features indexed
  4. Go to FO > Filter by the attribute
  5. Go to BO > Delete one attribute value > Configure faceted_search > Rebuild the index
  6. Go to FO > See that the attribute value is still displayed and the page loads with no filter ❌

PrestaShop version(s) where the bug happened

8.0.5

PHP version(s) where the bug happened

8.1

If your bug is related to a module, specify its name and its version

ps_facetedsearch

Your company or customer's name goes here (if applicable).

No response

@jolelievre
Copy link
Contributor

Hi @florine2623

I tested the bug and I think it's actually a "feature" even if it's poorly made Actually you also need to click on Clear the cache and then everything is ok I only tested on develop branch but I’m almost sure it’s the same thing with older versions because it's the principle of the module that stores some data in DB to optimize the FO display I guess

That's why even if the attribute is removed it can still display its name, even though it's not in the core tables anymore, but in the module cache in DB there are some generated JSON content that still contains the old attribute data, you need to clear the cache to update them

@florine2623
Copy link
Contributor Author

(info for @PrestaShop/qa-functional )

Tested with 8.0.x, 8.1.x, works OK ✅

On develop, the following bug is fixed by PrestaShop/ps_facetedsearch#983 :

Screen.Recording.2024-02-14.at.10.03.16.mov

@florine2623 florine2623 added the Fixed Resolution: issue closed because fixed label Feb 19, 2024
@AureRita AureRita removed the New New issue not yet processed by QA label Feb 19, 2024
@MatShir MatShir closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Type: Bug Fixed Resolution: issue closed because fixed
Projects
None yet
Development

No branches or pull requests

4 participants