Hello folks!

Recently I have started using the revisioning module for both a personal site and a work related site. After I tested the Revisioning module on my personal site, I transferred all of the files over to the work site and enabled all the modules and permissions as needed.

At first the original theme we were using was based off the Sky theme. The controls for the modules (* List all revisions | * View | * Edit | * Unpublish this) were not working there to begin with, and I had read that there could have been some issue with how the content is "printed" on the page.tpl.php file. After looking to see if that would fix the issue, I noticed that everything seemed to be in place so I gave up and decided to redo the theme using Zen as a base. (The reason being because Zen is the basis of the theme I use on my personal site, and of course that is where I have not had problems using this module.)

At first, the basic Zen theme showed the controls and I figured I was on the right track. However, after having worked on rebuilding the theme, the controls have disappeared and now I am back at square one.

Looking at firebug, it does not seem to be a CSS issue, as I see no trace of the controls at all in the code view. I have also tried switching back to the original blank Zen theme to compare and the controls are still not there.

It may be wise of me to note as well that there are two Drupal installations in similar setups that are exhibiting this behavior. The original (Live) site and the one I am using to redo our theme using Zen. Both of these installations are having this issue, and both are using copies of the original files on my personal site.

Any help? This module seems to be very useful to us, and we are counting on being able to implement it as soon as possible.

Thanks,
PK

CommentFileSizeAuthor
#11 Capture.PNG1.9 KBpumpkinkid

Comments

rdeboer’s picture

How frustrating!
Reading your story there appear to be 2 major variables varying across your installations: the database (in particular the user permissions) and the theme.

The controls you mention (* List all revisions | * View | * Edit | * Unpublish this) are in fact tabs ("local tasks" in Drupal speak). These tend to be output in the page.tpl.php file of your theme via variables that are usually called $tabs/$tabs2 or $primary_links/$secondary_links. If you accidentally removed lines from your page.tpl.php file containing these variables then you won't see the tabs. However the disappearance would happen on every page that is meant to contain tabs, so this is not likely the case.

Which brings us to the database. A second reason why the tabs may not be there is because somehow the system feels that the logged-in user doesn't have the required permissions to those tabs. In the file revisioning.module you could print out the return value of the function _revision_tasks_menu_access_callback(...). It should be TRUE (1) for the tabs you want displayed. If it is FALSE (void or 0) all the time, then that means that access is denied and then at least we have narrowed it down.
If you don't feel comfortable using a PHP debugger, then here's a code snippet that will reveal the same.

First change the single occurrence of function _revision_tasks_menu_access_callback( to function _revision_tasks_menu_access_callback_internal(
Now add the following lines to the revisioning.module file (somewhere at the bottom is just fine):

function _revision_tasks_menu_access_callback($op, $node) {
  $result = _revision_tasks_menu_access_callback_internal($op, $node);
  drupal_set_message("access to '$op' of $node->title is: '$result'", 'warning', FALSE);
  return $result;
}

Now click around on the pages where you expect to see the tabs and check if you find a lot of access warning messages that end in '' (void) rather than '1'. This indicates that the Revisioning module feels that your system has been configured to deny access to the pages in question.

Naturally, as an administrator (uid=1) you should always see all tabs on all pages! Is this the case?

Hope this gives you some pointers to work with.

Rik

pumpkinkid’s picture

First off, thank you very much for your detailed response! I appreciate the help.

While I have not performed the tests you have asked me to do as of yet (fully intend to do so as soon as I get back to the office) I neglected to mention that the Test site was an exact copy of the original Live site when the tabs did show up originally. As I mentioned before also, the original Zen theme does not display the tabs when it used to on the test site. Because of this, I agree with your thinking that there must be some issue with the database.

As far as permissions go though, our uid=1 username does not get the tabs in question. Could there be corrupted permissions on the database? Or is UID=1 hard coded to allow access?

As I said, Thank you for your support, I will perform the tests you asked for as soon as I walk in to my office.

PK

rdeboer’s picture

Yes user #1 has all privileges. This is hard-coded in Drupal core and does not require the database.
That's why this is so puzzling...

pumpkinkid’s picture

Alright, I will let you know what I find, until then, thanks again.

pumpkinkid’s picture

Well... I took a different approach on the issue this morning.

A co-worker pointed me to this discussion http://drupal.org/node/564318 which has to do with Module Grants and Domain Access which is a module that my personal site and work site do not share. Based on what is discussed there, you seem to have just committed a patch to dev which resolves my issue.

Now, I attempted the patch on the latest stable version of the module_grants module and was unsuccessful. I then attempted using the dev version and added smart tabs since it is now required and updated using the update.php. Well.. This worked great for the tabs on the revisions... however now my menus (which use the nice_menu module) are messed up, I have a few parent sections not showing up and a few are missing child links... I disabled the modules one at a time and narrowed it down to the dev module_grants module...

So now I have an issue fixed, but have another to resolve.

Any idea why the patch to the module_grants would have no effect on the issue? I'm guessing there have been other changes to dev like the issue on single quotes found here http://drupal.org/node/527512 that may be fixing my revisioning issue but breaking my "nice menu".

PK

pumpkinkid’s picture

I forgot to mention that the menus show up fine when logged in as administrator...

rdeboer’s picture

Hi pumpkinkid,
When you say 'menus' do you mean the navigational menu items or the tabs (i.e. local tasks)?
So is everything working for the administrator?
Can't see how any of the changes other than the inclusion of Smart tabs in Module Grants would have an effect on Nice Menus....
You did upgrade Revisioning to the latest dev when you updated Module Grants to the latest dev, didn't you?
A few things to try...
You say that your menus are screwed up. Could this be because you installed Smart menus in addition to Smart tabs?
I'd recommend to initially disable Smart menus. Maybe also try disabling Nice menus to isolate the error.
Enable Smart tabs but on the Administration >> Site configuration >> Smart tabs page leave the "Pages to include" text box empty (rather than having an * in there). Doing *should* just make the tabs on the Accessible content page behave properly, without adding any "Smart" behaviour.
Also: have you tried switching back to one of the default themes, like Blue Marine?
Finally, have a read of the Smart tabs FAQ (bottom of the project page).
Rik

pumpkinkid’s picture

I have to say, thank you very very much for all the help!

You steered me in the right direction and I could have never figured out what the issue was without your help!

Turns out, one of the additional modules we had on our installation "Content Access" was interfering with "Module Grants". The permissions we set did not allow the primary links to show up. Specifically it was the "edit node" permission that was triggering this effect.

We played around with it and finally checked the "For published content, behave like core, that is OR as opposed to AND the access grants from multiple modules." box. This allowed both modules to coexist. The tabs for the revisioning are showing up and our menu is displaying the correct amount of items.

I am concerned though, does that check box cause issues with revisioning at all?

Thanks again!

pumpkinkid’s picture

I had a small question, but feel free to close this ticket since my original issue is resolved.

Since revisioning is using "Smart Tabs" when viewing the list of revisions and moving on to edit a specific one, both "List Revisions" and "View" are active.... Is there a way to disable that functionality?

rdeboer’s picture

Glad you sorted it out pumpkinkid!

"For published content, behave like core, that is OR as opposed to AND the access grants from multiple modules."
I am concerned though, does that check box cause issues with revisioning at all?

It may have an effect if you use Revisioning in combination with other modules that tinker with access grants, such as Workflow and TAC-Lite.... or in fact Content Access.... so beware...

Regarding the Revisioning tabs.... sounds like a bug I need to look at... .there shouldn't be two tabs active at the same time. You do mean that both of them are highlighted as being currently selected?

.... Is there a way to disable that functionality?

Yes on the Smart tabs configuration page Administer >> Site configuration >> Smart tabs you can specify on which pages the tabs should behave Smartly and which pages should be excluded.
If you don't want any Smart behaviour on any page (i.e. normal core behaviour) leave the "Pages included" text box empty (remove the asterisk).
If you do like it, then put in an asterisk but then put the path to the revisioning pages in the "Pages excluded" text box.

pumpkinkid’s picture

StatusFileSize
new1.9 KB

Not sure if you rather I open up a new ticket for tracking purposes, but...

If you click on the node, and are viewing the current revision, then click on the title to show the revision controls, you will see the list of revisions. Once there, if you click on any revision to actually view it, you get the results on the attached screen shot.

Let me know if I can help you any further.

PK

rdeboer’s picture

Assigned: Unassigned » rdeboer
Priority: Critical » Normal
Status: Active » Closed (fixed)

Thanks for the screen shot, pumpkinkid.
Created a new issue for this #631540: Two tabs highlighted as active at same time.
Closing this ticket as per your request.