No brainer patch: term->vid is not always set, eg on the taxonomy term edit form.

There will probably be a follow up shortly. I'm getting this notice 6 times on a single node edit form with 1 vocabulary:

Notice: Undefined index: #post in form_builder() (line 897 of /var/www/glowbox/glowbox/drupal/includes/form.inc).

I've traced it back to hs_taxonomy_form() , still investigating, but if you happen to have a clue let me know. Hope I find it today because one of our clients is giving in a lot of nodes and the error log is getting messed up :)

CommentFileSizeAuthor
#2 hs.notices.patch2.61 KBswentel
hs_taxonomy.notices.patch659 bytesswentel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Ok, that #post notice only happens on a pressflow installation, looking at diff in includes directory, fun! (not)

swentel’s picture

Title: PHP notice in hs taxonomy » PHP notice in hs taxonomy & hs
FileSize
2.61 KB

Ok, updated patch, found some more notices, still hunting that #post notice - might be a Drupal Core bug exposed by pressflow which has better error handling ...

swentel’s picture

Component: Code - Taxonomy » Code
Wim Leers’s picture

Title: PHP notice in hs taxonomy & hs » PHP notices in HS Taxonomy & HS
Status: Needs review » Needs work

Immediately committed your work so far :)

http://drupal.org/cvs?commit=417110

Waiting for your #post notice patch now :)

swentel’s picture

Status: Needs work » Fixed

I can't find it, it seems more like a really nice hidden Drupal Core bug, exposed by the latest Pressflow, because it pops up in a few other modules. I've patched my installation self right now because I don't have time anymore. If you have a spare 5 minutes, take the latest pressflow and a single HS vocubulary on an edit form and see the notices (normally 6) popping up. I'm fairly sure it's not your fault, so setting fixed for now!

Edit

In case you want to test. Again, 90% sure this is Drupal Core

  // Line 897 in latest pressflow in includes/form.inc
  $form[$key]['#post'] = isset($form['#post']) ? $form['#post'] : array();
Wim Leers’s picture

Oh yes, I've seen that one too. I hacked my test site's form.inc to fix it. You should report that in the Drupal core issue queue.

swentel’s picture

Alright, filed against core, now lets wait a few months :)

Wim Leers’s picture

Hehe :P

KarenS’s picture

Status: Fixed » Active

Can anyone provide a link to the core issue for #form error in #5? I'm getting that too.

KarenS’s picture

Status: Active » Fixed

The core issue is #905156: PHP notice in form_builder function, for anyone else looking.

Status: Fixed » Closed (fixed)

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