Closed (fixed)
Project:
Voting API
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 May 2006 at 18:24 UTC
Updated:
6 Jun 2008 at 00:10 UTC
whenever i install action module i get this error
Fatal error: Call to undefined function votingapi_rebuild_action_cache() in W:\www\mysite.com\modules\votingapi.module on line 38
Comments
Comment #1
jvandyk commentedNot an actions.module problem.
Comment #2
eaton commentedDo you have the latest verions of VotingAPI installed? it sounds like one of the supporting files (voting_actions.inc) hasn't been updated, or is missing, in your copy.
Comment #3
abqaria commentedwhen i enable voting actions, i get the error of exceeding time 30 sec etc
but it appears enabled afterwards
i put the actions module in the folder
and try to enable it i get the error i mentioned above after that i get this error
* warning: include_once(votingapi_actions.inc) [function.include-once]: failed to open stream: No such file or directory in W:\www\mysite.com\modules\votingapi.module on line 20.
* warning: include_once() [function.include]: Failed opening 'votingapi_actions.inc' for inclusion (include_path='.;/usr/local/PHP/includes;/usr/local/PHP/pear') in W:\www\mysite.com\modules\votingapi.module on line 20.
* warning: include_once(votingapi_actions.inc) [function.include-once]: failed to open stream: No such file or directory in W:\www\mysite.com\modules\votingapi.module on line 20.
* warning: include_once() [function.include]: Failed opening 'votingapi_actions.inc' for inclusion (include_path='.;/usr/local/PHP/includes;/usr/local/PHP/pear') in W:\www\mysite.com\modules\votingapi.module on line 20.
Comment #4
abqaria commentedyes i do havet he latest version
Comment #5
abqaria commentedi solved the problem by putting the file votingapi_actions.inc in the main module directory
but now i get this message
Table 'bloggers.votingapi_action_set' doesn't exist query: SELECT * FROM votingapi_action_set WHERE parent_name = '' ORDER BY weight, name ASC in W:\www\mysite.com\includes\database.mysql.inc on line 120.
Comment #6
eaton commentedAfter further investigation this appears to be a PHP config issue on the server -- user encountered the same error with many many other modules.
Comment #7
skor commentedI'm also getting
Fatal error: Call to undefined function votingapi_rebuild_action_cache()
running 4.7.0 (haven't upgraded to 4.7.2 yet). Was running a previous versions of voting api . Upgraded to the latest voting api (seemed sucessfull, I did run update.php).
But I get this error when install the actions module
I don't think it's a php config issue because I did a fresh 4.7.2 install, and installed the latest voting api, actions, voting actions, and vote up/down, and that install works fine. I think it's more likely a problem with the update from a the previous voting api, or the fact that I haven't upgraded to 4.7.2 yet.
I'll update to 4.7.2 and let you know.
Comment #8
skor commentedUpdating to 4.7.2 seems to have fixed it.
Comment #9
drupalzack commentedI'm getting the same error. I'm using 4.7.2. Fresh install, not upgrade. I have the latest voting_api.
when actions module is enabled, this error comes. But if I press prev button in browser and enable this module again, this error disappears and I get the message the module has been enabled.
If I disable this module and enable it again, the same error. Have to press back in browser and enable module again to enable this module.
Comment #10
drupalzack commentedSome more debugging and here's what I have:
The error:
Here's the code from votingapi.module at line 38
Now, the func. votingapi_rebuild_action_cache() is from votingapi_actions.inc.
Here's the twist. votingapi_actions.inc is included only if the actions module is enabled. This is a chicken and egg situation. When votingapi module was enabled, actions module was not. So this inc. file having the erring function is not included. And when actions moudle is enabled later, it calls this erring function in votingapi, but that doesn't have the inc file. Making sense?
Comment #11
bjvetter commentedHere's a workaround for this problem (you should add it to your readme as well as the Action module's readme).
1) Disable Voting API and Voting API Action modules.
2) Enable the Action Module
3) Enable the Voting API and Voting API Action modules.
The problem only seems to occur if you have added and enabled the voting API module before you enable the Action module.
Comment #12
sodani commentedHas anyone figured out a solution to this? I'm getting that same error:
* warning: main() [function.main]: open_basedir restriction in effect. File(/votingapi_views.inc) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/dev/modules/votingapi/votingapi.module on line 17.
* warning: main(votingapi_views.inc) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/dev/modules/votingapi/votingapi.module on line 17.
* warning: main() [function.include]: Failed opening 'votingapi_views.inc' for inclusion (include_path='.:') in /var/www/vhosts/domain.com/httpdocs/dev/modules/votingapi/votingapi.module on line 17.
I'm noticing that if I install votingapi without views, there's no error. As soon as I add views, the error occurs. I'm also getting this same error when I install actions.
Comment #13
sodani commentedI've figured out that this has something to do with my server because it works on my other server with no problem. Does anyone know what I should be looking for?
Comment #14
sodani commentedI'm not sure if this is a workaround on some other server issue, but putting the following line into my .htaccess file solved the problem:
php_value include_path ".:Root_Path_to_domain'
Comment #15
eaton commentedVoting Actions is no longer part of the VotingAPI package.