Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action 'SearchForm' isn't allowed on class... #11

Open
Fr3dj opened this issue Oct 9, 2020 · 2 comments
Open

Action 'SearchForm' isn't allowed on class... #11

Fr3dj opened this issue Oct 9, 2020 · 2 comments

Comments

@Fr3dj
Copy link

Fr3dj commented Oct 9, 2020

Hi there,

I just installed the latest version and keep getting the following error : Action 'SearchForm' isn't allowed on class... even after adding the below code to my controllers

    private static $allowed_actions = [
        'SearchForm',
    ];

This is happening with all controllers.

I am running silverstripe 4.6.1

Any idea why?

Thank you

@guyvanbael
Copy link

@Fr3dj Running into the same problem. Did you manage to resolve this issue?

@mlewis-everley
Copy link
Member

Only just seen this issue!

It sounds like maybe you are trying to POST SearchForm back to the current controller. It is now designed to use a GET and send the user to a dedicated controller to display search results.

If you want to use SearchForm via a POST you would may have to add a SearchForm method on your controller that overwrites the one added by the extension and add your own version of the SearchForm to that method (not sure if that would work, that is just off the top of my head).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants