Copied to clipboard

Flag this post as spam?

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


  • Trish 9 posts 31 karma points
    Dec 15, 2015 @ 11:07
    Trish
    1

    XML Checkbox Picker not displayed on Unpublished pages

    Hi,

    I think I may have discovered a bug - the XML Checkbox Picker does not display on Unpublished pages.

    It is displayed on a new (not yet saved) page and it is displayed on a Published page but if you only Save and don't publish or Unpublish a published page then the checkboxes disappear. It doesn't make a difference whether they were selected to start with or not.

    New page not yet saved new page

    Published Page new page

    Unpublished Page unpublished page

    We're using Umbraco version 7.3.4 and nuPickers version 1.5.2 I've tried Chrome and IE11 (just in case it was a browser issue).

    Is anyone else having this issue?

    Thanks, Trish

  • Chriztian Steinmeier 2697 posts 8105 karma points MVP 3x admin c-trib
    Dec 15, 2015 @ 11:13
    Chriztian Steinmeier
    1

    Hi Trish,

    This is most likely due to the XPath used to select the items - you can only lookup published content in XML; but, you can use a couple of variables to be able to circumvent this behavior.

    What does your XPath look like?

    /Chriztian

  • Trish 9 posts 31 karma points
    Dec 15, 2015 @ 11:19
    Trish
    1

    Hi Chriztian,

    Thanks for the very quick reply!

    This is one of the XPaths

    $ancestorOrSelf/ancestor-or-self::Homepage/Configuration/StaffSpecialismList/StaffSpecialism[@isDoc]

    Thanks, Trish

  • Hendy Racher 859 posts 3821 karma points MVP admin c-trib
    Dec 15, 2015 @ 11:20
    Hendy Racher
    0

    Hi Trish,

    Can you post your configuration XPath, and example tree ?

    The Xml data-source (defaults) to using the Umbraco cached XML data of published content, so if the XPath query uses the current unpublished page, then it won't yet be in cache.

    However, you can use the $ancestorOrSelf token to find the nearest published node - or you could swap to a different data-source such as the Lucene CheckBox Picker, as the Lucene index can contain details of unpublished Pages.

    HTH, Hendy

  • Jonny Irwin 91 posts 153 karma points
    Dec 22, 2015 @ 10:13
    Jonny Irwin
    0

    Our Xpath (given by trish above), works fine on new pages before they are published, and the xpath uses $ancestorOrSelf to get to the homepage which is published (as are the other pages mentioned in the xpath).

    If we were to try a different picker e.g. the LucenePicker, is the data stored in the db differently i.e. would our client have to update their pages everywhere this is used?

    Thanks very much for your help!!

  • Hendy Racher 859 posts 3821 karma points MVP admin c-trib
    Dec 22, 2015 @ 14:14
    Hendy Racher
    0

    Hi Jonny,

    Not sure I understand - if the XPath is working fine on pages before they are published, then all's good right ?

    The Lucene pickers use Lucene as their data-source instead of the Umbraco XML cache. I think the default Lucene indexes created by Umbraco contain all nodes whether they are published or not.

    Thanks, Hendy

  • Jonny Irwin 91 posts 153 karma points
    Dec 22, 2015 @ 14:18
    Jonny Irwin
    1

    When you create a page the checkboxes appear, but as soon as you save the page for the first time (& don't publish it), then the checkboxes dissappear and you can no longer set any values.

    If you create a new page & then do a "save and publish", then you can continue to use the checkboxes.

    Thanks!

  • Hendy Racher 859 posts 3821 karma points MVP admin c-trib
    Dec 22, 2015 @ 14:24
    Hendy Racher
    0

    ooh, that shouldn't happen - hopefully it's something we can fix - any chance you could post a structure of your tree ?

    Thanks, Hendy

  • Jonny Irwin 91 posts 153 karma points
    Dec 22, 2015 @ 14:30
    Jonny Irwin
    1

    enter image description here

    Where 'en' is of doctype Homepage. The checkbox pickers are on the nodes underneath "Our People".

    Oviously in the shots trish sent above, we had more entries in staff specialisms.

    Thanks very much!

  • Alan Mac Kenna 145 posts 382 karma points c-trib
    Jan 02, 2016 @ 16:26
    Alan Mac Kenna
    0

    Hi,

    I'm getting this behaviour as well. XML Dropdown NuPicker works when creating the page, ie the page is unpublished - (but the NuPicker is presenting options from published pages), once the page it is on is published the picker no longer works.

  • Hendy Racher 859 posts 3821 karma points MVP admin c-trib
    Jan 04, 2016 @ 09:42
    Hendy Racher
    0

    Hi, I think this is being caused by a saved (but not published) page having an id greater than 0, so when using the $ancestorOrSelf token, the picker is expecting to find this id in the cache (which it isn't) - should be an easy fix (for v.1.5.3)

    https://github.com/uComponents/nuPickers/issues/123

    Thanks, Hendy

  • Hendy Racher 859 posts 3821 karma points MVP admin c-trib
    Feb 06, 2016 @ 09:36
    Hendy Racher
    100

    Hi, Just an update to say this issue has been fixed, and will be in the next release (v1.5.3).

    Thanks, Hendy

  • Trish 9 posts 31 karma points
    Feb 08, 2016 @ 09:07
    Trish
    0

    Brilliant! Thanks very much Hendy :)

Please Sign in or register to post replies

Write your reply to:

Draft