Undefined index: selected_assets after upgrade


(Nic Hubbard) #1

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

Screen%20Shot%202014-01-14%20at%2012.05.

 

Any ideas on what could be the issue?


(Nic Hubbard) #2

Anyone? Did the upgrade fail?


(Micky Gough) #3

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


(Nic Hubbard) #4

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?


(Micky Gough) #5

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


(Micky Gough) #6

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


(Nic Hubbard) #7

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!


(Micky Gough) #8

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


(Micky Gough) #9

Nic,

 

Can you tell us what version you upgraded from?

 

Micky


(Edison Wang) #10

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.


(Nic Hubbard) #11

Can you tell us what version you upgraded from?

 

4.14.2


(Nic Hubbard) #12

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.


(Micky Gough) #13

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


(Nic Hubbard) #14

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.


(Marcus Fong) #15

 


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.

(Nic Hubbard) #16

  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.


(Micky Gough) #17

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


(Nic Hubbard) #18

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!