Updating Entry Does Not Update Element
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
Description
I created a single with a URI of firm/philosopy (mispelled). When i noticed the page wasn't found and realized it was because of the misspelling i updated the single uri to firm/philosophy. The update update the craft_sections table but did not update the craft_elements_sites table so the old (misspelled) uri remained and i was unable to update it via the CP.
Steps to reproduce
- Create a single
- Change the URI of the single
- Craft will not route to the updated URI
Additional info
- Craft version: Craft CMS 3.0.0-beta.30
- PHP version: 7.0.15
- Database driver & version: MySQL 5.5.57
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with a single whose URI changes, then inspect how the update affects the craft_sections and craft_elements_sites tables. Trace the entry update path and compare the old and new URI values. Done means changing a single’s URI updates the related element-site record and routing uses the new URI.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100