Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I use Display Suite and Field Group to create the layout for the questions. When using field groups they do not get rendered. The order of the fields, the custom classes, etcetera are maintained, but the field groups get removed.
After some searching I found that the culprit was the line unset($build['#theme']);
in the quiz_question.module file on line 180. When removing this line, everything keeps on working, and the field groups also start working. Is there a specific reason that this line has been added?
For now, I've created a patch that I will add to fix this problem.
Comments
Comment #2
fabianderijkComment #3
fabianderijkComment #5
djdevinI think the reason behind removing #theme was because the title of the question becomes a link, as nodes would. The tests are failing due to something related to the title so I'm pretty sure that's the issue.
Clicking the title would likely lead to a 403 because users aren't allowed to view questions outside of quizzes.
I couldn't find a way to just remove the title link so I unset the theme.
If there's another way to do this though I'll be happy to push it through.
Comment #6
fabianderijk@djdevin, I've checked all possible places, but I can't find where the question title becomes a link. When I visit the question node the title looks normal, and on all other places I use the questions as well.
Do you have any pointers?
Comment #7
liquidcms CreditAttribution: liquidcms commentedI've removed that line and still don't get field groups to show.