Details
-
Bug
-
Resolution: Fixed
-
High
-
5.3.3, 5.4-dev
Description
If you try to remove a class with a nonexistent datatype, eZ will crash with a fatal error.
This problably happens because "* ezpublish_legacy/kernel/classes/ezcontentclass.php#815*", removableInformation function
// Check class attributes foreach ( $this->fetchAttributes() as $attribute ) { $dataType = $attribute->dataType(); if ( !$dataType->isClassAttributeRemovable( $attribute ) ) { $info = $dataType->classAttributeRemovableInformation( $attribute, $includeAll ); $result['list'][] = $info; if ( !$includeAll ) return $result; } }
It shouldn't be an impediment to remove a class with a nonexistent datatype.
Steps to Reproduce
1. Create a custom datatype. A simple way to do this is to install eZComments package. eZComments will change the article class and add its own custom datatype.
2. Duplicate article class and name it "article_1".
3. Remove the "article_1" class and confirm there will be no problem.
4. Delete the ezcomments extension
5. Try to remove article class and you will see a fatal error since the the comments datatype does not exist.