Problem/Motivation
When activating/Installing the "Entity Copy with Reference" extension/module (which is available ) after installing the 'entity_copy_reference 101) module, all main drupal menu at "/admin/structure/" such as Content Types (admin/structure/types) and Comment (admin/structure/comment) , and all the others (block/content/display/...,view) are not accessible . Situation returns to normal when when the 'entity copy reference' is 'removed/uninstalled' from the Extend list.
I am using Drupal 10 PHP 8.1.16 on a standard/shared cpanel hosting account.
I was installing the drupal via ZIP extract install method (not via composer method) on the following directory "/public_html//mysubdomain.com/mysubfolder/"
The drupal web is accessible on the following domain "www.mydomain.com/myfolder/" not from "www.mysubdomain.com"
I have not been performing any 'direct hard coding ' modifications method at all, I've only perform standard drupal install/uninstall composer (via terminal), and install/uninstall via Extend Menu. tehre are other extensions/plugins which I have installed since the fresh install, and most of them are ok, never shows this kind of error.
--
the error message shown in the drupal "admin/reports/dblog/event/312" is as follows:
TypeError: Drupal\entity_copy_reference\EntityCopyReference::isCopyEnabled(): Argument #1 ($node) must be of type Drupal\node\Entity\Node, Drupal\node\Entity\NodeType given, called in /home/commyhos/public_html/mydomain.com/myfolder/modules/contrib/entity_copy_reference/entity_copy_reference.module on line 70 in Drupal\entity_copy_reference\EntityCopyReference->isCopyEnabled() (line 43 of /home/commyhos/public_html/mydomain.com/myfolder/modules/contrib/entity_copy_reference/src/EntityCopyReference.php).
Steps to reproduce
Step 1. Terminal : composer require 'drupal/entity_copy_reference:^1.0'
Step 2. Drupal Menu : INSTALL the extension 'Entity Copy Reference (this part seem to cause error/problem in the main drupal menus (content type/comments /others)
Step 3. try to enter the 'Content Type' or 'Comment' menu (or al menu within the STRUCTURE http://yourdomain.com/admin/structure/ ) ,and it will show a blank white screen page WSOD (White Screen of Death) with 'one line sentence' error message =
"The website encountered an unexpected error. Please try again later."
I've retried the steps a few tiems and the problme still exists
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3347826-3-entity_copy_reference-fix-entity_alter.patch | 1.17 KB | texas-bronius |
Comments
Comment #2
jerrac commentedI have a similar issue, not quite the same error message, and only the people admin view is blocked, but I think it's the same.
Ended up combining my patch for this with an older one for an error I ran into when viewing entities that were copy enabled. So I'm just going to paste it as a code block instead of upload it.
You can drop that as a file in Drupal's root directory/patches, then add something like this to composer's extra section:
Edit: I put the localized_options array on the wrong line... Fixed that. Sheesh.
Comment #3
texas-bronius commentedThank you @jerrac. I am having some kind of issue with local patches, so I will try a file fetch. At the same time, I simplified your patch down to just this issue's original intent (as I understand, your c/p patch here addresses something else you were doing for your environment).
How I tested it:
* Visit
/admin/structure/menuWith the patch: See menu edit.
Without the patch: WSOD and the following in
Comment #4
texas-bronius commentedPlease consider the patch in #3 based on @jerrace #2 above. It applies locally and fixes the problem exhibited for me.
Note: I could not could not could not initially get either of these patches to load until I deleted `patches.lock.json` and tried again. Phew!
Comment #5
dmcosta commentedThank you for the patches. Patch #3 used in new release 1.0.2.