The "pencil" edit icon shown in the tutorial video is not appearing in the Content Moderation Info block. Without this, is is quite confusing while looking through revisions, as the "Edit" tab is only visible when looking at the live version.

Comments

eugenmayer’s picture

Is the image missing or the button?

flutedrumr’s picture

The button itself. There is no HTML for it at all in the rendered page, just the view and revision buttons.

eugenmayer’s picture

This means you have no permission to edit it or ar a revision is in review / approve state. Please read the documentations for that.

flutedrumr’s picture

I'm logging in as user/1, so permissions should not be an issue, but I created a new role and new user with proper permissions and still have the same issue: the Drupal "Edit" tab is showing and working, but the edit pencil button is not. This happens irregardless of what state the revision is in.

I just tried a clean install of Drupal 6.17 and Content Moderation (both 1.4 and the current github version), same issue. If you want to see for yourself:

URL: http://wiki.thewoodlandsumc.net/
User: admin
Pass: password

eugenmayer’s picture

looked at your installation, very odd. Will have a look at this, thank you for your investigation

span’s picture

I'm also experiencing this issue. Looking into it.

span’s picture

It seems the edit link was never being output in the 'content_moderation_info_block.tpl.php'.

I added it like this:

$edit_live = l($edit_icon, $links['edit_live'],array(
  'html' => true, 
  'attributes' => array( 
    'title' => t('Edit revision.') 
    ) 
  ));

and then printed it out like this:

  print $view_current_link.$edit_state.$compare_live.$delete_current.$edit_live; // Added $edit_live button

Hopefully this points you in the right direction and I'm sure you want to implement it in some other way since this most likely causes problems although the pencil is showing and working :P

n_nelson350’s picture

I have enabled the 'edit' option in URL: http://wiki.thewoodlandsumc.net/ . Its working now........

eugenmayer’s picture

Status: Active » Needs work

Thank you span, i will look into this

flutedrumr’s picture

With the edit's from #7 made to the latest github version, the edit button does appear, but I noticed the following oddities:
- If it's the initial revision of a node, the edit button links to the front page instead of the node/edit.
- The edit button doesn't show when viewing the live version of the page. (Because the viewing block only shows on pending revisions.) This isn't as big of a deal as you can click the Drupal edit tab, but for usability should be there.

eugenmayer’s picture

iam currently a bit busy on the wysiwyg imageupload module and cant work to much on this module. Could you guys make a patch and review?

broon’s picture

The tabs (Edit, Revisions, Delete) which normally show for nodes disappear on viewing revisions which are not live. Also when editing a node and saving it, the user gets redirected to /node/%node/latest_revision. Within the page callback the active menu is set to /node/%node/revisions/%/view which would be the starting point to "reactivate" the tabs.

My customer wants to be able to get back to the edit page or the revisions list when viewing the latest_revision page. Hence, I added to entries in the menu_hook:

$items["node/%node/revisions/%/view/revisions"] = array(
    'title' => 'Revisions',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'content_moderation_redirect',
    'page arguments' => array(1,5),
    'access callback' => '_node_revision_access',
    'access arguments' => array(1),
  );
	
	$items["node/%node/revisions/%/view/edit"] = array(
    'title' => 'Edit',
    'type' => MENU_LOCAL_TASK,
    'page callback' => '_content_moderation_redirect',
    'page arguments' => array(1,5),
    'access callback' => 'node_access',
    'access arguments' => array('update', 1),
  );

An additional function for the callback handles the redirect:

/*
 * Page callback to re-create node tabs
 */
function _content_moderation_redirect($node, $page) {
  drupal_goto('node/'.$node->nid.'/'.$page);
}

After flushing caches both tabs appear on any /node/%node/latest_revision page.

@Eugen: Just like you, I'm pretty loaded with work. As I did some more changes to content_moderation, I currently can't provide a patch because my version is modified already. I'll hope to get it all straightened out and to be able to make a patch against 1.4.

Regards,
Paul

eugenmayer’s picture

Hey Paul,

thanks for the investigation. Iam fine with waiting, i know your busy so time will tell.

Hopefully your modifications can be introduced in content_moderation, you might use github ( you have access ) to use branches. That way we can use the same bases and have a better workflow with patches / merges, while you still can do you urgent fixes / extensions.

eugenmayer’s picture

Status: Needs work » Fixed

One issue was related to the block cache which has been fixed for 1.5 http://drupal.org/node/863376.

The other patch is rather a new functionality i would probably like to stuff into a submodule. The core module gets to big already, i plan to extract more API to be able to use submodules more broadly.

Thanks for the work!

Status: Fixed » Closed (fixed)

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