I have a page where I have two forms. One is the taxonomy_overview_terms form, the other is a custom made "enter a few values" form. When I submit the custom made form. I get error messages:
Notice: Undefined index: tid:152:0 in taxonomy_overview_terms() (line 352 of [...]/drupal-7.34/modules/taxonomy/taxonomy.admin.inc).
What seems to happen is that taxonomy_overview_terms is called, it assumes that the $form_state['input'] only can contain data relevant to its own form, and it tries to access $form_state['input']['tid:152:0'] - and since that's not the form that was used, that is of course undefined; hence the warning.
To repeat: Get a drupal 7.34 out of the box. Add a vocabulary with a few terms. Get (for instance) the Search block to show on the same page as the vocabulary list page. Fill in something to search for, and click search (that is, submit something in the non-taxonomy form), see error messages appear.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2412151-8.patch | 3.21 KB | poker10 |
| #8 | 2412151-8-test_only.patch | 2.38 KB | poker10 |
| #1 | drupal-fix-missing-form-input-check-2412151-1.patch | 852 bytes | abramm |
| After_submit_ERROR.png | 177.27 KB | monika.danielsson | |
| Before_submit.png | 115.62 KB | monika.danielsson |
Comments
Comment #1
abrammI've faced the issue as well.
Attaching patch which adds form input check.
Comment #2
abrammComment #4
abrammMoving issue back to 'Needs review' state since it seems like failed tests aren't related and could be broken.
Comment #5
e.bogatyrevHi everyone,
patch #1 works for me! Thanks!
Comment #6
aexchecker commentedWorks good
Comment #8
poker10 commentedI think this looks good, thanks!
Added a test for this and uploading test-only and full patch. The patch itself is unchanged.
Comment #10
anrikun commentedThank you!
Comment #12
mcdruid commented+1 for adding the tests.
Thanks everyone that contributed!