Copied to clipboard

Flag this post as spam?

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


  • Geoff 19 posts 89 karma points
    May 05, 2017 @ 09:03
    Geoff
    0

    Unexpected uSync behaviour - imported content not being displayed on the web front end

    Hi,

    In our Production Umbraco platform (version 7.5.12) we have an instance of the application running in an Azure VM in IIS that we use exclusively for authoring, and an Azure web app Umbraco instance that is used for the public site WFE. Both sites point to the same database. uSync is installed in both instances (although we only use it on the authouring instance) and in both cases it is configured to write changes to disk only. We take a backup of the uSync/data/content directory from the authoring site every night that we use to refresh the content in our development environments.

    Recently we needed to restore one of these backups back to Production. We copied the files back to the usync/data/content directory on the authoring site and used the uSync back office to import the content into the database. When we browsed the new content on the authoring site it all looked as expected, but curiously the public site continued to show the old content. Furthermore, if we made a change to a page via the authoring site then this was immediately reflected on the public site but alongside the old content for rest of the page. This told us that there was no issue with the public site being able to read the database or detect changes. Ultimately, in order to get the public site to display the changes we had imported into the database via uSync, we had to republish all the affected pages from the back end of the public site web app.

    Can anyone tell me if this is expected behaviour and if so how do we manage uSync so we can import content via one Umbraco instance and have it immediately available on a second instance without having to republish the pages on the latter.

    Thanks.

  • Marc Goodson 2141 posts 14344 karma points MVP 8x c-trib
    May 06, 2017 @ 10:52
    Marc Goodson
    0

    Hi Geoff

    Whilst Umbraco ultimately stores the content in your pages in a database, this isn't where content is displayed from.

    In your app_data folder you have a file called umbraco.config it is referred to as the Umbraco cache file.

    this contains the 'published' versions of your content items, and the file is stored in memory, which is why pages load reasonably quickly in Umbraco (there aren't any database requests to pull the content).

    When you publish an item from the Umbraco backoffice, this xml file is updated on disc and in memory.

    Your uSync import of content is Only updating the database, hence the need to publish to trigger the update of the xml cache file, and change what is displayed on the website.

    There is a url you can call which will cause your site to rebuild it's Xml Cache file, and you can do this after your uSync import to update the site's content to your imported snapshot:

    /umbraco/dialogs/republish.aspx?xml=true

    if that helps?

    regards

    Marc

  • Geoff 19 posts 89 karma points
    May 09, 2017 @ 07:28
    Geoff
    0

    Hi Marc,

    Thanks for your explanation. This all makes perfect sense to me now.

    Cheers,

    Geoff

Please Sign in or register to post replies

Write your reply to:

Draft