Copied to clipboard

Flag this post as spam?

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


  • Erik Foppen 20 posts 62 karma points
    Feb 11, 2015 @ 14:57
    Erik Foppen
    0

    Content service v6: value set but not visible in Umbraco

    Hello all,

    I'm trying to programmaticaly update the value of a "tags" property via the content service. The updated value is visible on the page and in the database, but it's not visible in Umbraco itself.

    I'm using Umbraco 6.2.0 with this code:

    var artikelViaCs = ApplicationContext.Services.ContentService.GetById(artikel.Id);
    artikelViaCs.SetValue("tags", "ORIGINAL TAG,VIA CS");
    cs.SaveAndPublishWithStatus(artikelViaCs, 0, true);

    And it's updated and visible on the page:

    But I don't see the updated value in Umbraco, even after signing in again:

    Am I doing something wrong? Do I need to force-update the cms somehow?

    Thanks in advance for your help!

    Erik

  • Jan Skovgaard 11264 posts 23593 karma points MVP 9x admin c-trib
    Feb 11, 2015 @ 15:57
    Jan Skovgaard
    0

    Hi Erik and welcome to our :)

    Is the debug attribute in the web.config file set to true? If not then try setting it to true - It should make sure Umbraco does not cache things too hard while in development mode.

    Hope this helps.

    /Jan

  • Erik Foppen 20 posts 62 karma points
    Feb 11, 2015 @ 17:33
    Erik Foppen
    0

    Thanks Jan,

    unfortunately that didn't help. But I did manage to get it updated in umbraco as well, by combining my code with some old school cms.businesslogic:

    cms.businesslogic.Tags.Tag.AddTagsToNode(nodeId, tag, _group);

    That did the trick!

    Erik

Please Sign in or register to post replies

Write your reply to:

Draft