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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fabianderijk created an issue. See original summary.

fabianderijk’s picture

fabianderijk’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: layout_issue_when_using-2886012-2.patch, failed testing. View results

djdevin’s picture

I 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.

fabianderijk’s picture

@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?

liquidcms’s picture

I've removed that line and still don't get field groups to show.