Jump to content

Conflict b/w "Parent of selectable page(s)" and "Custom selector"


Valery
 Share

Recommended Posts

Hi everybody,

I am setting up a web shop where customer would be able to select any of the offered products. My "orders" template has a single-page page field "product" linked to the products (for the reason of simplicity, it's 1 product per order).

My product pages tree looks like this:

[ Products ]

---- [ T-shirts ]

--------- Yellow shirt

--------- Blue shirt

The "product" page field is set up like this:

Parent of selectable page(s) = /products

Custom selector = has_parent=/products, template=products

The problem is that I can see the pages which match the custom selector just fine while editing my "orders" page. However, it seems that I can only save those pages which have "products" as their parent.

Example: I can see "Yellow shirt" in the drop-down menu but I cannot save it unless I set "Parent of selectable page(s)" to "Products > T-shirts"

How would you advise me to go about it? I want to setup a page field which would allow me to select and save any page with a certain template, regardless of what parent this page has.

UPDATE: PageListSelect for a page field is indeed a workaround of sorts but I am still puzzled: why does not a custom selector override Parent of selectable pages? And how on earth does one set up a Page field that would allow any page with a given template to be selected (wherever that page might be!) ?

Edited by Valery
Link to comment
Share on other sites

Bwakad, thanks man. But I start to think that this is somehow OK for Page fields to behave this way. I found a workaround by setting Input Field Type to PageListSelect because of this:

+ Types indicated with a plus assume a "parent" to be the root of a tree, rather than an immediate parent.

(it's sort of okay for my case just because I have this field locked, and it means it's not giving me the long-loading ajax page tree every time)

What really bugs me is why a Custom Selector of a Page field is giving me pages which I can select but cannot save? 

Link to comment
Share on other sites

Soma, that's exactly what my problem is: I can't!

I attach a screenshot of my setup just to make it easier to understand.

When I try to save my page selection (the page has a different parent) I get the "Page <id> is not valid for <field>" error.

 

 

post-956-0-00724500-1396342654_thumb.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...