Problem/Motivation
I am using Opigno LMS and this module is part of the distribution. I had to use the drush rr tool to fix something standard (other) that needed registry rebuilding and after that everything related to QuizQustion class started to break (I found just all question node forms to be broken at the time, did not dig deeper for other issues in the platform, as it's quite large...).
So the problem comes from the fact that the modules does some hacks to exclude a class files from other modules and include it's own on their place through hook_registry_files_alter. The issue is that after standard rebuild of the registry, the registry_files table is not refreshed, causing the class maps to not be excluded, from processing, due to no changes in them. This is preventing Drupal from auto-loading the QuizQuestion abstract base class that the module provides, causing the error.
How to reproduce:
1. Install quiz, quiz_question, og_quiz and all dependencies on a standard Drupal install.
2. Add a module that provides a quiz question type (short-answer) for example.
3. Run drush rr from the console in drupal's root folder.
4. Open the node/add/short-answer page. You should see 500 internal server error (WSOD).
5. Inspect PHP's error logs: PHP Fatal error: Class 'QuizQuestion' not found in .../profiles/opigno_lms/modules/contrib/quiz/question_types/short_answer/short_answer.classes.inc on line 22
Proposed resolution
Delete the entries for this module from registry_file table to force the re-parsing of files and this the class maps.
Remaining tasks
Patch, review RTBC, commit.
User interface changes
None.
API changes
None - Change in implementation detail.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | og_quiz-registry-corrupted-2710875-D7-2.patch | 1.54 KB | ndobromirov |
Comments
Comment #2
ndobromirov CreditAttribution: ndobromirov commentedHere is a patch with the fix that worked for me.
Comment #4
amermod CreditAttribution: amermod at Connect-i commentedHi ndobromirov,
Thanks for your issue.
I reviewed and tested your patch.
It works fine with it, so I committed.
Comment #5
amermod CreditAttribution: amermod at Connect-i commentedv.1.5