We removed and replaced a prominent asset in our system. This was necessary for many reasons that I won't go into. I thought that I had removed all references to it, but for some reason I am still getting some log errors:
15:01:41 - 17 Jun
User: Public User (7)
Level: MySource Warning
(/core/include/locale_manager.inc:504) - Asset #7077 does not exist [SYS0087]
Since asset 7077 is no longer in the system, and I have no idea where this error is coming from, is there a way I can search in the database for where this connection might be?
[quote]
We removed and replaced a prominent asset in our system. This was necessary for many reasons that I won't go into. I thought that I had removed all references to it, but for some reason I am still getting some log errors:
15:01:41 - 17 Jun
User: Public User (7)
Level: MySource Warning
(/core/include/locale_manager.inc:504) - Asset #7077 does not exist [SYS0087]
Since asset 7077 is no longer in the system, and I have no idea where this error is coming from, is there a way I can search in the database for where this connection might be?
[/quote]
The most obvious case is getAsset() in asset manager, which is no help to you ;)
The other way would be to look through the database. The most used occurances are:
sq_ast - assetid
sq_ast_lnk - majorid, minorid
sq_ast_attr_val - assetid
sq_ast_lookup - assetid
sq_ast_mdata - assetid, schemaid
sq_ast_lookup_value - value
sq_ast_path - assetid
sq_ast_wflow - assetid, schemaid
sq_shdw_ast_lnk - majorid, minorid
sq_ast_perm - assetid
If the asset is a user, you may need to look through some of those tables for the user id as well.
Searching for asset 67372, 67413 and 67236 return nothing in Matrix. So, it seems like those assets are gone, but somehow it is still referenced in the DB.
Searching for asset 67372, 67413 and 67236 return nothing in Matrix. So, it seems like those assets are gone, but somehow it is still referenced in the DB.
[/quote]
Yeah, majorid is the parent asset and minorid is the child asset. If you have a more recent system, you could try running system_check.php in the script directory, it should warn you of mistakes like these ;) (but it is still up to the user to fix them)
[quote]
Yeah, majorid is the parent asset and minorid is the child asset. If you have a more recent system, you could try running system_check.php in the script directory, it should warn you of mistakes like these (but it is still up to the user to fix them)
[/quote]
We are running 3.24.3, so we don't have that script. Would there be issues if I just grabbed the script from a 3.28.x download and used it on our 3.24.3 system?
If that is not possible, how can I remove these references in the DB to asset 7077, since these Major assets are no where to be found in the Matrix admin interface.
[quote]
We are running 3.24.3, so we don't have that script. Would there be issues if I just grabbed the script from a 3.28.x download and used it on our 3.24.3 system?
If that is not possible, how can I remove these references in the DB to asset 7077, since these Major assets are no where to be found in the Matrix admin interface.
[/quote]
Yes, it should be possible, but you must grab the system_tests directory to go with it. Most of the tests are just Db queries, so they should work on 3.24.
Removing them can be achieved by backing up the database and doing a DELETE sql for those assets.
[quote]
Yes, it should be possible, but you must grab the system_tests directory to go with it. Most of the tests are just Db queries, so they should work on 3.24.
Removing them can be achieved by backing up the database and doing a DELETE sql for those assets.
[/quote]
Ok, ran system_check.php and we have lots of issues. Hundreds of "Asset X was not found on the system", including references to 7077. How does this happen?
And, could you give me an example SQL query to delete an asset in the DB?
[quote]
Ok, ran system_check.php and we have lots of issues. Hundreds of "Asset X was not found on the system", including references to 7077. How does this happen?
And, could you give me an example SQL query to delete an asset in the DB?
[/quote]
It is invalid link entries, on actually how it happens, it could be anything: a bad query, bug in an upgrade, missing upgrade step, bug in a script etc. If your system is old, then entries like this are more likely to occur.
An example query would be something like:
BEGIN;
DELETE FROM sq_ast_lnk WHERE majorid = '%assetid%';
DELETE FROM sq_ast_lnk WHERE minorid = '%assetid%';
COMMIT;
Just be sure you ALWAYS backup your database before playing with database entries
If you want to show what you are deleting before you run the Delete queries, replace the 'DELETE' with 'SELECT *'
[quote]
It is invalid link entries, on actually how it happens, it could be anything: a bad query, bug in an upgrade, missing upgrade step, bug in a script etc. If your system is old, then entries like this are more likely to occur.
An example query would be something like:
BEGIN;
DELETE FROM sq_ast_lnk WHERE majorid = '%assetid%';
DELETE FROM sq_ast_lnk WHERE minorid = '%assetid%';
COMMIT;
Just be sure you ALWAYS backup your database before playing with database entries
If you want to show what you are deleting before you run the Delete queries, replace the 'DELETE' with 'SELECT *'
[/quote]
Thanks Ben,
I have removed these references in the DB, but we are still getting the Asset #7077 does not exist errors. Is there any other way that we could go about finding where this is coming from?
I have removed these references in the DB, but we are still getting the Asset #7077 does not exist errors. Is there any other way that we could go about finding where this is coming from?
[/quote]
Hmm it might be coming from a shadow asset link table. Try using:
SELECT * FROM sq_shdw_ast_lnk WHERE majorid LIKE '7077%' and minorid LIKE '7077%';
[quote]
Hmm it might be coming from a shadow asset link table. Try using:
SELECT * FROM sq_shdw_ast_lnk WHERE majorid LIKE '7077%' and minorid LIKE '7077%';
[/quote]
Nope.
After digging around for hours in the code, and adding stack traces, I found a reference to a design customization. After looking through all my customizations, and I realized it might have previously been a nested asset. And even though no nested content area showed that it was using asset 7077, I figured the DB might still hold a reference. So, I got locks and re-committed a bunch of my nested areas, and, glad to say that seems to have done the trick.
Not sure why it was still thinking it was nesting 7077, but after saving again with it blank, it fixed the issue.