Notice: Undefined index: #original_link in sasson_menu_link() (line 482 of /sites/all/themes/sasson/template.php)
I've tried to debug and it seems to be an error on this part here:

$element['#attributes']['class'][] = 'mid-' .$element['#original_link']['mlid'];

The #original_link element of that array simply doesn't exist. And it's firing a couple warning messages.

Comments

tsi’s picture

We should check if it exists, and while we're there we might as well check if it's not empty.
Please see if replacing this line with this code helps :

  if (isset($element['#original_link']['mlid']) && !empty($element['#original_link']['mlid'])) {
    $element['#attributes']['class'][] = 'mid-' . $element['#original_link']['mlid'];
  }
caiobianchi’s picture

has the fix been put into the dev version yet?

tsi’s picture

Title: Error » Notice: Undefined index #original_link
Priority: Critical » Minor

Nope, I was hoping you'll confirm the fix solved the issue, since I wasn't able to reproduce (all my menu items has mlids

P.S. this is only a notice and not an error, so changing title.

Morn’s picture

Title: Notice: Undefined index #original_link » Undefined index #original_link
Version: 7.x-2.0-beta4 » 7.x-2.0

I confirm this error, (line 503 I am using the 7.2 Version).
Its generated on the Pages where I display a Calendar Module month mini block.
The fix corrects the error

PS: its an error, it generates many warnings filling up the log

tsi’s picture

Status: Active » Fixed

Thanks, committed to dev

Status: Fixed » Closed (fixed)

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

  • Commit 122f757 on 7.x-2.x, 7.x-3.x, PHPSass, 7.x-3.x-Assetic, 7.x-3.x-susy by tsi:
    Fix issue #1458848 by caiobianchi, Morn, tsi : Undefined index #...