craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.28k stars 635 forks source link

[5.x]: Wrong entry types after upgrade from Craft CMS 4 to 5 #15740

Closed urbantrout closed 1 month ago

urbantrout commented 1 month ago

What happened?

After upgrading to Craft CMS 5 some (not all) entries show the wrong entry type in the CP.

Here is what the section looks like if I edit it:

Editing section 'Homepage' with one entry type selected called 'Homepage'

And this is what I get when I edit the homepage entry:

Sidebar of entry showing wrong entry type

Here Team - Standard is selected~ and I cannot change it to Homepage.

When I try to save the entry with Team - Standard selected I get the following exception:

Team - Standard entries are no longer allowed in this section. Please choose a different entry type.

When I try to save the entry with Homepage selected I get the following exception:

Invalid Argument – [yii\base\InvalidArgumentException](https://www.yiiframework.com/doc-2.0/yii-base-invalidargumentexception.html) Entry Type is no longer allowed in this section.

Craft CMS version

5.4.4

PHP version

8.2.5

Operating system and version

Linux 6.10.4-linuxkit

Database type and version

MariaDB 10.11.8

Image driver and version

No response

Installed plugins and versions

brandonkelly commented 1 month ago

Any chance you can send your Craft 4 database backup and current (Craft 5) Composer files over to support@craftcms.com?

urbantrout commented 1 month ago

Sure. I just sent the files.

urbantrout commented 1 month ago

I am so sorry! I custom module messed up the entry types after saving entries… So this is totally on me 😢

brandonkelly commented 1 month ago

Hah, no worries. Glad you got it sorted!