I was working with the metatags on and the panels module, checked "Enable Metatag configuration" and clicked update and save without entering any metatags. I got a slew of notice level errors. I traced the notices down to this line (#97)

$name = "metatag:" . $options["instance"] . ":" . $this->info["name"];

The error can be removed with this replacement line...

 $name = "metatag:" . (isset($options["instance"]) ? $options["instance"] : '') . ":" . $this->info["name"];

This doesn't necessarily fix the issue of instance not being set when this function is called, but it does suppress the notice error. The behavior of the code will be the same before and after - when PHP is asked to add a null or unset value to a string, it adds an empty value instead.

CommentFileSizeAuthor
metatag_notice.patch592 bytesAki Tendo
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna’s picture

Component: Code » Panels integration
DamienMcKenna’s picture

Status: Active » Needs review

Thanks for the patch.

FYI please change the issue status to "Needs review" when you upload a patch, that tells the maintainer that you have a potential solution available, and triggers the automated tests to help check whether the patch will work.

Status: Needs review » Needs work

The last submitted patch, metatag_notice.patch, failed testing.

DamienMcKenna’s picture

Version: 7.x-1.0-beta7 » 7.x-1.x-dev
Priority: Minor » Normal

Needs to be rerolled.

DamienMcKenna’s picture