Copied to clipboard

Flag this post as spam?

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


  • Busra Sengul 9 posts 112 karma points MVP 4x c-trib
    Mar 21, 2023 @ 08:55
    Busra Sengul
    0

    Propgramatically updating doctypes and content doesn't update contentXml table

    Has anyone came across db update issue?

    More specifically, I'm using umbraco v7.7, I update existing properties programmatically, change datatypes and update their content accordingly, with valid json. I save and publish with status on published nodes and just save on unpublished nodes. I can see the content successfully updated in the backoffice but contentXml table doesn't get updated. I also tried to just save and then publish seperately also publish with status as well, didin't work. I've tried republishall, buildXmlcache and rebuildXMLstructure from the content service after updating every node and also each node. No luck there at all. The only thing works is manually publishing the nodes. Then it saves to the db. I tried deleting temp folder and umbraco.config file didn't work. Healthcheck doesn't work. Tried truncating the contentxml table then run healthcheck, no luck there either. changed the number on good old Clientdependency, nope no luck. Cannot see anything related when I search for this issue either.

    Is there anything else I can try?

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Mar 21, 2023 @ 17:00
    Marc Goodson
    0

    Hi Busra!

    (If you are changing Document Types via SQL you'll need to do an app pool recycle before Umbraco sees the updated types...)

    But if it i just the contentXML table you need to update then

    If you visit the magic url

    https://www.yoursite.com/umbraco/dialogs/republish.aspx?xml=true

    and press the green 'Republish entire site' does that rebuild the contentXml table?

    Essentially for speed purposes, in V7, the Umbraco Cache file (just an XML file) builds itself if it is missing from memory from this database table, but this database table only gets updated when individual items get published.

    When you Republish entire site, etc it's not updating this table, but using this table to build the cache.

    With xml=true, I think it should rebuild the contentXML table too, or at least that is my vague memory....

    regards

    Marc

  • Busra Sengul 9 posts 112 karma points MVP 4x c-trib
    Mar 22, 2023 @ 09:08
    Busra Sengul
    0

    Hey Marc!

    Thank you so much.

    Although /umbraco/dialogs/republish.aspx?xml=true still didn't update the contentXml table.

  • Marc Goodson 2157 posts 14431 karma points MVP 9x c-trib
    Mar 22, 2023 @ 12:11
    Marc Goodson
    0

    HI Busra

    Hmmm, in the olden days that used to do that...

    similarly, /umbraco/dialogs/republish.aspx?previews=true would rebuild the cmsPreviewXml table...

    Other things that should trigger it to update is if you 'rename' a Document Type in the backoffice, and save, that should rebuild the ContentXML for that particular document type.

    Also in the old olden days, you could delete the app_data/umbraco.config published cache file and the contents of the contentXML database table, and restart the application, and Umbraco would rebuild it all from scratch... (but do back up first, if you have reached this point of recklessness)

    regards

    Marc

Please Sign in or register to post replies

Write your reply to:

Draft