Problem / Motivation
In case if we have a lot of fields and/or modules then node quiz creation page will be broken.
We will get WSOD during token_tree generation.

Solution
We need to replace usage of token_tree to new theming element called token_tree_link.
In this case we will render only links "Browse available tokens." instead of all token trees (that generated multiple times) on initial page load.

Patch attached.
Tested on latest releases of Drupal 7 and Token module on dev version of Quiz (5.x-dev branch).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bohart created an issue. See original summary.

podarok’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +CodeSprintUA

Tested functonally on simpletest.me - looks awesome
Let's get t merged, code is simple

criz’s picture

Priority: Normal » Major

Awesome, just wanted to create a bug report. Without this patch the quiz node edit/create page is very very very slow. Not usable.
Patch fixes it. :)

Da_Cloud’s picture

Can confirm that the patch does what its suppose to do.

djdevin’s picture

This looks good, but is that theme function inside the contributed Token module? Quiz doesn't have a dependency on it.

  • djdevin committed 42fa449 on 7.x-5.x authored by bohart
    Issue #2742787 by bohart: WSOD on Node Add Quiz page (token_tree...

  • djdevin committed a8d77cf on 7.x-5.x
    Issue #2742787: add dependency on contributed token module
    
djdevin’s picture

Status: Reviewed & tested by the community » Fixed

I went ahead and added it. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.