Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Deleting API Doesn't Return APIs #222

Open
forrestmid opened this issue Aug 14, 2014 · 3 comments
Open

Deleting API Doesn't Return APIs #222

forrestmid opened this issue Aug 14, 2014 · 3 comments

Comments

@forrestmid
Copy link

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
@weierophinney
Copy link
Member

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.

@snapshotpl
Copy link

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.

@michalbundyra
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-admin; a new issue has been opened at laminas-api-tools/api-tools-admin#46.

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

No branches or pull requests

4 participants