Closed (fixed)
Project:
Quiz
Version:
6.x-4.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Apr 2010 at 12:24 UTC
Updated:
26 Jan 2011 at 15:46 UTC
Another bug just seen on a prod install with wysiwyg & contrib mods, not a vanilla install:
When at manage questions, and clicking the question node title or the edit link for it, I get a WSOD and:
Fatal error: Class 'QuizDirectionsQuestion' not found in /Applications/MAMP/htdocs/april/sites/all/modules/contrib/quiz/question_types/quiz_question/quiz_question.module on line 593
this goes for all question types, and I get similar errors (switch QuizDirectionsQuestion with MultichoiceQuestion, MatchingQuestion, LongAnswerQuestion etc, but same error on same line)
Comments
Comment #1
sivaji_ganesh_jojodae commentedThis issue is reported several times in quiz 3.x era where mbutcher forgot to add autoload dependency in quiz.info.
#558740: Fatal error: Class 'MatchingQuestion' not found in /srv/www/htdocs/mathbaby/sites/all/modules/quiz/question_types/quiz_question/
#586584: Fatal error: Class 'ShortAnswerQuestion' not found
#603108: Fatal error: Class 'ScaleQuestion' not found
Dependency issue is fixed. I am not sure what is causing this now, you can solve this by clearing cache.
FYI: In every quiz module's
hook_installthere is cache clear statementcache_clear_all('autoload:', 'cache');added as a trick to solve this problem. I don't know what else we can do, i will ask falcon to look into this.Comment #2
vegardjo commentedThanks Sivaji,
I might have a small clue here. I'm testing both on a vanilla Drupal install and on a copy of my production server, and as I said in the original issue I experience this bug only on my prod install, not the vanilla.
One of the things I tried to troubleshoot was where Quiz and Autoload was stored. On my prod install this was in sites/all/contrib/* while on the vanilla install it was in /sites/all/*. I did move the modules on the vanilla install into contrib/ but it did not have any immediate effect.
Today however, I get the same bug on the vanilla install that was working when trying to view questions outside of a quiz (!). From the time it did work till now I have cleared browser cache, Drupal cache and some cookies have probably expired, but nothing else than switching module directories have happened on the install.
So, it it possible that this is related to where Quiz or Autoload expect to find the module files? Say it's manually set somewhere to look within sites/all/modules and thus will not find a file that is placed in sites/all/modules/contrib, even though this is allowed in Drupal..?
Comment #3
vegardjo commentedScratch that previous comment!
I found out that I wasn't correct when I said nothing had changed in the vanilla install. I forgot that I used it for some other demoing so I had installed some more modules. When disabling these one by one I found that Quiz is incompatible with the Spaces module. I could confirm this by disabling Spaces in my prod install too, which made the error go away there too.
I also have a (unqualified) hunch that this might be the Autoload module that isn't compatible with Ctools instead. I cannot test that directly, but Spaces is dependent on Ctools, and when disabling Spaces I believe no other modules were calling Ctools. So my hunch is in the direction that Ctools and Autoload are modules much more likely to conflict than Quiz and Spaces should be :)
Comment #4
falcon commentedYou where right on Autoload beeing the problem. I contributed a patch to autoload. Hopefully it will be commited. To fix your own system you can manually change the system table in you database. Set the weight for autoload to "-9999" or something... (Must be below "-1")
Ref: #777408: Autoload needs a lower weight in the system table?
Comment #5
vegardjo commentedGreat, that fixed it, hope the patch get committed!
Comment #6
falcon commentedComment #7
groberts100 commentedJanuary 2011, autoload-6.x-2.0, quiz-6.x-4.0,
same symptoms as above (white screen when adding questions and a log message about missing question class), have tried clearing caches and
UPDATE system SET weight = -282828 WHERE name = 'autoload' AND type = 'module'
I was hoping it would just work.
Comment #8
groberts100 commentedErr, its working for me now, so that SQL query must have done it. Sorry for the noise.
But I had to google around a bit to get this excellent module to work.