Home > Best practices, Drupal, English > Drupal 7 problem: Content edit tab doesn’t appear for user editor

Drupal 7 problem: Content edit tab doesn’t appear for user editor

In Drupal 7, there is a *very tricky* problem you might fall upon at some point. We did and because it’s not *really* a Drupal bug (although it could be considered as a usability bug), it’s worth writing down.

The problem is simple: one admin (Joe) and two editors (Sam and Max) edit a website. They all create their own content of the type “artist”.

They all have permissions to “Create artist”, “Edit own artist”, “Edit all artist” and “Delete artist”.

Also, the “artist” content type has a text body which can use the “Pure text” format, the “Filtered HTML” format and the “Full HTML”. However (and this is part of the problem), editors can only use “Pure text” or “Filtered HTML” (through the WYSIWYG module)

  • Sam (editor) can create an artist and edit it
  • Max (editor) can create an artist and edit it
  • Joe (admin) can create an artist and edit it
  • Sam can edit the artist that Max has created
  • Max can edit the artist that Sam has created
  • Joe can edit the artist that Sam or Max have created but…
  • Sam and Max cannot edit the artist that Joe created. That is, they can see the content, but for some obscure reason, the edit tabs do not appear!
  • “WHY OH WHY???” …I hear you say. The answer required (the first time) a little bit of investigation

The answer is in the WYSIWYG module’s configuration. Because Joe (admin) created his artist using Full HTML (because HE CAN but also because that’s the default for the admin role), and because the editors CANNOT use the Full HTML style. When this happens, Drupal detects it and automatically prevents the edition of the content by the editor users…

The fixes are easy:

  • update the editor role to give him Full HTML permissions
  • update the content (as admin) to use Filtered HTML
  • update your node_revisions table to change the edit type to another number

 

  1. July 5, 2012 at 8:25 pm

    Thanks!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: