I upgraded to Umbraco 4.9.1 last week and since then on 2 DAMP media pickers the chosen images have disappeared from the media picker and we have had to reselect them.
This did not happen at the same time as the upgrade and I can't see any logic to it.
Is this a known issue and are there any steps I can take to trace the cause of the issue?
Sorry I don't have a solution yet. I think it's related to MNTP, but I haven't been able to reproduce it. If you have any more info or could try to debug it that might help :-).
DAMP isn't related to uComponents, but when I created DAMP I used some functions (like the start node) from MNTP. They work in the same way and that might give conflicts (but I'm not sure). If you can somehow reproduce when the images disappear and debug what happens that would be useful information.
The problem is we only notice when we look at the page and that is not necessarily when the data vanished. All I know is that in umbraco.config there is an empty XML section with only an empty CDATA section inside it.
Nope, didn't do anything. I guess I will just have to keep an eye on things.
One additional problem this threw up was that when the homepage lost it's media items the razor script I was using threw an error. Why would this not work if there was no media item present?
Our customer has the same problems. They have 2 DAMP selectors on a product node but sometimes the nodes throws their selected items and we have to reselect them.
They say its sometimes when they unpublish/re-publish/saves a node, but on our local instance i cannot reproduce this in any situation. Its like a hiccup happening sometimes.
And this customer is running 4.7.2, danp 2.0, ucomp 3.1.1.
I posted this last week when entire documents were vanishing from the front end though were marked as published in front end. Not sure if the 2 could be related:
The problem reported to us was that pages (documents) were disappearing, not the actual images---although, it seems like you're saying the same thing, even though the title of this particular thread seems to be about disappearing images not pages...
I don't know if there is a connection. All I know is I've never had documents vanish from the front end before and this has happened a few times. Someone else reported the same problem on a vanilla install with only DAMP installed so I just wanted to flag it up to see if it helps resolve either issue.
I've had a couple of emails about the problem. Here are some parts of it:
Part 1 with info
Niels Hartvig have done some debuging on the Unique.dk site regarding images been dropped.
Niels says that it is related to Damp, because all the other datatypes still got data.
He says "something" is happing in DataBindMedia() metode inDAMPs user control around this line XDocument xmlDocument = DigibizMediaHelper.GetXML(ids);"
Eg [from the log]:
656494 0 -1 2013-01-23 16:34:16.347 Error Exception: Umbraco Exception (DataLayer): SQL helper exception in ExecuteXmlReader - StackTrace: at umbraco.DataLayer.SqlHelper`1.ExecuteXmlReader(String commandText, IParameter[] parameters) at DigibizTree.DigibizMediaHelper.GetMediaElements(String id) at DigibizTree.DigibizMediaHelper.<GetXML>b__0(String id) at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext() at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content) at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content) at DigibizTree.DigibizMediaHelper.GetXML(String[] ids) at DigibizAdvancedMediaPicker.DigibizAdvancedMediaPicker.DataBindMedia(List`1& mediaItemsList) at DigibizAdvancedMediaPicker.DigibizAdvancedMediaPicker.get_Value() - InnerException: The query didn't return a value. - InnerStackTrace: at umbraco.DataLayer.SqlHelper`1.ExecuteXmlReader(String commandText, P[] parameters) at umbraco.DataLayer.SqlHelper`1.ExecuteXmlReader(String commandText, IParameter[] parameters)
DAMP are looking for media xml directly from the DB (ie without the API, ie. Around Umbracos 'responsibility') and nothing left. So there is a null error in DAMP and it dies.
The problem * may * be that an editor is to create an image while, but DAMP check that is not on the data the query to actually excites. Which you probably should when you are querying data outside Umbracos API.
So concretely, the error in DigibizMediaHelper
The method GetXML who calls DAMP method GetMediaElements (ID) who saw in this line:
XDocument xmlDocument = XDocument.Load(SqlHelper.ExecuteXmlReader("select xml from cmsContentXml where nodeID = " + mediaId.ToString()));
… not have any validation of the SQL data the query on ie. if there is an error in just one of the pictures, so crashes DAMPbut because it absorbs errors as you see it.
So as Niels says:
The fault lies 100% in ADHD
Part 2 with reaction
This info is very valuable. Thanks! I updated the GetMediaElements method so it now has a backup when the SQL query fails. In DAMP 1.0 I used the Umbraco API, but that sometimes gave some cache problems so in DAMP 2.0 I switched to some custom code. Now if the SQL query fails it tries to fetch the media item with the API. If that fails only that media item isn't saved, but all others are so you won't lose all images.
After these emails I made a couple of more changes and it now always checks if a media item exists. If it doesn't that media item is skipped and it makes sure no other images are dropped.
It might be possible that I removed the fix again in later versions because it was fixed in the Umbraco core itself. So if you're using an older version of Umbraco you might still have this problem in DAMP 2.8. This is the Umbraco issue: http://issues.umbraco.org/issue/U4-1772. So it's fixed since 4.11.9 and 6.0.6.
It's a 4.7.0 solution, and it's close to impossible to upgrade.
I took a look in the bin folder, and the "last updated" dates on the files DigibizTree.dll and DigibizAdvancedMediaPicker.dll was from 2012, so it lookas as if they did not update when I installed 2.8.
I manually uploaded them from the package file, and that seems to have fixed the issue, I cannot seem to recreate it again.
But if the fix is gone, then it might be wiser to install an earlier version instead like 2.5 or 2.6. I'm working on a test solution so it's not fixed on the live solution yet.
DAMP Images disappearing in Umbraco 4.9.1
I upgraded to Umbraco 4.9.1 last week and since then on 2 DAMP media pickers the chosen images have disappeared from the media picker and we have had to reselect them.
This did not happen at the same time as the upgrade and I can't see any logic to it.
Is this a known issue and are there any steps I can take to trace the cause of the issue?
Thanks
Dan
There are other people who had this problem, but I'm not sure yet why this happens: http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker/digibiz-advanced-media-picker/32467-Slides-disappears-when-switching-hostnames.
Jeroen
How odd. So no solution yet? Well there 2 sites on 1 installation that have the problem, and 2 where there is no problem:
Sorry I don't have a solution yet. I think it's related to MNTP, but I haven't been able to reproduce it. If you have any more info or could try to debug it that might help :-).
Jeroen
So are you saying that the DAMP media picker uses the uComponents MNTP? Should I post this onto the uComponents forum?
If you can give me any debugging requests I can get you any additional info you might need to help resolve it.
DAMP isn't related to uComponents, but when I created DAMP I used some functions (like the start node) from MNTP. They work in the same way and that might give conflicts (but I'm not sure). If you can somehow reproduce when the images disappear and debug what happens that would be useful information.
Jeroen
The problem is we only notice when we look at the page and that is not necessarily when the data vanished. All I know is that in umbraco.config there is an empty XML section with only an empty CDATA section inside it.
I have run this a few times over the past few days:
/Umbraco/dialogs/republish.aspx?xml=true
How would that effect things?
I don't know if that could effect things. It might, but you'll only find out by testing.
Jeroen
Nope, didn't do anything. I guess I will just have to keep an eye on things.
One additional problem this threw up was that when the homepage lost it's media items the razor script I was using threw an error. Why would this not work if there was no media item present?
if(Model._image != null){
dynamic mediaItems = Model._image.mediaItem;
That's related to Razor. If no value is available it won't be null, but DynamicNull. You can find more info about it here: http://umbraco.com/follow-us/blog-archive/2011/3/13/umbraco-razor-feature-walkthrough-part-5.aspx.
If you use my DAMP Razor model you can always do a .Count > 0 on it.
Jeroen
Our customer has the same problems. They have 2 DAMP selectors on a product node but sometimes the nodes throws their selected items and we have to reselect them.
They say its sometimes when they unpublish/re-publish/saves a node, but on our local instance i cannot reproduce this in any situation. Its like a hiccup happening sometimes.
And this customer is running 4.7.2, danp 2.0, ucomp 3.1.1.
I will upgrade them asap as 4.11 hits.
I would love to fix this, but until I can really reproduce this it's not going to be easy.
Jeroen
Hey Rasmus,
Did you find a solution?
I think a got issuu. It randomly drop images on save/publish.
Hey Anders :)
I havnt found a solution but we havent experienced the bug in a while. And for us it was also on save/publish.
The customer havnt had the issue for a long periode aswell :/ Its kinda hard to reproduce it.
Is there some sort of logging those of us who have experienced can add in which might help solve this?
It hasn't happened in a few weeks but I'm not convinced it's fixed itself.
It might happen when multiple editors are working on the same node, but I haven't been able to reproduce that. Anyone else who can confirm this?
Jeroen
We can try.
So if i create an extra user and login, edit some in the same node as im doing with my admin user and then save it.
ill try it later today
I tried it but cannot force it to happen
I posted this last week when entire documents were vanishing from the front end though were marked as published in front end. Not sure if the 2 could be related:
http://our.umbraco.org/forum/core/general/37325-Documents-disappearing-from-front-end-in-411
And now someone has commented on the other thread that they have a vanilla install with only DAMP as well. Beginning to think the two are connected:
http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker/digibiz-advanced-media-picker/35795-DAMP-Images-disappearing-in-Umbraco-491
Hey Dan,
The problem reported to us was that pages (documents) were disappearing, not the actual images---although, it seems like you're saying the same thing, even though the title of this particular thread seems to be about disappearing images not pages...
I don't know if there is a connection. All I know is I've never had documents vanish from the front end before and this has happened a few times. Someone else reported the same problem on a vanilla install with only DAMP installed so I just wanted to flag it up to see if it helps resolve either issue.
When I say someone else, I see I mean you Funkal!
I've released DAMP 2.5 in which this should be fixed. So no more images disappearing :-).
Jeroen
Fantastic. So out of interest, what was the problem?
I've had a couple of emails about the problem. Here are some parts of it:
Part 1 with info
Part 2 with reaction
This info is very valuable. Thanks! I updated the GetMediaElements method so it now has a backup when the SQL query fails. In DAMP 1.0 I used the Umbraco API, but that sometimes gave some cache problems so in DAMP 2.0 I switched to some custom code. Now if the SQL query fails it tries to fetch the media item with the API. If that fails only that media item isn't saved, but all others are so you won't lose all images.
After these emails I made a couple of more changes and it now always checks if a media item exists. If it doesn't that media item is skipped and it makes sure no other images are dropped.
Jeroen
Wasn't this fixed in DAMP 2.5?
We are seeing this issue on a solution, and we've upgraded to DAMP 2.8, but can still recreate it. Images are disappering when saving a node.
Anyone has any ideas on how to solve it.
Hello,
It might be possible that I removed the fix again in later versions because it was fixed in the Umbraco core itself. So if you're using an older version of Umbraco you might still have this problem in DAMP 2.8. This is the Umbraco issue: http://issues.umbraco.org/issue/U4-1772. So it's fixed since 4.11.9 and 6.0.6.
Jeroen
It's a 4.7.0 solution, and it's close to impossible to upgrade.
I took a look in the bin folder, and the "last updated" dates on the files DigibizTree.dll and DigibizAdvancedMediaPicker.dll was from 2012, so it lookas as if they did not update when I installed 2.8.
I manually uploaded them from the package file, and that seems to have fixed the issue, I cannot seem to recreate it again.
But if the fix is gone, then it might be wiser to install an earlier version instead like 2.5 or 2.6. I'm working on a test solution so it's not fixed on the live solution yet.
Do you know for sure that it is gone in 2.8?
The fix is in DAMP 2.6. It's been too long ago so I don't know if it's still in DAMP 2.8. You can check the change log: http://damp.codeplex.com/SourceControl/list/changesets
Jeroen
Well it does not say that it has been removed since 2.8, so I'll assume that the fix is still present in 2.8.
Which also makes sense as I know have upgraded on th live solution, and it seems to fix the issue.
Thanks for some quick answers.
is working on a reply...