-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Magento hierarchy url does not update when identifier of CMS page changes #39482
Comments
Hi @reense. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Delta. Thank you for working on this issue.
|
Preconditions and environment
Steps to reproduce
magento_versionscms_hierarchy_node
to see if therequest_url
of your CMS page has been updatedExpected result
The magento_versionscms_hierarchy_node row has been updated with the correct request_url
Actual result
The update does not happen.
Additional information
Issue Summary:
In the
cms_page_save_after
observer, the VersionsCms module checks whether the page identifier has been changed. If it has, the module attempts to find and update corresponding entries in themagento_versionscms_hierarchy_node
table. This update logic is handled in the methodMagento\VersionsCms\Model\ResourceModel\Hierarchy\Node::updateRequestUrlsForTreeByXpath
.Problem Details:
The issue lies in the following query within the method:
Here, Magento is looking for
xpath
values that either end with a slash or match the exact value appended with a slash. However, thexpath
column in themagento_versionscms_hierarchy_node
table does not store values that end with a slash. As a result, this query always returns zero results, and the expected row update never occurs. Removing the slash in the query above results in Magento correctly updating the rows.Links
This problem has already been discussed in this issue, however no solution was provided in that ticket.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: