cms
cms copied to clipboard
[3.7.47]: Entry `uri` contains weird "_temp_{junk}/nice-entry-title" URL after having duplicated content
What happened?
Description
The CMS had the following entries in a structure:
- Example page
- Second page of guide
For the purposes of testing having more content the "Example page" entry was duplicated (children included).
The root page was duplicated whilst viewing the "English" version of the site. The issue occurs when querying entries from the "Welsh" version of the site.
When doing a GraphQL query I now see the following on the duplicated entry:
"uri": "__temp_hkjoqrkmfbuqlfjkytcrnricnzkdyiotqhoz-2/second-page-of-guide-2",
This is a multi-site setup where the entries are set to "Save entries to all sites enabled for this section". The "Entry URI Format" for both the English and Welsh sites is {parent.uri}/{slug}
Steps to reproduce
Inside a two-language site:
- Construct simple page hierarchy.
- Duplicate root page (and children) in "English" site.
- Run GraphQL query with
$site
set to name of "Welsh" site:query Test($site: [String]) { entries(site: $site) { uri } }
Expected behavior
Duplicate entry should have a more appropriate uri
.
Actual behavior
Queried uri
has some sort of temporary identifier.
Craft CMS version
3.7.47
PHP version
7.2.34
Operating system and version
Linux 5.10.25-linuxkit
Database type and version
MySQL 8.0.25
Image driver and version
Imagick 3.4.4 (ImageMagick 7.0.10-48)
Installed plugins and versions
- Google Cloud Storage 1.4.1
- Redactor 2.10.10
- Super Table 2.7.2
- Webhooks 2.4.1
I’m unable to reproduce this. Are you seeing it consistently? Are you waiting for the “Updating element slugs and URIs” queue job to complete before running the GraphQL query? (That job is responsible for setting all of the descendant entry URIs, when a parent entry is saved.)
There are no queued jobs in the CMS and this issue is persistent (in the sense, the query always returns this). Is there a way to force the "Updating element slugs and URIs" job to occur again?
Yep, just resave the parent entry and that job should get added again.
Resaving did resolve the immediate issue although not sure what the original cause would have been.
Alright, well I’m going to go ahead and close this for now since we can’t figure out how to reproduce. We can revisit if more details come to light though.