Once I try to set the permissions so that only one role can access a specific forum, I get this error as soon as I try to save my changes:

_forum_access_forum_form_after_build_acl0()

Any Ideas?

Comments

pumpkinkid’s picture

Sorry, I meant this is the error:

Fatal error: Call to undefined function _forum_access_forum_form_after_build_acl0() in /home/user/public_html/includes/form.inc on line 936

salvis’s picture

Category: bug » support

I would guess you have more than one copy of FA under your webroot directory.

pumpkinkid’s picture

Umm... I wish it were that simple...

Unless you have any ideas of where else to look, I've searched my root drupal install and there does not seem to be a duplicate of the FA module.... That being said... two other things come to mind...

The drupal installation is not directly on the webroot... I mean... it is *within* the webroot, but my live install is on /drupal/ with the domain being directly linked to there and my sandbox is on /sandbox/ with my sandbox subdomain linked directly there...

I have been attempting to use the module on the sandbox installation...

The other thing that comes to mind is that I used Drush to download the module, however, I enabled it manually...

Any of this cause problems with your module?

Thanks.

salvis’s picture

The function is in forum_access.admin.inc. Just look there and you'll find it.

I wonder whether the attempt to load the file is failing because your site is not in the webroot. I've never tried such an installation...

pumpkinkid’s picture

I have seen the function in the file, I don't doubt that, however, I do believe that it may lie in the webroot issue...

That being said however... it would have to be an issue were its not in the actual webroot /home/user/public_html/ and not the subdomain's root as sandbox.mydomain.com goes directly to /home/user/public_html/sandbox/.

I can test this if you want... not sure if a way to attempt to test it is to use a symbolic link on the webroot though...

pumpkinkid’s picture

trying a symlink did not resolve the issue... I will have to try some more testing unless you have any ideas...

salvis’s picture

Yes, I'd be grateful if you could look into this.

Try logging the loading of the .inc file by adding a drupal_set_message() call outside of any function in the .inc file.

pumpkinkid’s picture

I will do this over the weekend and let you know what I find.

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

Any news here?

pumpkinkid’s picture

To be honest, I have yet to have had a chance to check anything with this.. I will try later tonight.

pumpkinkid’s picture

Ok, so after finally getting a chance to really look at this, I found that it has to do with the cache method I use... Not entirely sure of the issue itself... but I did find that if I go to the page with the forum permissions, and clear my Drupal Cache before submitting the changes, the module takes effect and works as advertised...

Now, my question to you is, what would you like for me to do next in order to troubleshoot this?

salvis’s picture

Title: Error attempting use of module » Caching (?) issue: "Call to undefined function _forum_access_forum_form_after_build_acl0()"
Status: Postponed (maintainer needs more info) » Active

Ouch!

I have no idea what could be going wrong and how to pursue this...

Anyone?

P.S. I'm seeing a similar issue with D7 Beta2 (but not Beta1!). Wild guess: could it be that you're using admin_menu?

salvis’s picture

For D7, #367567: Use AJAX framework for "Add more" / load include file containing form / introduce $form_state['build_info'] brought me onto the right track: Apparently, the form definition is cached and later rebuilt from the cache, and that's where the include files were missing. I've added something like

  $form_state['build_info']['files'][] = drupal_get_path('module', 'forum_access') . "/forum_access.admin.inc";

at the bottom of the _forum_access_forum_form() function.

I don't know whether a similar thing exists for D6.

Or maybe a way to tell Drupal to not cache the form?

salvis’s picture

Maybe it's as simple as

  $form_state['cache'] = FALSE;

?

pumpkinkid’s picture

I actually am using admin_menu, that is what I was using to clear the cache before submitting the form...

I honestly don't know much about module development and how certain things work in Drupal terms... Still re-learning php as it pertains to how Drupal handles things... however, I will be more than happy to help you troubleshoot this.

pumpkinkid’s picture

hmm... I just had the same problem with the captcha module.... hmmm... maybe its a setting?

salvis’s picture

Have you tried disabling admin_menu?

pumpkinkid’s picture

I did disable it... it still has the same problem...

Why... Do you think the Admin Menu is causing problems?

salvis’s picture

That was just a wild guess, because I saw that AM is making a separate JS call.

Please try adding the line in #14 at the end of the _forum_access_forum_form() function.

pumpkinkid’s picture

That did not seem to work.... I cleared the cache right before I tested it... but should I have removed the module and reinstall to test it?

salvis’s picture

No, the test is valid. I'm out of ideas...

pumpkinkid’s picture

well, only thing I can think of would be for me to see if any other settings could be interfering.. I can live with me having to redo the cache before I make changes... At least the rest of the module works.

dillix’s picture

Issue summary: View changes
Status: Active » Closed (outdated)