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

Deleting API Doesn't Return APIs #46

Open
michalbundyra opened this issue Jan 10, 2020 · 2 comments
Open

Deleting API Doesn't Return APIs #46

michalbundyra opened this issue Jan 10, 2020 · 2 comments

Comments

@michalbundyra
Copy link
Member

When deleting an API, the API gets deleted, and the page then goes to a blank APIs page without the other APIs. It clears the API list but fails to fetch the new API list. The following error is returned from GET after a successful DELETE.

Fatal error:  Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (test) could not be initialized.' in /media/psf/Home/phpstormprojects/api/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php:189
Stack trace:
#0 /media/psf/Home/phpstormprojects/api/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(163): Zend\ModuleManager\ModuleManager->loadModuleByName(Object(Zend\ModuleManager\ModuleEvent))
#1 /media/psf/Home/phpstormprojects/api/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(90): Zend\ModuleManager\ModuleManager->loadModule('test')
#2 [internal function]: Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent))
#3 /media/psf/Home/phpstormprojects/api/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent))
#4 /media/psf/Home/phpstormprojects/api/vendor/zendframework/zendframewo in /media/psf/Home/phpstormprojects/api/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php on line 189

Originally posted by @forrestmid at zfcampus/zf-apigility-admin#222

@michalbundyra
Copy link
Member Author

This error looks to me like the config/application.config.php file is not being updated properly -- or, rather, that write operations are being reported as successful when they have not yet completed.

Short term solution: manually remove the "test" module entry from that file, if it's still there.

Long term: Is it at all possible you're running on a Mac with an SSD, by any chance? If so, we observed some problems with that combination whereby the SSD takes > 1s to commit file changes, which can lead to the situation you're seeing. As a result of these observations, we made some changes in the admin UI to add delays between receiving a success confirmation and sending off the request to retrieve the list of modules. You can try this out by running php composer.phar update in the project root; look to make sure you get at least version 1.0.3 of zf-apigility-admin.

Please let me know what you observe.


Originally posted by @weierophinney at zfcampus/zf-apigility-admin#222 (comment)

@michalbundyra
Copy link
Member Author

I get same error on 1.0.4. I have ubuntu with SSD. Disable opcache in php.ini resolved issue. I think cacheEnabledAction in zf-apigility-admin should chect this, but now it's disabled.


Originally posted by @snapshotpl at zfcampus/zf-apigility-admin#222 (comment)

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

1 participant