Copied to clipboard

Flag this post as spam?

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


  • Nathan Skidmore 63 posts 251 karma points c-trib
    Sep 23, 2015 @ 09:05
    Nathan Skidmore
    2

    Bulk content updates not appearing in backoffice

    Hi,

    I am using Umbraco 7.2.0 and I need to perform a bulk update on a large number of content items. There is an external URL hard-coded in html content across hundreds of pages (nodes) and this URL needs to be replaced with an alternative.

    I have written a SQL script to perform the changes to the database and applied the change to the cmsContentXml table with success. I deleted the App_Data/umbraco.config file, then I restarted the App Pool for the website and reloaded the site. The umbraco.config file was regenerated and the database changes were applied to the config file.

    If I load a webpage of where the changes were applied, the change is visible on the front-end, therefore the change has worked and is visible on the website.

    However when I login to the backoffice, the changes have not been applied there. The content is the same in the backoffice as it was before the changes. I have also tried clearing out my browser cache but nothing changes.

    Therefore if a content editor publishes a page, the changes I made to the database and the umbraco.config file are overridden with the content from the backoffice, putting me back where I started.

    Is there an 'in-memory' cache that needs to be cleared? If so, how can I do this?

    Note that this is happening in the Richtext editor. Is this a TinyMCE caching problem?

    Where am I going wrong here?

    With thanks,

    Nathan

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Sep 23, 2015 @ 13:22
    Alex Skrypnyk
    101

    Hi Nathan,

    Are you sure that data is stored in cmsContentXml table?

    As I know cmsPropertyData table is storing property data.

    Thanks,

    Alex

  • Nathan Skidmore 63 posts 251 karma points c-trib
    Sep 23, 2015 @ 16:15
    Nathan Skidmore
    0

    Alex,

    Spot on. Big oversight on my part. Because the front-end output is stored in the cmsContentXml table I assumed that was where the actual underlying property data was stored. I was wrong.

    Thank you for pointing this out, I was just about to give up on this.

    :)

  • Comment author was deleted

    Mar 17, 2016 @ 21:00

    Nathan,

    I'm attempting something similar in my site, but have updated the cmsPropertyData table, but not cmsContentXml.

    Essentially my changes aren't picked up until I manually publish the nodes again.

    Any chance you can give me a nudge in the right direction for populating cmsContentXml via SQL? Was there a stored proc somewhere within Umbraco that you used?

  • Nathan Skidmore 63 posts 251 karma points c-trib
    Mar 18, 2016 @ 08:47
    Nathan Skidmore
    0

    In the end I'm pretty sure I didn't update the cmsContentXml table at all.

    I just made the changes to the cmsPropertyData table and then Republished the entire website. You don't need to publish the actual nodes, just the cache I believe.

    Click on the three dots next to CONTENT from the Umbraco menu (above the site). Then click ‘Do something else’, then click ‘Republish entire site’. Note that all this will do is refresh the website cache. It doesn't actually republish anything, therefore all the unpublished pages will remain unpublished. The process takes only a few seconds.

    Thanks,

    Nathan

  • Chris Mahoney 242 posts 454 karma points
    Jul 29, 2021 @ 21:00
    Chris Mahoney
    0

    I know this is five years old, but since this thread shows up at the top of search results...

    By default, going to "Republish entire site" won't update cmsContentXml (at least in Umbraco 7.12). The trick is to go to /umbraco/dialogs/republish.aspx?xml=true so that it updates everything. This takes a couple of minutes to run instead of just a few seconds.

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    May 19, 2016 @ 20:37
    Chris Houston
    1

    Just in case anyone else comes across this thread, if you are looking to do this programmatically in Version 7 of Umbraco you can use the ContentService as described in the documentation section.

    .RebuildXmlStructures(params int[] contentTypeIds)
    

    Rebuilds all xml content in the cmsContentXml table for all documents matching the IDs passed in. If none then rebuilds the structures for all content.

Please Sign in or register to post replies

Write your reply to:

Draft