Skip to content

Conversation

@intoeetive
Copy link
Contributor

Resolved #4399 where Structure URI for cloned entry was built differently from cloned URL Title

Note: this is not really a bug as such, as we still have unique value and editor would still probably want to change it... But it's nice when both are built using same pattern

@intoeetive intoeetive added the Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on. label May 5, 2025
@intoeetive intoeetive added this to the 7.x milestone May 5, 2025
@intoeetive intoeetive modified the milestones: 7.x, 7.5.12 May 14, 2025
@TomJaeger TomJaeger modified the milestones: 7.5.12, 7.5.13 May 14, 2025
@TomJaeger TomJaeger requested a review from robinsowell June 4, 2025 20:49
Copy link
Contributor

@robinsowell robinsowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - the uri for structure was ending up without the copy on it- so basically a duplicate (which I thought wouldn't validate, but did and that might be another issue).

Basically- if I dump $_POST['structure__uri'] = $values['uri'] = $value; and die right before it returns- I get:

"copy-/a-photograph-for-the-ages"

because we're putting that leading slash on the value before we add 'copy' to it. Structure doesn't allow slashes inside the uri so I guess the whole copy bit gets dropped on save and you end up with just the original 'a-photograph-for-the-ages'.

@TomJaeger TomJaeger modified the milestones: 7.5.13, 7.5.14 Jun 16, 2025
@intoeetive intoeetive requested a review from robinsowell July 5, 2025 16:53
@TomJaeger
Copy link
Contributor

@robinsowell any chance you can test this again?

@robinsowell
Copy link
Contributor

Hrm. So definitely solved the first issue from testing and everything seem ok except for 1 minor inconsistency which ... I don't think is a problem, but is an inconsistency.

I create an entry, structure uri is blog-child-dos-uri and it is set as the child of another page. I clone that entry, cloned entry has structure uri of blog-child-dos-uri-1 and it has the proper parent selected.

See how it's blog-child-dos-uri-1? If I do the same thing but it's NOT a child, original uri is blog-top-uno-uri and copy uri is copy-blog-top-uno-uri.

In other words- always the clone url_title and structure/page uri is created with copy-whatever. In the case of a subpage, it's not doing that.

Again- not sure whether this is a problem or not.

@TomJaeger your thoughts?

Copy link
Contributor

@robinsowell robinsowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not requesting change per se, but I'd like someone else to weigh in on inconsistency noted in my last comment.

@TomJaeger
Copy link
Contributor

I would say we need to change this so it matches the URL title regardless of where it is in the structure tree

@TomJaeger TomJaeger modified the milestones: 7.5.14, 7.5.15 Aug 6, 2025
@TomJaeger TomJaeger modified the milestones: 7.5.15, 7.5.16 Aug 18, 2025
@intoeetive intoeetive requested a review from robinsowell August 22, 2025 17:36
@intoeetive
Copy link
Contributor Author

The fix for this is now in place

robinsowell
robinsowell previously approved these changes Aug 29, 2025
Copy link
Contributor

@robinsowell robinsowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed for me!

I did discover this bug while testing: #4959 BUT that happens without these changes as well, so different issue.

@TomJaeger TomJaeger modified the milestones: 7.5.16, 7.5.17 Sep 10, 2025
@TomJaeger TomJaeger removed this from the 7.5.17 milestone Oct 24, 2025
@TomJaeger TomJaeger added this to the 7.5.18 milestone Oct 24, 2025
@TomJaeger
Copy link
Contributor

Added a code review request from either @matthewjohns0n and @bryannielsen Im wondering if we need to change some of the logic in the sql.structure file code updates.

@TomJaeger TomJaeger merged commit 55ed14b into 7.dev Dec 2, 2025
24 checks passed
@TomJaeger TomJaeger deleted the bug/7.x/structure-uri-cloned branch December 2, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug: Accepted Bug has been confirmed, is reproducible, and ready to work on.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

When cloning an entry using Structure, the url_title & the structure_url are given different values.

4 participants