Copied to clipboard

Flag this post as spam?

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


  • Robert Godino 40 posts 129 karma points
    Jan 31, 2017 @ 06:47
    Robert Godino
    0

    MS SQL database changes are not writing back to Umbraco CMS backend

    I’m using Umbraco v4.11.10 and have made bulk changes to member expiry dates via scripts in the MS SQL-server database. However, when I go back to the Umbraco backend, the changes aren’t being shown.

    My bulk changes are being made to the “cms.ContentXml” tables in MS SQL database.

    Is there any way to force or sync the Umbraco CMS backend to show the values in the database? I understand Umbraco writes the data to XML so I deleted the “umbraco.config” file but that doesn’t help.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jan 31, 2017 @ 08:26
    Dan Diplo
    0

    As far as I understand the cmsContextXml table contents gets generated when you publish in Umbraco - so any changes you make to this table via SQL will just get overwritten. (Also, member data isn't stored in this table). The Umbraco database is complex; the raw content is stored across many tables.

    If you really want to make bulk changes to, say, members you should be using the management API services - https://our.umbraco.org/documentation/Reference/Management/Services/ This will ensure the database is updated correctly and changes persisted and published.

  • Robert Godino 40 posts 129 karma points
    Jan 31, 2017 @ 10:51
    Robert Godino
    0

    Hi Dan, that documentation you reference applies to Umbraco 7.1 and 6.2 and newer. I’m on Umb 4.11.10 so not sure if it is valid.

    Also, the actual member parameters that I need to change, <lastLogin> and <expiryDate> are custom field/types added to the backend and they definitely get saved to the “cmsContextXml” database table in MSSQL.

    I might need to get a developer involved with some experience with management API service. To be honest, I’m really not sure what to do with that documentation.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jan 31, 2017 @ 12:01
    Dan Diplo
    100

    Ahh, you are correct - the services I mentioned are really only relevant from Umbraco 6 onward. There is an older API in v4, but it's a lot more basic and not as nice to consume. If I recall, there were classes like Node and Document that could be used.

    But I'm pretty sure that even in v4 the cmsContentXml table is generated from publishing, so any changes will be overwritten. The actual raw data is stored across various tables, like cmsPropertyData and cmsNode etc. and then is transformed in cmsContextXml which is used to generate umbraco.config

Please Sign in or register to post replies

Write your reply to:

Draft