I'm using:

  • EE v2.7.3
  • Assets v2.2.4
  • Matrix v2.5.10
  • Low Vars v2.4.1

Error message (only displayed when on Low Vars page):

A PHP Error was encountered Severity: Notice Message: Undefined index: entry_id Filename: assets/ft.assets.php Line Number: 647

It's obviously got something to do with that switch statement in assets/ft.assets.php if I comment the grid/matrix case out the error disappears. Of course that causes more issues though.

Any assistance appreciated.




Andris was close to the solution:

Add the following code right above the switch statement.

`if (($context == 'grid' || $context == 'matrix') && !empty($this->var_id))
    $context = 'low';

Then in the 'low' case (around like 163) change the query to:

`$sql .= " ae.var_id = {$this->var_id} AND ae.row_id = '{$this->row_id}'";`

Now Low Variables knows what row to use. :)

  • Thanks. This might help someone else. Andris actually emailed me a pre-release version of Assets that worked perfectly. – Andy Homan Mar 31 '14 at 23:31

If you add the following code before the switch, the error should go away - this will be included in the next Assets release :)

if (($context == 'grid' || $context == 'matrix') && !empty($this->var_id))
    $context = 'low';
  • Sorry Andris, I was too hasty. While the above solution does eliminate the error it introduces other issues. If I upload an image in the 1st matrix row and leave the image field for the 2nd row empty then hit save the 1st image will be duplicated and appear in the 2nd row. Even if I specify a different image for row 2 it will be overridden with whatever is uploaded in the 1st row. – Andy Homan Feb 24 '14 at 0:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.