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

Can't handle import action in Silverstripe Admin #37

Open
westwingpl opened this issue Feb 1, 2016 · 2 comments
Open

Can't handle import action in Silverstripe Admin #37

westwingpl opened this issue Feb 1, 2016 · 2 comments

Comments

@westwingpl
Copy link

Hello,

I can't run your extension because of this error:

[01-Feb-2016 12:39:20] Error at framework/forms/gridfield/GridField.php line 678: Uncaught InvalidArgumentException: Can't handle action 'import' (http://tool.local/admin/testing-module/TestingCsv/EditForm/field/TestingCsv?TestingCsv%5BGridState%5D=%7B%22GridFieldSortableHeader%22%3A%7B%22SortColumn%22%3A%5B%5D%7D%2C%22GridFieldPaginator%22%3A%7B%22currentPage%22%3A1%7D%7D&action_gridFieldAlterAction%3FStateID%3Dd6e5a75d584f2231434211d9f85a944d=Import%20from%20CSV)

This is how i'm including module:

    public function getEditForm( $id = null, $fields = null )
    {
        $form = parent::getEditForm( $id, $fields );


        $importer = new GridFieldImporter('before');
        $gridField = $form -> Fields () -> fieldByName ( $this -> sanitiseClassName ( $this->modelClass ) );
        $gridField -> getConfig()->addComponent( $importer );

        return $form;
    }

Could you help me? I don't know if i have some problem or there is some bug in extension.

Best
Przemek

@samwalshnz
Copy link

@westwingpl Did you have any luck with this, because I am also experiencing the same issue?

@mdiflorio
Copy link

@samwalshnz, I know it's a few years late but did manage to find a solution for this?

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

2 participants