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

Model collection resource name is not defined.after update #1070

Closed
berliozd opened this issue Feb 27, 2015 · 3 comments
Closed

Model collection resource name is not defined.after update #1070

berliozd opened this issue Feb 27, 2015 · 3 comments
Labels
Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@berliozd
Copy link

Hi,
I have installed magento2 yesterday and after having updated it today i got now the following error while accessing the admin.

a:4:{i:0;s:46:"Model collection resource name is not defined.";i:1;s:5040:"#0 /var/www/magento2/lib/internal/Magento/Framework/Model/AbstractModel.php(285): Magento\Framework\Model\AbstractModel->getResourceCollection()
#1 /var/www/magento2/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php(71): Magento\Framework\Model\AbstractModel->getCollection()
#2 /var/www/magento2/app/code/Magento/AdminNotification/Model/System/Message/Baseurl.php(103): Magento\AdminNotification\Model\System\Message\Baseurl->_getConfigUrl()
#3 /var/www/magento2/lib/internal/Magento/Framework/Notification/MessageList.php(58): Magento\AdminNotification\Model\System\Message\Baseurl->getIdentity()
#4 /var/www/magento2/lib/internal/Magento/Framework/Notification/MessageList.php(84): Magento\Framework\Notification\MessageList->_loadMessages()
#5 /var/www/magento2/app/code/Magento/AdminNotification/Model/Resource/System/Message/Collection/Synchronized.php(24): Magento\Framework\Notification\MessageList->asArray()
#6 /var/www/magento2/lib/internal/Magento/Framework/Data/Collection/Db.php(566): Magento\AdminNotification\Model\Resource\System\Message\Collection\Synchronized->_afterLoad()
#7 /var/www/magento2/lib/internal/Magento/Framework/Data/Collection/Db.php(538): Magento\Framework\Data\Collection\Db->loadWithFilter(false, false)
#8 /var/www/magento2/lib/internal/Magento/Framework/Data/Collection.php(334): Magento\Framework\Data\Collection\Db->load()
#9 /var/www/magento2/app/code/Magento/AdminNotification/Block/System/Messages.php(46): Magento\Framework\Data\Collection->getItems()
#10 /var/www/magento2/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(637): Magento\AdminNotification\Block\System\Messages->_toHtml()
#11 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(488): Magento\Framework\View\Element\AbstractBlock->toHtml()
#12 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(464): Magento\Framework\View\Layout->_renderBlock('system_messages')
#13 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(302): Magento\Framework\View\Layout->renderElement('system_messages', true)
#14 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(515): Magento\Framework\View\Layout\Interceptor->renderElement('system_messages')
#15 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(466): Magento\Framework\View\Layout->_renderContainer('notifications')
#16 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(302): Magento\Framework\View\Layout->renderElement('notifications', true)
#17 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(515): Magento\Framework\View\Layout\Interceptor->renderElement('notifications')
#18 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(466): Magento\Framework\View\Layout->_renderContainer('page.wrapper')
#19 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(302): Magento\Framework\View\Layout->renderElement('page.wrapper', true)
#20 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(515): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper')
#21 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(466): Magento\Framework\View\Layout->_renderContainer('backend.page')
#22 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(302): Magento\Framework\View\Layout->renderElement('backend.page', true)
#23 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(515): Magento\Framework\View\Layout\Interceptor->renderElement('backend.page')
#24 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(466): Magento\Framework\View\Layout->_renderContainer('root')
#25 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(302): Magento\Framework\View\Layout->renderElement('root', true)
#26 /var/www/magento2/lib/internal/Magento/Framework/View/Layout.php(884): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#27 /var/www/magento2/var/generation/Magento/Framework/View/Layout/Interceptor.php(588): Magento\Framework\View\Layout->getOutput()
#28 /var/www/magento2/lib/internal/Magento/Framework/View/Result/Page.php(241): Magento\Framework\View\Layout\Interceptor->getOutput()
#29 /var/www/magento2/lib/internal/Magento/Framework/View/Result/Layout.php(162): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http))
#30 /var/www/magento2/var/generation/Magento/Backend/Model/View/Result/Page/Interceptor.php(289): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http))
#31 /var/www/magento2/lib/internal/Magento/Framework/App/Http.php(119): Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http))
#32 /var/www/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(245): Magento\Framework\App\Http->launch()
#33 /var/www/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#34 {main}";s:3:"url";s:108:"/index.php/admin/admin/dashboard/index/key/45a84c5dc5464b3c2e855f256f70f63d55d10bc571af4dcaa5e138d1d1e64c7c/";s:11:"script_name";s:10:"/index.php";}

@mazhalai
Copy link
Contributor

@berliozd can you clear your var/generation folder and then try again? Possibly related to #1014

@mazhalai mazhalai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development PS labels Feb 27, 2015
@henkelund
Copy link

I had the same issue. It seems there was a couple of new modules after the update and the object manager didn't load the correct arguments without them enabled.

php -f setup/index.php -- module-enable --modules=Magento_Config,Magento_Variable

After enabling the modules I was promted to run their update scripts:

php -f setup/index.php -- update

Unfortunately it tried to create a table I already had so I had to resort to:

DROP TABLE core_config_data;

After that I could run the update and get in to the backoffice again.
Hope this helps

@berliozd
Copy link
Author

berliozd commented Mar 1, 2015

Thanks @mazhalai, I tried that but It didn't make anything good.
Thanks @henkelund, I did what you said and it fixed my problem.

@berliozd berliozd closed this as completed Mar 1, 2015
magento-team pushed a commit that referenced this issue May 1, 2017
[jackalopes] MAGETWO-67718: @api coverage integrity test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

3 participants