Error: You are not authorized to perform this action
Hi
Having a problem implementing a search form that has exactly the same fieldset of another search form that is working properly. The error from expression engine
is "You are not authorized to perform this action" (I have turned off, in expression engine, the "Process form data in Secure Mode?" to ascertain that the issue had not been
due to secure form processing. But the error persisted). Also, adding the secure="no", as suggested in previous support tickets, to the form tag does not resolve the issue. All fields are specified as being searchable fields.
The problematic form has its own collection and start with the following code:
{exp:low_search:form
collection="yoga_practitioners"
query="{segment_2}"
result_page="directory/filtered-results-practice-yoga"
form_id="search"
search_mode="all"
}
The working form starts with the following code:
{exp:low_search:form
collection="wellness_centers"
query="{segment_2}"
result_page="directory/filtered-results-wellness-centers"
form_id="search"
search_mode="all"
}
Is there anything wrong with my above definitions ?
Thank you
Merv
Replies
Low 1 Mar 2014 10:20
So you're getting the error after submitting the one form, but not the other?
What are your Low Search, EE an PHP versions?
Merv 1 Mar 2014 12:25
Hi
Sorry to get back to you late and thank you for your reply.
Yes, the error occurs after I submit the problematic search form. The other works perfectly well.
1) Low search: low_search_v304
2) PHP is 5.2.4 or greater
2) ExpressionEngine v2.7.3
Thank you
Merv
Low 1 Mar 2014 12:39
I can't seem to replicate this, but I do notice the following:
- Your query="" param points to {segment_2}, while the result_page points to a template where the encoded query would be in {segment_3}.
- Both the collection and search_mode parameters aren't valid in the Form tag since LS3. Either hard-code them in the Results tag, or use a hidden input field in your form, eg:
Like I said, I can't replicate, but you can try upgrading to Low Search 3.1.1 and see if it persists.
Merv 1 Mar 2014 13:09
Hi
The error turned out to be in the code of the "result page". As for the above omission, keeping them or removing them did not have any impact.
Well, it is working now and I thank you for your precious time.
All the best
Merv