Getting this in on Content Type, Manage Fields/Manage Display form (admin/structure/types/manage/light_bulbs/fields
admin/structure/types/manage/light_bulbs/display)

"Notice: Undefined index: title_field in auto_entitylabel_form_alter() (line 107 of ../sites/all/modules/auto_entitylabel/auto_entitylabel.module)."

CommentFileSizeAuthor
#2 2155097_undefined_index.patch830 bytesrballou
Untitled-1.jpg102.72 KBdavewilly
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

davewilly’s picture

Fixed by replacing line 106 of auto_entitylabel.module
if ($replacement) {
to
if ($replacement && isset($form[$title])) {

This key is not set on the Content Type manage/display fields page. Perhaps it would be better to not run the code in the hook at all on the manage/display fields admin pages?

rballou’s picture

FileSize
830 bytes

Here's a patch which achieves a similar fix. I moved the isset() call up because $form[$title] is used twice.

bforchhammer’s picture

Title: Notice: Undefined index: title_field in auto_entitylabel_form_alter() (line 107 of ../sites/all/modules/auto_entitylabel/auto_entitylabel.module). » PHP Notice in auto_entitylabel_form_alter()
Version: 7.x-1.2 » 7.x-1.x-dev
Status: Active » Fixed

I have committed the suggestion in #1; mainly for consistency with the lines above (i.e. the case of "AUTO_ENTITYLABEL_ENABLED"). Thanks!

  • Commit 343d7c7 on 7.x-1.x by bforchhammer:
    Issue #2155097 by davewilly | rballou: Fixed PHP Notice in...

Status: Fixed » Closed (fixed)

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