Using $form_state['storage'] to store the biblio_type ID results in a "White screen" error with other modules that are expecting $form_state to be an array. The supplied patch fixes this.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | biblio.module.patch | 922 bytes | sdrycroft |
| #3 | biblio.module.patch | 1.42 KB | sdrycroft |
| #1 | biblio.module.patch | 1.33 KB | sdrycroft |
| biblio.module.patch | 1.31 KB | sdrycroft |
Comments
Comment #1
sdrycroft commentedApologies, the original patch wasn't quite right.
Comment #2
rjerome commentedJust out of curiosity, which other module triggered this error?
Comment #3
sdrycroft commentedPrevious patch resulted in the user being returned to the node edit form once a new biblio node was submitted. The included patch should fix this issue.
EDIT: It was the BATax module (one I wrote myself).
Comment #4
rjerome commentedHi Simon,
Perhaps a cleaner approach, and what I'll probably do, is create a $form_state['storage']['biblio'] array, with elements called "type", "paste" and "doi".
It's certainly not obvious from the documentation (what little there is) that $form_state['storage'] must be an array, but I guess it's not surprising.
Ron.
Comment #5
rjerome commentedI've committed the fix for this in the -dev version.
Ron.
Comment #6
sdrycroft commentedThanks Ron.
Comment #8
sdrycroft commentedSorry Ron, I'll have to reopen this issue - I guess I didn't properly follow up on this when I first opened it.
I'm afraid the unsetting of all $form_state['storage'] values on line 1454 is breaking any other module that relies on the $form_state['storage'] array during their submit function. You should only unset values that you have (or could have) set.
The included patch fixes this.
[EDIT]
And yes, what you say in #4 is almost definitely a good idea.
Comment #9
rjerome commentedGood point, I'll include that in future releases.
Comment #10
liam morlandThis version is no longer maintained. If this issue is still relevant to the Drupal 7 version, please re-open and provide details.