Closed echantigny closed 5 years ago
Just installed the plugin so I have no lists at all in the system. I tried to click the New List button on the Lists page (or the Wishlist Lists subpage) and they both return this error.
See stack trace below.
### Stack trace Twig_Error_Runtime: Impossible to invoke a method ("count") on a null variable. in C:\wamp64\www\Great-Boardgames\vendor\verbb\wishlist\src\templates\lists\_edit.html:90 Stack trace: #0 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\helpers\Template.php(73): twig_get_attribute(Object(craft\web\twig\Environment), Object(Twig_Source), NULL, 'count', Array, 'method', false, false) #1 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\78\78aae1ec252d6bd3147a0f3a2bd3db9883ec5b2d2a85ad21e05f27bf56c8dc3a.php(219): craft\helpers\Template::attribute(Object(craft\web\twig\Environment), Object(Twig_Source), NULL, 'count', Array, 'method') #2 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(189): __TwigTemplate_5fcf5df233c4421c93a1db8321da1e5a6351ced33b6df987c1db4f588a7fd380->block_content(Array, Array) #3 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\05\05c77e51665c76cba495ce963be215d6f5efd7cfc8b23e24d9228371927a9a49.php(648): Twig_Template->displayBlock('content', Array, Array) #4 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(189): __TwigTemplate_b373f65f4857e402bb61a1ea3b031b91a0e773bee8d7f6b16ab05e55068465ba->block_main(Array, Array) #5 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\05\05c77e51665c76cba495ce963be215d6f5efd7cfc8b23e24d9228371927a9a49.php(533): Twig_Template->displayBlock('main', Array, Array) #6 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(189): __TwigTemplate_b373f65f4857e402bb61a1ea3b031b91a0e773bee8d7f6b16ab05e55068465ba->block_body(Array, Array) #7 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\98\988530ac8cb3ed5d8d8c3953512e7311aef13a48f71e0030399c94b88e0e0adf.php(60): Twig_Template->displayBlock('body', Array, Array) #8 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_5c28eecbda127ad910cd8c02f77626855dd021074d134ce3a1ff34903e0f8202->doDisplay(Array, Array) #9 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array) #10 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array) #11 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array) #12 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\8e\8e64335cb98b6e4a807fb8b06f55ef93056996f4af0815c035182b0df9ed3421.php(40): craft\web\twig\Template->display(Array, Array) #13 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_127b4a7f840b872ad3bacf098bfb473bc91fa24f6c54dfffce645711d438c9d4->doDisplay(Array, Array) #14 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array) #15 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array) #16 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array) #17 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\05\05c77e51665c76cba495ce963be215d6f5efd7cfc8b23e24d9228371927a9a49.php(95): craft\web\twig\Template->display(Array, Array) #18 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_b373f65f4857e402bb61a1ea3b031b91a0e773bee8d7f6b16ab05e55068465ba->doDisplay(Array, Array) #19 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array) #20 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array) #21 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array) #22 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\1c\1cc5abb833f7271245946eb7fc20d8748412079d213b514ddf32fca9b0f94b46.php(73): craft\web\twig\Template->display(Array, Array) #23 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_ca730968699841ee16303000c1f39d499543d57c111c801b28538cbaa10bc93c->doDisplay(Array, Array) #24 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array) #25 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array) #26 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array) #27 C:\wamp64\www\Great-Boardgames\storage\runtime\compiled_templates\78\78aae1ec252d6bd3147a0f3a2bd3db9883ec5b2d2a85ad21e05f27bf56c8dc3a.php(42): craft\web\twig\Template->display(Array, Array) #28 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(390): __TwigTemplate_5fcf5df233c4421c93a1db8321da1e5a6351ced33b6df987c1db4f588a7fd380->doDisplay(Array, Array) #29 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(49): Twig_Template->displayWithErrorHandling(Array, Array) #30 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(367): craft\web\twig\Template->displayWithErrorHandling(Array, Array) #31 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\twig\Template.php(31): Twig_Template->display(Array, Array) #32 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Template.php(375): craft\web\twig\Template->display(Array) #33 C:\wamp64\www\Great-Boardgames\vendor\twig\twig\lib\Twig\Environment.php(289): Twig_Template->render(Array) #34 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\View.php(331): Twig_Environment->render('wishlist/lists/...', Array) #35 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\View.php(378): craft\web\View->renderTemplate('wishlist/lists/...', Array) #36 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\Controller.php(156): craft\web\View->renderPageTemplate('wishlist/lists/...', Array) #37 C:\wamp64\www\Great-Boardgames\vendor\verbb\wishlist\src\controllers\ListsController.php(89): craft\web\Controller->renderTemplate('wishlist/lists/...', Array) #38 [internal function]: verbb\wishlist\controllers\ListsController->actionEditList('wishlist', NULL, NULL) #39 C:\wamp64\www\Great-Boardgames\vendor\yiisoft\yii2\base\InlineAction.php(57): call_user_func_array(Array, Array) #40 C:\wamp64\www\Great-Boardgames\vendor\yiisoft\yii2\base\Controller.php(157): yii\base\InlineAction->runWithParams(Array) #41 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\Controller.php(104): yii\base\Controller->runAction('edit-list', Array) #42 C:\wamp64\www\Great-Boardgames\vendor\yiisoft\yii2\base\Module.php(528): craft\web\Controller->runAction('edit-list', Array) #43 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\Application.php(284): yii\base\Module->runAction('wishlist/lists/...', Array) #44 C:\wamp64\www\Great-Boardgames\vendor\yiisoft\yii2\web\Application.php(103): craft\web\Application->runAction('wishlist/lists/...', Array) #45 C:\wamp64\www\Great-Boardgames\vendor\craftcms\cms\src\web\Application.php(273): yii\web\Application->handleRequest(Object(craft\web\Request)) #46 C:\wamp64\www\Great-Boardgames\vendor\yiisoft\yii2\base\Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request)) #47 C:\wamp64\www\Great-Boardgames\public_html\index.php(21): yii\base\Application->run() #48 {main}
Should be fixed in 1.0.1 (thanks to your PR)
Description
Just installed the plugin so I have no lists at all in the system. I tried to click the New List button on the Lists page (or the Wishlist Lists subpage) and they both return this error.
See stack trace below.
Steps to reproduce
Additional info