In EntityTypeRepository.php line 115: The Drupal\config_pages\Entity\ConfigPagesType class does not correspond to an entity type.
After upgrading from version 2.19 to 2.20, when I try to clean the cache "drush cr" that error is returned in the console.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | d10run.png | 83.53 KB | shumer |
Issue fork config_pages-3577600
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
altercat commentedComment #3
shumer commentedHey @altercat I don't see such message. Can you please share Drupal core version + PHP ( maybe screenshot with the issue) ?
Comment #4
shumer commentedThe
#[ConfigEntityType]and#[ContentEntityType]PHP attributes were introduced in **Drupal 10.2**. In version 2.20, the module migrated entity type definitions from annotations(@ConfigEntityType/@ContentEntityTypein docblocks) to PHP attributes.On Drupal 10.0 / 10.1:
Drupal\Core\Entity\Attribute\ConfigEntityTypedoes not exist - PHP 8 silently ignores unknown attributes .@ConfigEntityTypeannotation was removed from the docblock during the migration.config_pages_type, which causes the error.That's what comes into my mind now, but would be nice if you can confirm my theory.
Comment #5
kovalevm commentedI have the same problem.
And it makes Fatal Error.
Drupal core 10.6.5
PHP 8.4.11
Comment #6
altercat commentedHi @shumer, thanks for the answer. I forgot to mention these details:
Drupal 10.6.5
PHP 8.3.30
Comment #7
joegl commentedI am seeing a similar issue, possibly related. In the entity_type_alter hook below it's reporting $entity_type is NULL after upgrading to 2.20.
We are also on Drupal 10 (10.5.8). It seems there might be an issue with discoverability of the entity type on Drupal 10?
Comment #8
joegl commentedPHP Attribute definition support was added in Drupal 10.2, but only for specific plugins: https://www.drupal.org/node/3395575
Support for plugins added in 10.2 is listed here: https://www.drupal.org/node/3229001
Support for plugins added in 11.1 is listed here: https://www.drupal.org/node/3505422
The
ConfigEntityTypeandContentEntityTypesupport was not added until 11.1.The 2.20 release claims to support drupal Versions ^8 || ^9 || ^10 || ^11. This release should probably be unpublished and republished with only support for ^11.1, or the previous annotation should be added back with the addition of PHP attributes (have both) if it's going to retain support for older versions.
Comment #9
shumer commentedComment #10
joegl commentedI have edited my previous comment with better info. The support for PHP attributes is confusing because only certain plugins were supported in specific releases. The
ConfigEntityTypeandContentEntityTypesupport was not added until 11.1.Comment #12
joegl commentedI saw the merge request go up and quickly patched our install with the diff: https://git.drupalcode.org/project/config_pages/-/merge_requests/65.diff . It appears to be working correctly now. Apologies if this is premature.
Comment #13
shumer commentedRight, it was too aggressive to remove old annotations. Unfortunately I've missed to run the tests on D10 core.

We can add those annotation back and support both, while D10 still alive.
Comment #15
joegl commentedAwesome, thanks for the swift action shumer
Comment #16
shumer commentedThanks all for the report and the details - this helped pinpoint the issue quickly!
Fixed in 8.x-2.21 by restoring annotations alongside attributes in all 7 affected files. On Drupal 11 the attribute takes priority; on older versions annotation discovery picks up the fallback.
I'll try to make releases more frequently so fundamental things like this don't slip through unnoticed. :)
Comment #17
kovalevm commentedI still have this issue:
Comment #18
joegl commentedI have not yet had an opportunity to test the new version (2.21) however it does appear the changes made in the merge request did not make it into the 2.21 version:
https://git.drupalcode.org/project/config_pages/-/blob/8.x-2.21/src/Enti...
https://git.drupalcode.org/project/config_pages/-/compare/8.x-2.20...8.x...
Comment #19
shumer commentedOMG, looks like I've created tag on wrong commit :(
Comment #20
shumer commentedhttps://git.drupalcode.org/project/config_pages/-/compare/8.x-2.20...8.x...
Now it should be good.
Haste makes waste. Lesson learned I hope.
@kovalevm can you please try?
Comment #21
kovalevm commentedThank you very much, everything is fine now!
Comment #22
shumer commentedGreat news. Hope we can close this issue then!
Comment #23
shumer commentedComment #25
shumer commentedComment #26
altercat commentedMany thanks, shumer! It works great now!