Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.x]: Invalid section ID after moving entries #15949

Closed
ryanleichty opened this issue Oct 23, 2024 · 8 comments
Closed

[5.x]: Invalid section ID after moving entries #15949

ryanleichty opened this issue Oct 23, 2024 · 8 comments
Assignees
Labels

Comments

@ryanleichty
Copy link

What happened?

Description

We moved all of our entries from one section to a new section. When we delete the old section which is empty, we get the Invalid section ID error when trying to navigate to the new section. It's completely inaccessible.

Steps to reproduce

  1. Create two sections that each support a different entry type (and populate them with entries)
  2. Update one of the sections to support both entry types
  3. Move all entries to the section that supports both entry types
  4. Delete the empty section

Expected behavior

I would expect nothing to happen to the new section or it's entries when deleting the old section that doesn't have any entries.

Actual behavior

The new section is completely inaccessible and returns the Invalid section ID error.

Craft CMS version

5.4.7.1

PHP version

8.2.24

Operating system and version

Linux 6.5.11-linuxkit

Database type and version

MySQL 8.0.37

Image driver and version

Imagick 3.7.0 (ImageMagick 7.1.1-32)

Installed plugins and versions

  • Alt text Generator 5.1.1
  • Amazon S3 2.2.1
  • Asset Usage 4.1.3
  • CKEditor 4.2.0
  • Colour Swatches 5.0.3
  • Donkeytail 5.0.0-beta.1
  • Empty Coalesce 5.0.0
  • Hyper 2.1.1
  • Image Hotspots 3.0.1
  • Neo 5.2.9
  • Retcon 3.2.0
  • Retour 5.0.3
  • Template Selector 5.0.1
@ryanleichty
Copy link
Author

It appears to not be removing references to the old sections (the example below is from user group permissions):

Image

@i-just
Copy link
Contributor

i-just commented Oct 23, 2024

Hi, thanks for getting in touch! I’m not able to replicate this. Could you please share the stack trace that leads to the Invalid section ID error?

@ryanleichty
Copy link
Author

Let me know if this is what you're looking for: web-2024-10-23.log

@ryanleichty
Copy link
Author

Doing some more digging around and I noticed that this entry shows the old section in the URL while showing the new section in the breadcrumbs

useCases being the old section, pages being the new section where it was moved to.

Image

@ryanleichty
Copy link
Author

Ok, I figured this out. The entry in the above screenshot had a draft that must've carried over when editing it on a previous branch. Discarding the draft and resaving the entry resolved the issue

@i-just
Copy link
Contributor

i-just commented Oct 24, 2024

Thanks for the additional info! I can replicate this when the entry you’re moving has a provisional draft. I’ll make some improvements!

@ryanleichty ryanleichty reopened this Oct 30, 2024
@ryanleichty
Copy link
Author

@i-just Ok, we're still running into this and narrowed it down to provisional drafts as well. Let us know when you have a fix!

@brandonkelly
Copy link
Member

Craft 5.4.10 is out with a fix for this, for entry moves going forward. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants