Jump to content

Recommended Posts

Posted

I've been trying to use the PageAutoComplete fieldtype to connect some autors (teachers and students) to a particular work, but allowing to set unpublished (or hidden) student and teacher pages as well. For that, I've established a filter:

template=teacher|student, include=all

or

return $pages->filter("template=teacher|student, include=all")

In any other compatible fieldtype, it works just as it should, using php code or just the selector, showing me every teacher/student. But using the PageAutoComplete, it never finds the hidden or unpublished pages.

Is it a bug? Or am I doing something wrong?

Posted

PageAutocomplete actually uses the ProcessPageSearch AJAX API which doesn't allow "include=all" except from Superuser. This is for security reasons. Try changing it to "include=hidden" which should at least enable you to show the hidden (though not unpublished) pages.

Posted

Thanks for the reply! Just tested it, using a superuser login as well as a regular editor one, and both don't work, with either include=hidden or include all, for both hidden and unpublished pages..

Posted

Okay I think I tracked down what the issue was. Looks like ProcessPageSearch just didn't support include=hidden directives in the AJAX query. I've updated it so that it does, if you want to try the latest. Let me know if this works from that end too?

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
×
×
  • Create New...