craftcms / craftcms/cms

Updating Entry Does Not Update Element

Open
#2,092 6 comments 0 reactions 0 assignees View on GitHub

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
  1. Create a single
  2. Change the URI of the single
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.