Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mark Bowser 273 posts 860 karma points c-trib
    Feb 13, 2015 @ 20:51
    Mark Bowser
    0

    cmsContentXml not updated when couriering updated images

    I am using Courier v2.7.8.35 on an umbraco v6.1.6 site. I am able to create a new media item, assign an image to the media item, and courier it successfully. Then, I pick the media on a content node with a media picker and courier the content. Then when I update the image file on that media item and re-courier it, everything appears fine on the umbraco back end. The correct image has been deployed. The files (and even the crops) are successfully generated on the destination site. However, the front end of my site still renders the old image.

    Here are some more structured steps to reproduce:

    1. Create new media image node.
    2. Assign an image file to the media image node.
    3. Right click and courier the media node.
    4. Pick the media node on a content node with a media picker. Verify that on your front end of your authoring site, you can see the image rendered on the page.
    5. Courier the content node where you picked your media. Verify that on your front end of your destination site, you can see the image rendered on the page.
    6. Go back into the authoring site, find the media node you added, and choose a new file to upload to that media item. Verify that on the front end of your authoring site, you can see the new image rendered on the page instead of the old one.
    7. Courier the media node to send the updates to the destination site.

    Expected: I would expect to see the new image on the front end of the destination site.

    Actual: I still see the old image on the front end of the destination site. When I go into the media section on the destination site, I can see that the new image is, indeed, present on the site. All of the crops have been generated as well.

    Clues: There were no relevant umbraco logs on the authoring site. When I look in the umbraco logs on the destination site, I get errors like this:

    2015-02-13 11:04:43,930 [5] ERROR umbraco.DataLayer.SqlHelper`1[[System.Data.SqlClient.SqlParameter, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] - [Thread 51] Error executing query select xml from cmsContentXml where nodeID = 3598
    System.ArgumentException: The query didn't return a value.
        at umbraco.DataLayer.SqlHelper`1.ExecuteXmlReader(String commandText, P[] parameters)
        at umbraco.DataLayer.SqlHelper`1.ExecuteXmlReader(String commandText, IParameter[] parameters)
    

    When I look in the destination umbraco database inside of the cmsContentXml table, I find that the cmsContentXml is out of date. The url to the old image is still present and the new url is nowhere to be found. Here is the query I ran to see the data in the cmsContentXml:

    SELECT TOP 1000 *
    FROM cmsContentXml
    WHERE nodeId = 3598
    

    This is the data I found. umbracologo6 was the name of the test image that should have been replaced:

    <Image id="3598" version="6768b8fb-ac34-467e-bc33-4a75e33ac422" parentID="2182" level="3" writerID="0" nodeType="1032" template="0" sortOrder="7" createDate="2015-02-13T11:04:02" updateDate="2015-02-13T11:04:02" nodeName="ATestImage" urlName="atestimage" writerName="admin" nodeTypeAlias="Image" path="-1,2179,2182,3598"><umbracoFile>/media/159409/umbracologo6.jpg</umbracoFile><umbracoWidth>200</umbracoWidth><umbracoHeight>200</umbracoHeight><umbracoBytes>11800</umbracoBytes><umbracoExtension>jpg</umbracoExtension><imageCrops><crops date="2015-02-13T11:04:14"><crop name="Home Marquee" x="0" y="54" x2="200" y2="144" url="/media/159409/umbracologo6_Home Marquee.jpg" /><crop name="Top Menu Feature" x="0" y="43" x2="200" y2="155" url="/media/159409/umbracologo6_Top Menu Feature.jpg" /><crop name="Category Top Image" x="0" y="43" x2="200" y2="155" url="/media/159409/umbracologo6_Category Top Image.jpg" /><crop name="Home Tout" x="0" y="0" x2="200" y2="113" url="/media/159409/umbracologo6_Home Tout.jpg" /><crop name="Blog Thumbnail" x="0" y="0" x2="200" y2="200" url="/media/159409/umbracologo6_Blog Thumbnail.jpg" /></crops></imageCrops><altText></altText></Image>
    

    Anyone know how to work around this? It appears to be a courier bug. Our solution, for the time being, is to never change the images on media items and to always create new ones. Sadly, this negates the reusability of the the media. If we have the "Media Item A" selected on 12 content nodes, and we want to change the image on "Media Item A", we have to create a new "Media Item B" and manually change every content nodes that is currently pointing at "Media Item A" to "Media Item B". This is difficult for non-technical people to do, so it is an unfortunate work around.

    Thanks!

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Feb 15, 2015 @ 17:20
    Paul Sterling
    0

    @Mark

    We addressed this some time ago with a nightly, but haven't gotten the release updated yet.  You can find this fix (and others) included in the 2.7.8.2.RC2 nightly

    http://nightly.umbraco.org/UmbracoCourier/2.7.8/nightly%20builds/

    Let us know if it addresses the issue, or not. 

    I'd also encourage you to report bugs, like this, via the issue tracker.  That way you'll find if you are reporting a duplicate, one that's already been fixed, have more information to add, or if it's a new issue.  Sometimes it's hard to tell the right place to report the issue, but checking isssues is a good way to know if there might be a fix already.

    http://issues.umbraco.org/issues?issueFolder=51-4

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Feb 17, 2015 @ 10:11
    Paul Sterling
    0

    @Mark

    You don't say if the "new" image has the same name as the original - is this the correct path to the new image:  /media/159409/umbracologo6.jpg? If not, could you add some details here around what the new vs. orginal image path is?


  • Mark Bowser 273 posts 860 karma points c-trib
    Feb 17, 2015 @ 17:58
    Mark Bowser
    0

    Thanks, Paul. I will keep that in mind for future posts. However, I am having trouble finding the issue that this is a duplicate of. Can you send me a link directly to it? I have a feeling I'm just not searching using the right wording.

    The new image had a different url like /media/159409/403986_10152072302670422_1344448958_n.jpg. I uploaded an entirely new image. I didn't just upload a change to an existing image. This is why the old image still rendered on the site. The old image was still in the file system along side the new image files in the /media/159409/ directory. The problem is that the cmsContentXml for the media item still referenced the old images file path instead of the new one, so even though the new image files and data were Couriered, the old image still renders on the front end of the site.

    Contents of /media/159409/ on both authoring and destination sites after original media is created and couriered:

    • umbracologo6.jpg
    • umbracologo6_Blog Thumbnail.jpg
    • umbracologo6_Category Top Image.jpg
    • umbracologo6_Home Marquee.jpg
    • umbracologo6_Home Tout.jpg
    • umbracologo6_thumb.jpg
    • umbracologo6_Top Menu Feature.jpg

    Contents of /media/159409/ on both authoring and destination sites after new image is uploaded and couriered:

    • 403986_10152072302670422_1344448958_n.jpg
    • 403986_10152072302670422_1344448958_n_Blog Thumbnail
    • 403986_10152072302670422_1344448958_n_Category Top Image.jpg
    • 403986_10152072302670422_1344448958_n_Home Marquee.jpg
    • 403986_10152072302670422_1344448958_n_Home Tout.jpg
    • 403986_10152072302670422_1344448958_n_thumb.jpg
    • 403986_10152072302670422_1344448958_n_Top Menu Feature.jpg
    • umbracologo6.jpg
    • umbracologo6_Blog Thumbnail.jpg
    • umbracologo6_Category Top Image.jpg
    • umbracologo6_Home Marquee.jpg
    • umbracologo6_Home Tout.jpg
    • umbracologo6_thumb.jpg
    • umbracologo6_Top Menu Feature.jpg

    All of the correct files are couriered from the authoring to the destination site. My problem is that the destination site's cmsContentXml record for the changed media is not updated when data is Couriered.

    Yesterday, I tried a manual deploy of the 2.7.8.2.RC2 bin, config, and umbraco folders over my existing 2.7.8.35. I didn't notice a difference. I will try again today to sanity check myself.

    Thanks

  • Mark Bowser 273 posts 860 karma points c-trib
    Feb 17, 2015 @ 19:32
    Mark Bowser
    0

    The 2.7.8.2.RC2 doesn't appear to help at all.

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Feb 18, 2015 @ 06:24
    Paul Sterling
    0

    @Mark 

    But, based on what you describe above it does appear to work exactly as designed - so a little confused.  

    Perhaps you're just missing a step in the process.  So, to be clear:

    The media item is updated on deploy.  If you view the media item on the target it has been updated.  At this point nothing is changed with contentXml since that only deals with "publish" and media is not published.  (FWIW - I think looking at contentXml as a way to debug can be mis-leading)

    I had assumed you were also deploying the content item that uses the media after having updated it in the source site, but I noted you don't explicitly say that you are.  You need to deploy the containing content in order to fire the publish events that will update the media reference in the published content on the target.  

    There's no other way to do this unless you create a custom event handler for media with Courier.   This is the default behavior of umbraco and using courier it is not any different.

    BTW - here's the issue for reference http://issues.umbraco.org/issue/COU-111

     

  • Mark Bowser 273 posts 860 karma points c-trib
    Feb 20, 2015 @ 23:59
    Mark Bowser
    0

    Hmmm. As a test, I just picked a media item on one of my content nodes and then saved and published the content node. I viewed the page and saw the image I was expecting. I then went to the media section and found the media image I had selected. I uploaded a new image file to that media item. When I viewed the page a second time, I saw the new image. I never had to republish the content node that had picked the media. That is the sort of behavior I was expecting to get from Courier. I am getting it out of the box in umbraco 6.1.6.

    Just to be doubly sure, I queried the cmsContentXml table before and after uploading new files to a media image node and found that the cmsContentXml record updates as if I am publishing the media node even though you cannot explicitly publish media. I agree about using the cmsContentXml table to debug, but in this case it is where the actual problem is manifesting. When I use courier to send updates to a media image's uploaded umbracoFile, if the cmsContentXml is not updated, I do not see the new image that I uploaded on the front end of the umbraco site until I get the cmsContentXml record for that media image to update.

    Thanks for the link to the issue. That is definitely a different issue. In my case, the media node, the media node properties, the files, and the crops are all transferred correctly. However, the record for that media image in the cmsContentXml table is not updated. This results in all content nodes that have picked that media to render the old image instead of the new one that was uploaded to that media image. I am also getting the error logged in the umbracoTraceLog.txt file. I created a new issue in youtrack for this. http://issues.umbraco.org/issue/COU-128

    Thanks!

  • Paul Sterling 718 posts 1534 karma points MVP 9x admin c-trib
    Feb 26, 2015 @ 23:09
    Paul Sterling
    0

    @Mark

    Can we engage directly via your Gold Partner support?  One of us is missing something here as I believe it works as designed, but perhaps I'm missing some kay part of your process.  I'll open a ticket for you from the issue you logged.

    You say you are using the .35 build, but you also see this with the latest v6 release (2.7.8.2.v6) right?

  • Mark Bowser 273 posts 860 karma points c-trib
    Mar 03, 2015 @ 23:26
    Mark Bowser
    0

    Ya, sorry about the miscommunication. I'll follow up with you via Gold Support and will double check the 2.7.8.2.v6 before I do so.

    I appreciate the responsiveness! Thanks!

  • Mark Bowser 273 posts 860 karma points c-trib
    Jul 01, 2015 @ 23:01
    Mark Bowser
    0

    This appears to be resolved in Courier 2.50.1 for Umbraco 7.2.6

Please Sign in or register to post replies

Write your reply to:

Draft