Hello
First of thanks for creating this module! I am using it for the first them in a drupal 7.4.
When creating a new node and changing the state to Needs Review i get the following errors
Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 423 of /.../sites/all/modules/contrib/workbench_moderation/workbench_moderation.module).
Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 423 of /.../staging_pom/sites/all/modules/contrib/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 425 of /.../sites/all/modules/contrib/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _workbench_moderation_revision_access() (line 425 of /.../sites/all/modules/contrib/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1848 of /.../modules/node/node.module)
For the rest everything seems to work like i should be...
grts
frederic
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | workbench_moderation.code_.1233354-24.patch | 810 bytes | larowlan |
| #13 | Missing_arg_1-for-workbench_moderation_revision_access-1233354-13.patch | 811 bytes | dustin@pi |
Comments
Comment #1
stevectorI am not able to reproduce this error. Do you get it every time you create a node? Do you get this error when logged in as user 1 or only a certain kind of user?
Comment #2
dave reidComment #3
MJR113 commentedI get the same error messages - it doesn't matter which user is logged in or the type of node. I started getting this problem after updating to Workbench Moderation 7.x-1.0-beta8 and upgrading Revisioning to 7.x-1.2.
Comment #4
Frederic wbase commentedwith user 1 i don't have the problem
grts
frederic
Comment #5
dstacey commentedI tried 3 different users with varying roles, get the errors below.
Obviously when I disable "Enable moderation of revisions" (in content-type: publish options) the errors go away but then I'm missing all the fun stuff.
I'm on tag "7.x-1.2" of revisioning,
"7.x-1.0-beta8" of workbench_moderation,
"7.x-1.0-beta6" of workbench
Thanks,
Dave
-----------
# Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 425 of /var/www/d7/sites/all/modules/workbench_moderation/workbench_moderation.module).
# Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 425 of /var/www/d7/sites/all/modules/workbench_moderation/workbench_moderation.module).
Comment #6
MJR113 commentedI was able to fix this issue by disabling the Revisioning module and then clearing the cache.
Comment #7
brad80 commentedI'm seeing a similar error with all users anytime I access the moderation tab for content. I tried MJR113's tip with out success. Here's the full error that I received:
Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 431 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 431 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 433 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _workbench_moderation_revision_access() (line 433 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 434 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: op in _workbench_moderation_revision_access() (line 434 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1819 of /swadm/Websites/drupal/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1828 of /swadm/Websites/drupal/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1829 of /swadm/Websites/drupal/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1829 of /swadm/Websites/drupal/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1836 of /swadm/Websites/drupal/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1840 of /swadm/Websites/drupal/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1848 of /swadm/Websites/drupal/modules/node/node.module).
Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 431 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 431 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 433 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _workbench_moderation_revision_access() (line 433 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 434 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: op in _workbench_moderation_revision_access() (line 434 of /swadm/Websites/drupal/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1819 of /swadm/Websites/drupal/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1848 of /swadm/Websites/drupal/modules/node/node.module).
Comment #8
stevectorbrad80, are you also using Revisioning module?
Comment #9
clare-ux commentedI get the same error using the Revisioning 7.x-1.2 and Workbench 7.x-1.1 :(
Comment #10
webfeathers commentedI, also, am getting the same errors with these.
Same version of Revisioning (7.x-1.2) and WorkBench (7.x-1.1)
Disabling revisioning does indeed get rid of the error... of course it also gets rid of revisioning :)
Comment #11
anschinsan commentedProblem/Motivation
This issue is still a problem in the dev version
Proposed resolution
Add 'access argements' in function workbench_moderation_menu_alter, as you overwrite the access callback without giving the arguments.
Code should look like this:
I've set the priority to major, as this is only a small thing to do but the long list of errors thrown by this bug prevents the module from being used in production together with the revisioning module.
Thanks for your work!
Comment #12
Anonymous (not verified) commentedI'm getting similar errors (using the dev version), but it has different line numbers, and more total lines of errors. Here it is....
Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: op in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1819 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1828 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1829 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1829 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1836 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1840 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1848 of /home/cfaadev/public_html/modules/node/node.module).
Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: op in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1819 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1848 of /home/cfaadev/public_html/modules/node/node.module).
Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: op in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1819 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1848 of /home/cfaadev/public_html/modules/node/node.module).
Warning: Missing argument 1 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Warning: Missing argument 2 for _workbench_moderation_revision_access() in _workbench_moderation_revision_access() (line 498 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _workbench_moderation_revision_access() (line 500 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: node in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Undefined variable: op in _workbench_moderation_revision_access() (line 501 of /home/cfaadev/public_html/sites/all/modules/workbench_moderation/workbench_moderation.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1819 of /home/cfaadev/public_html/modules/node/node.module).
Notice: Trying to get property of non-object in _node_revision_access() (line 1848 of /home/cfaadev/public_html/modules/node/node.module).
Any ideas of a fix as I need certain users to have access to this area for moderation....
Comment #13
dustin@pi commentedThis is a patch with the change that @anschinsan proposed in #11.
Comment #14
cangeceiro commentedI am also experiencing this issue and the patch in #13 resolved.
Comment #15
ajinkya.kulkarni commentedYes. Patch in #13 fixed the issue.
Comment #16
technotim2010 commentedI can confirm the fix #13 with version 7.x.1.2 and Revisioning 7.x.1.4 works properly. You need to clear caches after applying. Thanks for excellent work.
Comment #17
aimeeraeI can also confirm the fix #13 works with d 7.22, workbench moderation 7.x-1.3, revisioning 7.x-1.4 works properly. Caches cleared, all is well. Thank you for the patch, it cleared the angry redness from the page!
Comment #18
katannshaw commentedPatch #13 and clearing the cache fixed this issue for me as well. My setup: Drupal 7.22, Workbench Moderation 7.x-1.3, Revisioning 7.x-1.5. Thanks!
Comment #19
bbc#13 and cc all did the trick for me as well. Drupal 7.23, Workbench Moderation 7.x-1.3 and Revisioning 7.x-1.5. Would be great to see this one committed.
Comment #20
xurizaemonRTBC. Tested here, and by several others above.
Comment #21
dustin@pi commentedFYI, I have been running a production site based on the patch in #13 (the one I added based on the change that @anschinsan suggested in #11) since last fall across multiple versions of Revisioning, Workbench Moderation and Drupal.
Comment #22
bbcI had been using the patch from #13 in production for a couple months, but ran into some issues recently that relate to Incompatible with Revisioning module (https://drupal.org/node/1894194). After much head-scratching, reverting the changes from that patch and disabling Revisioning was the only fix I could find. With the exception of Revisioning Scheduler, I haven't tripped over any loss in features/functionality so far.
Comment #23
larowlanWhitespace error
Comment #24
larowlanFixes #23
Comment #25
larowlanIn fact, that's not right either, as $node->workbench_moderation['current'] isn't correctly loaded. You also need load arguments to get the two to work together.
Comment #26
Anonymous (not verified) commentedI run into the same issue when also having the revisioning module installed (https://drupal.org/project/revisioning). Disabling it solves the problem. It seems they have some conflicting menu links and/or node access hooks.
Comment #27
colanSo is this really RTBC?