Hi,

This is a fresh start-up from scratch.

Using:
Drupal 6.3
Workspace 6.x-1.2
linux server
MySQL 4.1.22
Php 5

Thought there might have to be a blog and poll created, tried it, but still getting errors. Disabled poll and blog modules, errors are gone. These 2 options are a must for our site.

I've cleared cache, run updates...etc. User Permissions: can create/edit own blog, vote in polls.

Errors:
* warning: Missing argument 3 for blog_access() in /home/cauzmo/public_html/finale/modules/blog/blog.module on line 32.
* warning: Missing argument 3 for poll_access() in /home/cauzmo/public_html/finale/modules/poll/poll.module on line 63.

Thanks in Advance,
Grizz

Comments

jvandyk’s picture

Status: Active » Fixed

Thanks! Fixed.

crutch’s picture

Status: Fixed » Active

I'm getting this error now.

warning: Missing argument 3 for blog_access() in /home/rentctr/public_html/modules/blog/blog.module on line 32.
warning: Missing argument 3 for poll_access() in /home/rentctr/public_html/modules/poll/poll.module on line 63.
warning: Missing argument 3 for forum_access() in /home/rentctr/public_html/modules/forum/forum.module on line 313.

Thanks,
Crutch

jvandyk’s picture

Are you using the version I fixed? You would have to get it from CVS at the moment.

crutch’s picture

o cool, thanks, sorry about that...

hutch’s picture

This is an issue to do with hook_access. According to the docs the last parameter ($account) to hook_access is required but a look at node_access tells a slightly different story, it has $account as optional. I was having the same error message with faq module and mentioned this on the faq list and this fix was applied:

originally:

function faq_access($op, $node, $account) {
  global $user;

now in the dev version:

function faq_access($op, $node, $account = NULL) {
  global $user;
  if (empty($account)) {
    $account = $user;
  }

which is much the same as applied to node_access.
Where exactly the error arises I'm not sure but it is not in Workspace I don't think.
Perhaps this is more of a core policy issue, I can see the point in making $account optional, it allows admins to see what another user's permissions are but it needs to be applied to all hook_access derivatives, one way or the other.

my two bits worth .

jvandyk’s picture

Status: Active » Fixed

The node module delegates the access call to the content type's module, where the $account parameter is not optional. See blog_access(), for example.

You can see the change I made, which will appear in 6.x-1.3, here.

hutch’s picture

Right, now I see how this works, thanks for the heads up.

Grizz’s picture

jvandyk,

Thank you very much for the quick fix.

Working awesome!

PHP is my weakness, CSS is my ace.

THX again,
Grizz

Anonymous’s picture

Status: Fixed » Closed (fixed)

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