Problem/Motivation
A fix was recently introduced here: https://www.drupal.org/project/content_entity_clone/issues/3513797 that fixed a TypeError. This introduced additional issues.
Content that has blocks stored in their layout no longer clone the blocks in the layout.
When attempting to configure entity clone for a content type, a PHP error is displayed.
[Wed Jun 17 11:00:16.461146 2026] [proxy_fcgi:error] [pid 421] [client ::1:46964] AH01071: Got error 'PHP message: PHP Fatal error: Cannot use Drupal\\block_content\\BlockContentInterface as BlockContentInterface because the name is already in use in /home/jfurnas/sites/test-site/web/modules/contrib/content_entity_clone/src/Plugin/content_entity_clone/FieldProcessor/CopyLayout.php on line 7', referer: https://test-site.localhost/admin/config/content_entity_clone
Steps to reproduce
Install the latest version of the module.
Set up a layout that has blocks in it.
Create a piece of content with a block, and then clone it. The cloned content does not retain the block or layout.
Visit the Entity Cloning: Overview page (/admin/config/content_entity_clone) and click 'Edit' next to a content type. Observe a 500 error matching the error above.
Comments
Comment #2
jfurnas commentedComment #3
jfurnas commentedComment #4
jfurnas commentedHmm, there may have been an issue with my composer cache that was causing this. After coming back to this a bit later this seems to be resolved now. Going to close the issue.