Undefined index: selected_assets after upgrade

We did an upgrade on a testing server (before we do the real upgrade on production) and things went really smooth in the upgrade steps. No errors.

 

But, when in the _admin and creating a new asset we get a Undefined index: selected_assets error:

PHP Notice
Message: Undefined index: selected_assets

Notice: Undefined index: file in /opt/matrix/core/include/general.inc on line 74 Notice: Undefined index: line in /opt/matrix/core/include/general.inc on line 75 Notice: Undefined index: file in /opt/matrix/core/include/general.inc on line 74 Notice: Undefined index: line in /opt/matrix/core/include/general.inc on line 75 Notice: Undefined index: file in /opt/matrix/core/include/general.inc on line 74 Notice: Undefined index: line in /opt/matrix/core/include/general.inc on line 75 Notice: Undefined index: file in /opt/matrix/core/include/general.inc on line 74 Notice: Undefined index: line in /opt/matrix/core/include/general.inc on line 75

 

Any ideas on what could be the issue?

Anyone? Did the upgrade fail?

Hi Nic,

 

I haven't seen this one before, selected_assets only appears to be used in the trigger code.

 

Have you tried running a step_02, compile_locales, step_03, compile_locales? Did any of those fail at any point?

 

Are you able to disable the trigger manager and try creating an asset to see if the error still occurs?

 

Micky

Have you tried running a step_02, compile_locales, step_03, compile_locales? Did any of those fail at any point?

 

Are you able to disable the trigger manager and try creating an asset to see if the error still occurs?

 

Ran step 2, 3 and compile locals again, but that didn't help. Turning off the Trigger Manager DOES fix the issue, but I really need it on.

 

Any ideas on what I should try next?

The triggers that use that appear to be the clear matrix cache and clear squid cache actions.

 

Are you able to go to the details screens of any triggers that have those actions, acquire the locks and commit?

 

Micky

Oh, and there's a "set cache expiry" trigger action that uses this as well. I've never seen that used in a live system yet though. If you're using it, please try the acquire and commit.

 

Micky

The triggers that use that appear to be the clear matrix cache and clear squid cache actions.

 

Are you able to go to the details screens of any triggers that have those actions, acquire the locks and commit?

 

Micky

 

Wow, looks like that fixed it!

 

So, no lasting effects or bad issues this error could have caused in the long run?

 

Thanks!

The only thing I can think of is that those triggers wouldn't have run since the upgrade. As they're cache clearing triggers it'll be transient.

 

I'll talk to labs about working something out for this in the upgrade scripts.

 

Micky

Nic,

 

Can you tell us what version you upgraded from?

 

Micky

hi nic,

 

That Clear Matrix Cache trigger action's code hasn't been touched for ages. It was only updated recently in master branch which isn't released yet.

I'm suspecting you might have forgotten to commit something on the trigger interface? but i have no idea what else it could be.

Can you tell us what version you upgraded from?

 

4.14.2

That Clear Matrix Cache trigger action's code hasn't been touched for ages. It was only updated recently in master branch which isn't released yet.

I'm suspecting you might have forgotten to commit something on the trigger interface? but i have no idea what else it could be.

 

I don't think I forgot to commit anything in the trigger interface....but re-committing those triggers did fix the issue.

If anyone else has this issue after an upgrade and reads this before fixing it, could you please send me (mgough@squiz.com.au) the contents of your sq_trig table before and after fixing it, I'd be grateful.

 

Micky

If anyone else has this issue after an upgrade and reads this before fixing it, could you please send me (mgough@squiz.com.au) the contents of your sq_trig table before and after fixing it, I'd be grateful.

 

Micky

 

What is the query to show the contents of a table? I tried:

SELECT sq_trig FROM mysource_matrix.tables

It didn't work.

 


What is the query to show the contents of a table?

I’d probably go with (from the Linux command line):

pg_dump -U postgres --table=sq_trig matrix_db_name > sq_trig.dump
and then e-mail the resulting “sq_trig.dump” file to Micky.

  I'd probably go with (from the Linux command line):

pg_dump -U postgres --table=sq_trig matrix_db_name > sq_trig.dump
and then e-mail the resulting "sq_trig.dump" file to Micky.

 

 

Thanks. I emailed the files to Micky.

Hi Nic and all watchers,

 

This has now been fixed as http://bugs.matrix.squiz.net/view_bug.php?bug_id=6775. Shouldn't affect future upgrades. Thanks to the Labs team for their investigation.

 

Micky

This has now been fixed as http://bugs.matrix.squiz.net/view_bug.php?bug_id=6775. Shouldn't affect future upgrades. Thanks to the Labs team for their investigation.

 

Thanks!