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

Cannot create database adapter or New API - it does not save #45

Open
jozefnad opened this issue Dec 7, 2021 · 7 comments
Open

Cannot create database adapter or New API - it does not save #45

jozefnad opened this issue Dec 7, 2021 · 7 comments
Labels
Bug Something isn't working

Comments

@jozefnad
Copy link

jozefnad commented Dec 7, 2021

Bug Report

Q A
Version(s) 1.7 / 1.5 / 1.6

Summary

After save the adapater, the fields are blank and after refresh of page the data adapter is lost.

Current behavior

How to reproduce

Expected behavior

@jozefnad jozefnad added the Bug Something isn't working label Dec 7, 2021
@jozefnad
Copy link
Author

jozefnad commented Dec 7, 2021

during installation I received also this error

Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package herrera-io/json is abandoned, you should avoid using it. Use kherge/json instead.
Package herrera-io/phar-update is abandoned, you should avoid using it. No replacement was suggested.
Package kherge/version is abandoned, you should avoid using it. No replacement was suggested.
Package laminas/laminas-console is abandoned, you should avoid using it. Use laminas/laminas-cli instead.
Package zfcampus/zf-console is abandoned, you should avoid using it. No replacement was suggested.
Package zfcampus/zf-deploy is abandoned, you should avoid using it. No replacement was suggested.

@froschdesign
Copy link
Member

during installation I received also this error

These are not errors, only hints. This can be ignored in your case.

@jozefnad
Copy link
Author

jozefnad commented Dec 7, 2021

and what about the saving? I get green message 'CREATED', but it is not (API, Database, everything)
image
after refresh
image

@froschdesign
Copy link
Member

@jozefnad
Please open the developer tools of your browser and check if there are any errors.

@jozefnad
Copy link
Author

jozefnad commented Dec 7, 2021

@jozefnad Please open the developer tools of your browser and check if there are any errors.

This error I get when I try to create New API
image

But when I try to create New Database Adapter I have no errors, just blank fields
image

@jozefnad
Copy link
Author

jozefnad commented Dec 10, 2021

I found this solution: https://www.giters.com/laminas-api-tools/api-tools-skeleton/issues/41
solved
file: /vendor/laminas-api-tools/api-tools-admin/config/module.config.php
line: 1755
change the input_filters array to

'input_filters'                => [
        'aliases'   => [
            InputFilter\Authentication\BasicAuth::class  => \Laminas\ApiTools\Admin\InputFilter\Authentication\BasicInputFilter::class,
            InputFilter\Authentication\DigestAuth::class => \Laminas\ApiTools\Admin\InputFilter\Authentication\DigestInputFilter::class,
            InputFilter\Authentication\OAuth2::class     => \Laminas\ApiTools\Admin\InputFilter\Authentication\OAuth2InputFilter::class,
            InputFilter\Authorization::class             => \Laminas\ApiTools\Admin\InputFilter\AuthorizationInputFilter::class,
            InputFilter\ContentNegotiation::class        => \Laminas\ApiTools\Admin\InputFilter\ContentNegotiationInputFilter::class,
            InputFilter\CreateContentNegotiation::class  => \Laminas\ApiTools\Admin\InputFilter\CreateContentNegotiationInputFilter::class,
            InputFilter\DbAdapter::class                 => \Laminas\ApiTools\Admin\InputFilter\DbAdapterInputFilter::class,
            InputFilter\Documentation::class             => \Laminas\ApiTools\Admin\InputFilter\DocumentationInputFilter::class,
            InputFilter\Module::class                    => \Laminas\ApiTools\Admin\InputFilter\ModuleInputFilter::class,
            InputFilter\RestService\PATCH::class         => \Laminas\ApiTools\Admin\InputFilter\RestService\PatchInputFilter::class,
            InputFilter\RestService\POST::class          => \Laminas\ApiTools\Admin\InputFilter\RestService\PostInputFilter::class,
            InputFilter\RpcService\PATCH::class          => \Laminas\ApiTools\Admin\InputFilter\RpcService\PatchInputFilter::class,
            InputFilter\RpcService\POST::class           => \Laminas\ApiTools\Admin\InputFilter\RpcService\PostInputFilter::class,
            InputFilter\Version::class                   => \Laminas\ApiTools\Admin\InputFilter\VersionInputFilter::class,
            BasicAuth::class                                        => \Laminas\ApiTools\Admin\InputFilter\Authentication\BasicAuth::class,
            DigestAuth::class                                       => \Laminas\ApiTools\Admin\InputFilter\Authentication\DigestAuth::class,
            OAuth2::class                                           => \Laminas\ApiTools\Admin\InputFilter\Authentication\OAuth2::class,
            \ZF\Apigility\Admin\InputFilter\Authorization::class    => \Laminas\ApiTools\Admin\InputFilter\Authorization::class,
            ContentNegotiation::class                               => \Laminas\ApiTools\Admin\InputFilter\ContentNegotiation::class,
            CreateContentNegotiation::class                         => \Laminas\ApiTools\Admin\InputFilter\CreateContentNegotiation::class,
            DbAdapter::class                                        => \Laminas\ApiTools\Admin\InputFilter\DbAdapter::class,
            \ZF\Apigility\Admin\InputFilter\Documentation::class    => \Laminas\ApiTools\Admin\InputFilter\Documentation::class,
            Module::class                                           => \Laminas\ApiTools\Admin\InputFilter\Module::class,
            PATCH::class                                            => \Laminas\ApiTools\Admin\InputFilter\RestService\PATCH::class,
            POST::class                                             => \Laminas\ApiTools\Admin\InputFilter\RestService\POST::class,
            \ZF\Apigility\Admin\InputFilter\RpcService\PATCH::class => \Laminas\ApiTools\Admin\InputFilter\RpcService\PATCH::class,
            \ZF\Apigility\Admin\InputFilter\RpcService\POST::class  => \Laminas\ApiTools\Admin\InputFilter\RpcService\POST::class,
            Version::class                                          => \Laminas\ApiTools\Admin\InputFilter\Version::class,
            BasicInputFilter::class                                 => \Laminas\ApiTools\Admin\InputFilter\Authentication\BasicInputFilter::class,
            DigestInputFilter::class                                => \Laminas\ApiTools\Admin\InputFilter\Authentication\DigestInputFilter::class,
            OAuth2InputFilter::class                                => \Laminas\ApiTools\Admin\InputFilter\Authentication\OAuth2InputFilter::class,
            AuthorizationInputFilter::class                         => \Laminas\ApiTools\Admin\InputFilter\AuthorizationInputFilter::class,
            ContentNegotiationInputFilter::class                    => \Laminas\ApiTools\Admin\InputFilter\ContentNegotiationInputFilter::class,
            CreateContentNegotiationInputFilter::class              => \Laminas\ApiTools\Admin\InputFilter\CreateContentNegotiationInputFilter::class,
            DbAdapterInputFilter::class                             => \Laminas\ApiTools\Admin\InputFilter\DbAdapterInputFilter::class,
            DocumentationInputFilter::class                         => \Laminas\ApiTools\Admin\InputFilter\DocumentationInputFilter::class,
            ModuleInputFilter::class                                => \Laminas\ApiTools\Admin\InputFilter\ModuleInputFilter::class,
            PatchInputFilter::class                                 => \Laminas\ApiTools\Admin\InputFilter\RestService\PatchInputFilter::class,
            PostInputFilter::class                                  => \Laminas\ApiTools\Admin\InputFilter\RestService\PostInputFilter::class,
            \ZF\Apigility\Admin\InputFilter\RpcService\PatchInputFilter::class => \Laminas\ApiTools\Admin\InputFilter\RpcService\PatchInputFilter::class,
            \ZF\Apigility\Admin\InputFilter\RpcService\PostInputFilter::class  => \Laminas\ApiTools\Admin\InputFilter\RpcService\PostInputFilter::class,
            VersionInputFilter::class                                          => \Laminas\ApiTools\Admin\InputFilter\VersionInputFilter::class,
            \ZF\Apigility\Admin\InputFilter\InputFilter::class                 => \Laminas\ApiTools\Admin\InputFilter\InputFilter::class,
        ],
        'factories' => [
            \Laminas\ApiTools\Admin\InputFilter\Authentication\BasicInputFilter::class     => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\Authentication\DigestInputFilter::class    => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\Authentication\OAuth2InputFilter::class    => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\AuthorizationInputFilter::class            => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\ContentNegotiationInputFilter::class       => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\CreateContentNegotiationInputFilter::class => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\DbAdapterInputFilter::class                => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\DocumentationInputFilter::class            => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\ModuleInputFilter::class                   => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\RestService\PatchInputFilter::class        => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\RestService\PostInputFilter::class         => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\RpcService\PatchInputFilter::class         => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\RpcService\PostInputFilter::class          => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\VersionInputFilter::class                  => InvokableFactory::class,
            \Laminas\ApiTools\Admin\InputFilter\InputFilter::class                         => InputFilter\Factory\InputFilterInputFilterFactory::class,
        ],
    ], 

@froschdesign
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants