ryancramerdesign / ProcessWire-2.0

THIS IS AN OLD VERSION. Get the new one at the URL below:
https://github.com/ryancramerdesign/ProcessWire
GNU General Public License v2.0
39 stars 5 forks source link

Possible error with page field/asmSelect #8

Closed adamkiss closed 10 years ago

adamkiss commented 13 years ago

error is written after how to replicate 'tutorial

How to replicate

  1. Create new 'page'
  2. Create template with ['select page' field (multiple) with 'asmSelect' method and no 'parent' setting]
  3. Change new 'page' to that template

Result
PW either shows error on that 'select page' field with no possibility to select page (unable to replicate) or empty select (default replicate)

Solution
when creating new page with asmSelect field, might be good idea to set default parent as root.

ryancramerdesign commented 13 years ago

The only thing is that it also has the option of selecting all pages with a given template, or pages returned from a given PHP code snippet. If there's a default parent, they won't be able to do those other things. What we might need here is a better error message.

adamkiss commented 13 years ago

Yes it is possible, but if the field is saved with no changes at all (create -> save -> use), it should be at least working for root. Maybe wait on second save (first creates the field) and if no changes have been introduced, save the 'default' state -> all templates, root as parent?

Also, I think it makes sense to change default 'selection engine' from asmSelect to page select, but that might be just me.

ryancramerdesign commented 13 years ago

I think that makes sense on both points, and will implement. Thanks.

processwire.com is getting pounded with traffic today. It looks like someone must have finally linked to it :)