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.

Comments

abramm’s picture

I've faced the issue as well.

Attaching patch which adds form input check.

abramm’s picture

Version: 7.34 » 7.51
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: drupal-fix-missing-form-input-check-2412151-1.patch, failed testing.

abramm’s picture

Status: Needs work » Needs review

Moving issue back to 'Needs review' state since it seems like failed tests aren't related and could be broken.

e.bogatyrev’s picture

Hi everyone,
patch #1 works for me! Thanks!

aexchecker’s picture

Status: Needs review » Reviewed & tested by the community

Works good

Version: 7.51 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

poker10’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.38 KB
new3.21 KB

I think this looks good, thanks!

Added a test for this and uploading test-only and full patch. The patch itself is unchanged.

The last submitted patch, 8: 2412151-8-test_only.patch, failed testing. View results

anrikun’s picture

Status: Needs review » Reviewed & tested by the community

Thank you!

  • mcdruid committed edf413d8 on 7.x
    Issue #2412151 by poker10, abramm, monika.danielsson:...
mcdruid’s picture

Status: Reviewed & tested by the community » Fixed

+1 for adding the tests.

Thanks everyone that contributed!

Status: Fixed » Closed (fixed)

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