Copied to clipboard

Flag this post as spam?

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


  • Angelo Ryndon 6 posts 115 karma points
    Feb 01, 2018 @ 05:15
    Angelo Ryndon
    0

    7.7.9 Starter Website - Featured Products/Featured People Data type not working as intended?

    Hello Everyone!

    I'm just learning to use Umbraco. I am able to reproduce what seems to be a bug on the starter website - version 7.7.9.

    I installed umbraco on VS2017 nuget Used IIS 10 and the database is on MS SQL Server 2016

    Steps to reproduce -

    1. Install umbraco using Nuget, build project, create database on sql server, add an IIS website.
    2. Go to the website, Do initial setup of Umbraco. use the starter site.
    3. In the backoffice, delete the Products or People Page in the Content tab.
    4. Create a new Products or People Page from the Content tab.
    5. Go to Featured Products/People and click Add
    6. You won't see anything relevant on the search box(a product or person).

    When I go and edit the Data Type to be Node type = Media, then select Products for Featured Products or People for Featured People something would show up on the search box and you can add a product or a person, which makes sense to me as a first time user.

    It will fail on run time though as the Node type in the back office points to a concrete type in c#? and the program wants a Content Type and not Image Type.

    My Question is, is Featured Product/People in the starter site just broken at the moment? am I missing something or is this something that should be altered from the backend only?

    I wanted to play around first and add/delete a Products/People page as an editor to get a feel of the CMS.

    Thanks in advance!

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Feb 02, 2018 @ 10:53
    Kevin Jump
    1

    Hi

    I wrote a bit explanaition (below) - about a bit of it, but you are right the starter kit is a bit broken :

    1. The products content type has featured products as mandatory which means its actually impossible to save a new products node until you have picked a product. - remove the mandatory setting from the featured products item.

    2. The Products content type also doesn't allow you to create products undeath it - this is because it is missing the allow child node types settings in the permissions tab - you need to add product to the allowed child nodes tab before you can add any products : enter image description here

    3. Products - Featured Products - Multinode Treepicker data picker has a minimum number of items value of 1 - again this makes it impossible to create a new product page too. - change the Minumum number of items value to 0 (or blank the box)

    4. the Products - Featured Products - Multinode Treepicker also is hardwired to the existing product node (as you have spotted) - the rest of this post talks about why that has been done, but also the options you have (quick one, point it to your new product page - long one use xpath)


    OK So the pickers:

    When you create a new product or person page, the reason the pickers are showing you nothing is because they are - as you have said - pointing at the content type.

    for the starter kit they do need to be pointing to a content type, because the person/product content type is the thing with all the extra details (like price, sku, etc) on it that is needed to render a product/person on the page.

    really once you have deleted the orginal product or person page, and created a new one, you need to point the content pickers (Products - Featured Products - Multinode Treepicker & People - Featured People - Multinode Treepicker) to your new pages for them to find anything.

    Its a balancing act i think they have made with the starter kit. you could have those pickers point the root of the site, and instead filter what you can pick with the Allow Items of type setting :

    enter image description here

    but this results in a bit of a mess for the editor as they get presented with greyed out nodes and have to find the products in the site.: enter image description here

    a slightly better but still not ideal solution is to use XPath in the picker - to select the first product node: (setting to //products) but this has issues if you have more than one product node:

    enter image description here

    I am not sure but if the picker is actually only used on the product page, a neat solution might be to use $current as the xpath value - as this just shows pages under the one the editor is looking at.

    --

    but in summary - yes it does look a a bit broken at the moment. we should raise an issue with the umbraco team, I am sure some of these are quick fixes.

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Feb 02, 2018 @ 11:01
    Kevin Jump
    100

    Hi,

    I have logged this as an issue : http://issues.umbraco.org/issue/U4-10916 so hopefully someone will have a look at fixing it.

    Kevin

Please Sign in or register to post replies

Write your reply to:

Draft