Copied to clipboard

Flag this post as spam?

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


  • Ismael 65 posts 337 karma points
    Apr 06, 2017 @ 23:25
    Ismael
    0

    Extra relation entry when saving unpublished document.

    Not too sure if this is a bug or just a configuration issue by me.

    On umbraco 7.5.4 I'm using a LucenePrefetchListPicker with the relationship option set. The save format is CSV (not sure if that matters)

    The idea is to create a relation between a Project page and a Person page, so that when viewing a Person Page I can show all the projects they are involved in.

    The picker sits on the Project Page which allows you to select a Person.

    This works fine - however if the Project Page was previously published, then switched to unpublish, then saved (or save and publish) an additional entry appears in the umbracoRelation table, the comment field contains "-1" for the propertyTypeId and Data Type definition id.

    <RelationMapping PropertyAlias="people" PropertyTypeId="-1" DataTypeDefinitionId="-1" />
    

    This then causes a duplication when querying for the projects related to a person.

    I can deal with this by checking the comments field and excluded any with "-1" but it doesn't seem ideal.

    Thanks.

    Ismael.

  • Hendy Racher 859 posts 3821 karma points MVP admin c-trib
    Apr 07, 2017 @ 08:43
    Hendy Racher
    0

    Hi Ismael, this does sound like a bug, perhaps it's related to this issue ?

  • Ismael 65 posts 337 karma points
    Apr 09, 2017 @ 19:17
    Ismael
    0

    Yeah, sounds very similar, so when a document is in an unpublished state you can't get the context when saving?

    I guess I'll need to stick with my workaround for now.

    Thanks.

  • Hendy Racher 859 posts 3821 karma points MVP admin c-trib
    Apr 09, 2017 @ 19:27
    Hendy Racher
    0

    Hi Ismael,

    This has now been fixed and will be in the v1.6.0 release - you can also find it in the latest build.

    Thanks, Hendy

  • Ismael 65 posts 337 karma points
    Apr 09, 2017 @ 19:31
    Ismael
    100

    I noticed you made a change so I just tried with the nupicker 1.6.0 alpha build and it seems to have fixed this particular scenario - the "-1" relations are no longer saved when saving an unpublished document.

    Thanks again!

Please Sign in or register to post replies

Write your reply to:

Draft