Trying to think why it would stop working. Looking at your XSLT, it is possible for 'GetMediaByUrlName' to return a collection of media nodes - if you have multiple media with the same name?
Can't help tonight - sorry ... will have a think about what the problem might be.
Last guess for this evening... try re-saving the media node (in the back-office) for "s1011-0000", then try the XSLT again ... gut feeling is that the "cmsContentXml" table in the database has been cleared out (for whatever reason).
Just checked our repo - there were no changes to that method since v3.x. Although a underlying call is made to the core (uQuery) ... I'll dig a little deeper, see if there is anything strange going on.
Strange indeed! The GetMediaByUrlName queries the XML for all the media items ... it could mean that the cmsContentXml tables were cleared in the database? (not sure how or why, and don't expect you to know ... just thinking out loud)
Do let me know if you find any errors, etc - anything that can help figure out how to pinpoint the issue.
Suddenly GetMediaByUrlName stopped working
I have a media where id is 2041 and urlName is s5090-1459.
Suddenly GetMediaByUrlName stopped working and doesn't give any output.
It worked at 16:00 but now $media is just empty.
GetMedia works just as it should.
Is this related to a v4 -> v5 upgrade? or did it just stop working?
It isn't related to the upgrade.
I actually upgraded in the hopes that it would be fixed :)
It stopped working under v4 and upgrading to v5 didn't help.
Trying to think why it would stop working. Looking at your XSLT, it is possible for 'GetMediaByUrlName' to return a collection of media nodes - if you have multiple media with the same name?
Try changing the variable's XPath slightly...
Cheers, Lee.
Nope. $media is still empty
You can see the complete XSLT here:
http://dl.dropbox.com/u/145581/productcategory.xslt ;
Doh! Sorry... I'm thinking in C# again - zero-based indexes. #h5is Try changing it to "[1]".
No.
I've updated the XSLT with a static urlName that I know for sure only exists once. :) Just to be sure.
Try...
Obviously, this is all guess-work from me. Still seems weird that the function suddenly stopped working.
Didn't have any effect.
I can give you access to the solution if that would help you.
Can't help tonight - sorry ... will have a think about what the problem might be.
Last guess for this evening... try re-saving the media node (in the back-office) for "s1011-0000", then try the XSLT again ... gut feeling is that the "cmsContentXml" table in the database has been cleared out (for whatever reason).
Cheers, Lee.
I'll try that ... thanx.
Naaa ... that didn't work either.
This is quite odd.
Hi Lee,
Now we got the problem again. Is there any changes from uComponents 5.0 -> 5.3?
Hi Anders,
Just checked our repo - there were no changes to that method since v3.x. Although a underlying call is made to the core (uQuery) ... I'll dig a little deeper, see if there is anything strange going on.
Which version of Umbraco are you using?
Cheers, Lee.
Thanks Lee,
I'm running Umbraco v 4.11.3 and uComponents 5.3
Cheers
FYI: Now all images are back. Very strange …
Strange indeed! The GetMediaByUrlName queries the XML for all the media items ... it could mean that the cmsContentXml tables were cleared in the database? (not sure how or why, and don't expect you to know ... just thinking out loud)
Do let me know if you find any errors, etc - anything that can help figure out how to pinpoint the issue.
Cheers, Lee.
is working on a reply...