Problem/Motivation
Having Quick Node Clone and Group module enabled, I get the following WSOD error on any page:
Error: Class "Drupal\group\Entity\GroupContent" not found in _quick_node_clone_has_clone_permission() (Line 87 in /web/modules/contrib/quick_node_clone/quick_node_clone.module)
#0 /web/modules/contrib/quick_node_clone/src/Controller/QuickNodeCloneNodeAccess.php(29): _quick_node_clone_has_clone_permission()
This is an issue for anyone using a recommended stable release of Group module.
Steps to reproduce
- Install and configure the "Group" module >=2.0
- Install and configure Quick Node Clone 8.x-1.x
- Visit manage content at /admin/content or view any node - e.g., front page
Proposed resolution
Fix references to any deprecated class removed by Group 2.0 or Group 3.0.
Consider deprecating support for older versions of Group that are no longer recommended by the maintainer.
Remaining tasks
Consider implementing hook_requirements() to warn users who have Group 1.0 that support will be (or has been) deprecated.
Update release notes if Group 1.0 support is deprecated.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | quick-node-clone-3352168-groups-v2.patch | 7.88 KB | lpeidro |
Issue fork quick_node_clone-3352168
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
anybodyOkay I think I finally found the reason:
Quick node clone uses:
in the module file.
The use statement:
exists, but Group 3.x doesn't seem to have the
Drupal\group\Entity\GroupContentclass anymore!So this needs an update. I see the following options:
a) Put "Quick Node Clone Group" into a submodule and define concrete version dependencies there
b) Add an if statement to check, if the class exists and thereby change the implementation
c) ...?
Comment #3
lpeidro commentedI try to create a patch that fix the incompatibility with Group v2 and v3.
Comment #4
lpeidro commentedI have push a possible solution where check when is necessary the version of module Group, and depending on the version a certain piece of code is execute with a control structure.
There is a new class, with static methods as helper.
The code has been pushed to the branch "8.x-1.x" of this force, I am not sure if it is ok use that branch.
I upload a patch file to apply the fix to text.
Thanks.
Comment #5
lpeidro commentedI do not know why but the test system has problems to apply the patch. I local and in our CI works and the error "fatal: git apply: bad git-diff - expected /dev/null on line 135" has no sense, so int he line 135 "dev/null" is.
I will try to fix it.
Comment #6
lpeidro commentedI upload a new version of the patch, only remove some metainfo of the patch generated by PhpStorm.
Comment #7
lpeidro commentedComment #8
monaw commentedi got the same error and the quick-node-clone-3352168-groups-v2.patch above fixed my error, thank you so much! i'm using Quick Node Clone 8.x-1.16 and Drupal 9.5.9
Comment #9
sergiurwe're experiencing the same issue, the patch in #6 fixes it. thank you!
Comment #10
chop commentedThis is a problem for anyone using Group v2.x or Group v3.x
Group v1.x is no longer recommended.
An upgrade path exists from Group v1.x to Group v2.x.
New sites will often install Group v3.x.
Consider removing Group v1.x support entirely.
You're in a sticky situation by having this integration code but no real way to tie it to a specific version of Group. The idea of moving this integration code out into a submodule with defined dependencies and version constraints makes some sense.
Comment #11
chop commentedComment #12
mjmorley commentedThis is a duplicate of https://www.drupal.org/project/quick_node_clone/issues/3306677.
Patch #5 from that issue fixes the problem and I think is a nicer solution than the one here in this issue. I think there needs to be some discussion about which approach is better and to close the relevant ticket.
Comment #13
kksandr commentedI think this question should be closed as a duplicate in order to concentrate all efforts on one thing.
extension.list.moduleservice to determine the version of the group module, but this service is still considered internal and it may change (#2940481).