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

CMS Pages used in settings are not excluded from sitemap #38666

Closed
5 tasks
thomas-kl1 opened this issue Apr 26, 2024 · 9 comments · May be fixed by #38667
Closed
5 tasks

CMS Pages used in settings are not excluded from sitemap #38666

thomas-kl1 opened this issue Apr 26, 2024 · 9 comments · May be fixed by #38667
Assignees
Labels
Issue: needs update Additional information is require, waiting for response Issue: ready for confirmation Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report.

Comments

@thomas-kl1
Copy link
Member

thomas-kl1 commented Apr 26, 2024

Preconditions and environment

  • Magento 2.4

The error is because the settings use the following source: Magento\Cms\Model\Config\Source\Page which pipes the page id to the identifier. E.g:
Capture d’écran, le 2024-04-26 à 11 31 08

So when \Magento\Cms\Model\GetUtilityPageIdentifiers::execute is called:
the scoped values (if not the default one provided in vendor/magento/module-cms/etc/config.xml is going to have this format : |<page_id>

Which is incompatible with the query format here (used to generate the cms page sitemap):

  • \Magento\Sitemap\Model\ResourceModel\Cms\Page::getCollection

More specifically:

)->where(
    'main_table.identifier NOT IN (?)',
    $this->getUtilityPageIdentifiers->execute()
)

It won't prevent to return the given pages because the format does not match!

Steps to reproduce

  • 2 websites (a & b) with a specific home page configured for each (e.g: home-a for global, and home-b for website b)
  • Create a sitemap for each websites
  • Generate the sitemap from the admin grid

Expected result

The sitemap A does not have the home-a url
The sitemap B does not have the home-b url

Actual result

The sitemap A does not have the home-a url (OK)
The sitemap B does have the home-b url (NOK)

Additional information

Also true for:

  • cms_home_page
  • cms_no_route
  • cms_no_cookies

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”.
Copy link

m2-assistant bot commented Apr 26, 2024

Hi @thomas-kl1. 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.

Copy link

m2-assistant bot commented Apr 26, 2024

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-Delta engcom-Delta added the Reported on 2.4.x Indicates original Magento version for the Issue report. label Apr 26, 2024
Copy link

m2-assistant bot commented Apr 30, 2024

Hi @engcom-Delta. 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).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. 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!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Apr 30, 2024
@engcom-Delta
Copy link
Contributor

Hi @thomas-kl1 ,

Verified the issue on 2.4-develop and it is not reproducible.

Steps to reproduce:-

1.Create 2 websites (a & b) with a specific home page configured for each (e.g: home-a for global, and home-b for website
b)
2.Create a sitemap for each websites
3.Generate the sitemap from the admin grid

Please refer the attached screenshot and let us if we are missing something.

Screenshot 2024-04-30 at 6 28 25 PM Screenshot 2024-04-30 at 6 29 05 PM Screenshot 2024-04-30 at 6 29 16 PM Screenshot 2024-04-30 at 6 29 34 PM Screenshot 2024-04-30 at 6 29 45 PM Screenshot 2024-04-30 at 6 29 50 PM

@engcom-Delta engcom-Delta added the Issue: needs update Additional information is require, waiting for response label Apr 30, 2024
@m2-community-project m2-community-project bot added this to Pull Request In Progress in High Priority Backlog Apr 30, 2024
@m2-community-project m2-community-project bot removed this from Ready for Confirmation in Issue Confirmation and Triage Board Apr 30, 2024
@thomas-kl1
Copy link
Member Author

@magento give me 2.4-develop instance

Copy link

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

@thomas-kl1
Copy link
Member Author

Seems it has been fixed: #35001
Commit: 0ce7599

Copy link

@engcom-Delta
Copy link
Contributor

Hi @thomas-kl1 ,

Based on your comment #38666 (comment) , we are closing this issue.Feel free to raise a fresh ticket or reopen this ticket if you face the same issue again.

Thanks,

@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Done in High Priority Backlog Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: needs update Additional information is require, waiting for response Issue: ready for confirmation Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants