Copied to clipboard

Flag this post as spam?

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


  • Tor-Erik Klausen 12 posts 44 karma points
    Jul 31, 2013 @ 15:12
    Tor-Erik Klausen
    0

    Values are not inserted (Umbraco 6.1.3)

    I can't get Standard Values to work. I see the tree in the Settings section and I can edit the values, but when I create a new node in Content the defined values are not entered, exactly as if Standard Values was not installed.

    I've tred reinstalling, restarting IIS Express and cursing, but nothing helps. Is there any log I can check to see why it is not working?

  • Tor-Erik Klausen 12 posts 44 karma points
    Aug 12, 2013 @ 17:44
    Tor-Erik Klausen
    0

    Today I tried an empty install using Web Matrix. The only change I made was changing it to use MVC templates instead of WebForms, still nothing.

    Unless somebody has any ideas I guess the next thing to do is download the source and add some logging so I can perhaps figure out where it fails.

  • Tor-Erik Klausen 12 posts 44 karma points
    Sep 11, 2013 @ 21:41
    Tor-Erik Klausen
    0

    I've finally found a solution to this problem. By calling the Save method on the ContentService at the end of Sitereactor.StandardValues.Events.InsertStandardValueInDocument.

    My updated InsertStandardValueInDocument looks like this:

    public class InsertStandardValueInDocument : ApplicationBase
    {
        public InsertStandardValueInDocument()
        {
            ContentService.Created += ContentService_Created;
        }
    
        void ContentService_Created(IContentService sender, Umbraco.Core.Events.NewEventArgs<Umbraco.Core.Models.IContent> e)
        {
            var content = e.Entity;
    
            var repository = new Repository();
            if(repository.NodeExists(content.ContentTypeId) == false)
                return;
    
            var service = new Service(repository);
            service.SetStandardValueProperties(sender, content);
            sender.Save(content);
        }
    }
    

    I don't know if this the correct way to solve the problem, but it works (at least in Umbraco 6.1.5).

  • Connie DeCinko 931 posts 1160 karma points
    Jan 13, 2016 @ 18:17
    Connie DeCinko
    0

    Tor, were you able to get this to work on Umbraco 6.2.5? I cannot even get the folder to display.

  • Tor-Erik Klausen 12 posts 44 karma points
    Jan 14, 2016 @ 19:22
    Tor-Erik Klausen
    0

    We have pretty much stopped using StandardValues so I've never tried it on 6.2.5

  • Connie DeCinko 931 posts 1160 karma points
    Jan 22, 2016 @ 20:22
    Connie DeCinko
    0

    So is no one needing to set default values anymore? Any other packages out there?

  • Fergus Davidson 309 posts 588 karma points
    Jan 28, 2014 @ 12:26
    Fergus Davidson
    0

    is there an update that includes this fix? i have the same problem.

Please Sign in or register to post replies

Write your reply to:

Draft