Skip to content

[Area: Frontend] Unrelated cache tags added to X-Magento-Tags header on CMS pages #37823

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

Open
1 of 5 tasks
ananth-iyer opened this issue Aug 1, 2023 · 14 comments
Open
1 of 5 tasks
Labels
Area: Content Component: Cache Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reported on 2.4.6-p1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@ananth-iyer
Copy link
Member

ananth-iyer commented Aug 1, 2023

Preconditions and environment

  • Magento version - 2.4.6-p1
  • PHP - 8.1
  • Built-in FPC Cache

Steps to reproduce

  1. Open Homepage and note down value of X-Magento-Tags in response header.
  2. Open any CMS page like About US, Privacy Policy or new page
  3. You will notice the same values in X-Magento-Tags whether there are no products, categories, or static blocks. It will show same value on any CMS pages.
  4. For example:
    cat_c,cat_c_38,cat_c_20,cat_c_11,cat_c_3,cat_c_9,cat_c_37,store,cms_b,cms_b_1,cms_b_footer_links_block,cms_b_14,cms_b_home-page-block,cms_p_2,cat_p,FPC

Expected result

As per my understanding, there should be no cat_c and cat_p in X-Magento-Tags header when there are no products & categories on that page.
When visiting any CMS page that it should not contain cat_c and cat_p when it is does not have category and products. It should add page id, static block id related tags only.
It affacts the website overall performance and Google ranking.

Actual result

When visiting any CMS page that it contains cat_c and cat_p in X-Magento-Tags header when CMS page does not have category and products.

Additional information

Additionally, it also causes full FPC cleanup when the product or category is saved and its ID is added in the X-Magento-Tags header and present in CMS pages.
I assume the navigation menu is conflicting with the cache tags.
For reference:
cat_c_{category_id} - cat_c_1
cat_p_{product_id} - cat_p_1
cms_b_{static_block_id} - cms_b_1

01 08 2023_16 46 05_REC

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
@m2-assistant
Copy link

m2-assistant bot commented Aug 1, 2023

Hi @ananth-iyer. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@m2-assistant
Copy link

m2-assistant bot commented Aug 1, 2023

Hi @engcom-Dash. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

    1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    1. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
    1. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

@engcom-Dash engcom-Dash added the Reported on 2.4.6-p1 Indicates original Magento version for the Issue report. label Aug 1, 2023
@ananth-iyer ananth-iyer changed the title Unrelated cache tags added to X-Magento-Tags header on CMS pages [Area: Frontend] Unrelated cache tags added to X-Magento-Tags header on CMS pages Aug 1, 2023
@engcom-Dash
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-deployment-service
Copy link

Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.

@magento-deployment-service
Copy link

@ananth-iyer
Copy link
Member Author

ananth-iyer commented Aug 1, 2023

@engcom-Dash X-Magento-Tags and X-Magento-Cache-Debug headers still not showing even in developer mode. I assume the web server is removing the headers.

@chandresh-rana
Copy link

Hello,

I got the same issue on Magento 2.4.6-p1. When I update any product from admin panel or through rest API the whole Magento cache is being refresh.

For testing, Simply create a custom CMS page and update any product like stock or sku then check that created CMS page will be added to X-Magento-Cache-Debug: MISS. Even I don't touch that cms page or not added that page link to anywhere in Magento.

@engcom-Dash
Copy link
Contributor

Hi @ananth-iyer

Verified the issue in 2.4-develop instance and the issue is reproducible, Hence we are confirming the issue.
Kindly refer the below screenshots:

Screenshot 2023-08-03 at 6 24 45 PM Screenshot 2023-08-03 at 6 21 22 PM

When we visiting CMS page that it contains cat_c and cat_p in X-Magento-Tags header as per the actual result.

Thanks.

@engcom-Dash engcom-Dash added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Content Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: ready for confirmation labels Aug 3, 2023
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-9258 is successfully created for this GitHub issue.

@m2-assistant
Copy link

m2-assistant bot commented Aug 3, 2023

✅ Confirmed by @engcom-Dash. Thank you for verifying the issue.
Issue Available: @engcom-Dash, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@ananth-iyer
Copy link
Member Author

@engcom-Dash Thank you for taking time and confirming the issue. When can we expect the issue to get resolved? Kindly let us know if there is any quick workaround patch.

@engcom-Hotel engcom-Hotel added the Priority: P3 May be fixed according to the position in the backlog. label Aug 8, 2023
@engcom-Hotel engcom-Hotel moved this to Ready for Development in Low Priority Backlog Aug 19, 2024
@engcom-Bravo
Copy link
Contributor

Hi @ananth-iyer,

Thanks for your reporting and collaboration.

We have tried to reproduce the issue in Latest 2.4-develop instance and the issue is still reproducible.Kindly refer the screenshots.

Image

When visiting any CMS page that it contains cat_c and cat_p in X-Magento-Tags header when CMS page does not have category and products.

Hence Confirming the issue.

Thanks.

@engcom-Bravo engcom-Bravo added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels May 2, 2025
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-9258

@ananth-iyer
Copy link
Member Author

Hi @engcom-Bravo After so many months the issue is reproducible in latest version. Let's hope the issue will get fixed sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Content Component: Cache Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P3 May be fixed according to the position in the backlog. Progress: ready for dev Reported on 2.4.6-p1 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

6 participants