Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It appears that "Administer Content" permission is required for the clone option to appear for a user on admin/content.
However, this is due to the way the form structure is changed when there is 1 or 0 operations available to the user
Comment | File | Size | Author |
---|---|---|---|
#14 | 1903272-14.patch | 1.93 KB | pwolanin |
#12 | 1903272-12.patch | 2.28 KB | pwolanin |
#11 | 1903272-11.patch | 1.65 KB | pwolanin |
#9 | node_clone-fix-permission-1903272-9.patch | 1.26 KB | tyler.frankenstein |
#4 | node_clone-fix-permission-1903272-7.x-1.0-rc1.patch | 1.43 KB | Matthieu Bilbille |
Comments
Comment #1
Matthieu Bilbille CreditAttribution: Matthieu Bilbille commentedI faced the same issue.
In fact it is not a permission problem, but a bad alteration of the node admin form. Check this patch, in my case it solved the problem.
Comment #2
aaronpinero CreditAttribution: aaronpinero commentedNot sure I entirely understand what's happening in this patch. However, I did try applying it and it failed. Not sure that the code in the first part of the patch matches anything in the .module file.
Comment #3
Matthieu Bilbille CreditAttribution: Matthieu Bilbille commentedOups! My mistake, I made my diff from the dev version...
I will fix this once I get home :)
Comment #4
Matthieu Bilbille CreditAttribution: Matthieu Bilbille commentedTry this one
Comment #5
aaronpinero CreditAttribution: aaronpinero commentedThat may have done the trick. I need to test a little more, but many thanks to you kind sir.
Comment #6
intrafusionCan confirm this is working correctly for me.
Comment #7
kenorb CreditAttribution: kenorb commentedRelated: #1762106: Invalid arguments supplied for foreach()
Comment #8
NancyDruThe
'query' => $destination,
and the}
(a couple lines down) have trailing white space.I also question the ampersand in
foreach ($form['admin']['nodes'][$index] as $nid => &$row)
.Comment #9
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedI've re-rolled this patch with @NancyDru's suggestions. However, with or without this patch on my site, users with the "Clone any node" and/or "Clone own node" permission are able to successfully clone nodes. I'll leave it to the Node Clone team to decide this patches' fate.
Comment #10
pwolanin CreditAttribution: pwolanin commentedseems to be duplicating some of the code already there (which was supposed to have fixed the problem in the 1st place)
Comment #11
pwolanin CreditAttribution: pwolanin commentedThat patch also didn't handle the case of zero visible operations.
How about this?
Comment #12
pwolanin CreditAttribution: pwolanin commentedAlso - looks like the destination query string should be omitted when using the save-edit mode.
Comment #13
pwolanin CreditAttribution: pwolanin commentedComment #14
pwolanin CreditAttribution: pwolanin commentedremove bogus debug code
Comment #15
pwolanin CreditAttribution: pwolanin commentedcommitted