Copied to clipboard

Flag this post as spam?

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


  • Robby Cowell 20 posts 103 karma points
    Jan 30, 2014 @ 10:45
    Robby Cowell
    0

    Triggers don't seem to be firing

    Hi. I'm trying to get a basic site running which demonstrates Spindoctor's functionality.

    I have a homepage which links to two pages, depending on which of the links the user clicked, one of three nodes should be rendered, one for the first, one for the second, and a default node which is rendered upon the first visit.

    In Spindoctor I have created two segments, one for each choice with a lifetime of 1 day. I then created two actions which set the user segment depending on the choice made by the visitor:

    Action Settings

    I then created two triggers, again one for each choice. These are setup to trigger the respective actions upon a visit to the choice page:

    Trigger Setup

    Finally, I setup the 'Colour' content selector which should return either one of two dynamic nodes when visiting the homepage, or the default one if no segment is assigned:

    Content Selector Setup

    My homepage view consists of the following:

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
        var sdContent = Umbraco.Spindoctor().SelectSingleNode("Colour");
    
    }
    
    @Umbraco.Field("title", insertBefore: "<p>", insertAfter: "</p>")
    
    @Umbraco.Field("mainContent", insertBefore: "<p>", insertAfter: "</p>")
    
    <h2>Choice-specific content</h2>
    
    <h3>@sdContent.GetPropertyValue("title")</h3>
    
    <p>@sdContent.GetPropertyValue("mainContent")</p>
    

    I'm using the free version (2.0.5.1) from http://www.spindoctorhq.com/download/ running on a local IIS.

    Whenever I visit the homepage, no matter how many times I visit one of the choice pages, the default content node is always returned. Does anyone have any ideas why the triggers aren't firing or why visits aren't being assigned to the segments correctly? Any help would be greatly appreciated.

  • SpindoctorBT 33 posts 124 karma points
    Jan 30, 2014 @ 18:35
    SpindoctorBT
    0

    Hi Robert,

    your model looks fine.

    From your second screenshot it seems that you have not added a (free) developer license for domain "localhost".

    Can you confirm that assumption?

    Thanks,

    Wouter

  • Robby Cowell 20 posts 103 karma points
    Jan 31, 2014 @ 09:59
    Robby Cowell
    0

    Hi Wouter,

    Yes, I can confirm that I do not have a free developer license. When I go to register for a developer license, in the 'Licensed domain' field, I enter 'localhost', and a message appears saying 'You have chosen an invalid domain'.

    enter image description here

    Do I need to setup an online domain to use it?

    Thanks,

    Robert

  • Robby Cowell 20 posts 103 karma points
    Jan 31, 2014 @ 10:49
    Robby Cowell
    0

    OK, quick update, using 'mysite.localhost' worked and I have obtained a developer license key. Have entered it into a new licensed domain which has validated. However the same problem mentioned above is still occurring.

  • Robby Cowell 20 posts 103 karma points
    Feb 07, 2014 @ 12:07
    Robby Cowell
    100

    OK, problem solved.

    After obtaining a free developer license for "mysite.local" I had to configure my hosts file to serve the local site on "mysite.local" rather than "localhost:80".

    It's all working as it should now, thanks for your help.

Please Sign in or register to post replies

Write your reply to:

Draft