Make WordPress Core

Opened 5 years ago

Last modified 4 years ago

#46257 new defect (bug)

Deleting a page can break the permalink of other pages if it had media uploaded to it

Reported by: mallorydxw's profile mallorydxw Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.0.3
Component: Permalinks Keywords:
Focuses: Cc:


Trashing and deleting a page can cause the permalink of another page to break the next time that page is edited. It is not obvious to the user that this will happen. It is also not obvious how to fix this, because when an image is not "Uploaded To" a particular page, it is not possible to edit the permalink.

  1. Start with vanilla WP installation using twentynineteen and no plugins
  2. Add New Page > Title: "Cat"
  3. Add Block > Image > Upload > Pick the image > Open
  4. Publish... > Publish
  5. Media > Click on the image that was just uploaded, see that it says "Uploaded To Cat"
  6. Edit more details > Edit (permalink) > Set to "dog" > OK > Update
  7. The permalink should now be http://localhost/cat/dog/
  8. Add New Page > Title: "Dog" > Publish... > Publish
  9. See that "Page address" is http://localhost/dog/
  10. Visit /dog/ to confirm the page is displayed
  11. Pages > Trash (Cat) > Trash (at the top of the page) > Empty Trash
  12. Pages > Dog > Make a change, such as adding text to the existing block > Update
  13. Document > Permalink > Notice that URL is now dog-2
  14. Visit /dog/ to see that instead of the page, the image is instead displayed

Change History (1)

#1 @markparnell
4 years ago

  • Component changed from General to Permalinks
Note: See TracTickets for help on using tickets.