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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Matthieu Bilbille’s picture

I 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.

aaronpinero’s picture

Not 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.

Matthieu Bilbille’s picture

Oups! My mistake, I made my diff from the dev version...
I will fix this once I get home :)

Matthieu Bilbille’s picture

aaronpinero’s picture

That may have done the trick. I need to test a little more, but many thanks to you kind sir.

intrafusion’s picture

Status: Active » Reviewed & tested by the community

Can confirm this is working correctly for me.

kenorb’s picture

NancyDru’s picture

Status: Reviewed & tested by the community » Needs work

The '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).

tyler.frankenstein’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
1.26 KB

I'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.

pwolanin’s picture

Status: Needs review » Needs work

seems to be duplicating some of the code already there (which was supposed to have fixed the problem in the 1st place)

pwolanin’s picture

Status: Needs work » Needs review
FileSize
1.65 KB

That patch also didn't handle the case of zero visible operations.

How about this?

pwolanin’s picture

FileSize
2.28 KB

Also - looks like the destination query string should be omitted when using the save-edit mode.

pwolanin’s picture

Title: Allow cloning without "Administer Content" permission » Fix clone operation on admin/content for users without "Administer Content" permission
Issue summary: View changes
pwolanin’s picture

FileSize
1.93 KB

remove bogus debug code

pwolanin’s picture

Status: Needs review » Fixed

committed

  • pwolanin committed 0bb48ea on 7.x-1.x
    Issue #1903272 by pwolanin, Matthieu Bilbille, tyler.frankenstein: Fix...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.