magento-2-blog
magento-2-blog copied to clipboard
error when create a page
Fatal error: Uncaught Error: Call to a member function getStoreIds() on null in /opt/lampp/htdocs/magento/vendor/mageplaza/magento-2-blog-extension/Block/Adminhtml/Category/Tree.php:159 Stack trace: #0 /opt/lampp/htdocs/magento/vendor/magento/module-catalog/Block/Adminhtml/Category/Tree.php(301): Mageplaza\Blog\Block\Adminhtml\Category\Tree->_getNodeJson(NULL) #1 /opt/lampp/htdocs/magento/vendor/mageplaza/magento-2-blog-extension/Block/Adminhtml/Category/Tree.php(139): Magento\Catalog\Block\Adminhtml\Category\Tree->getTree(NULL) #2 /opt/lampp/htdocs/magento/vendor/mageplaza/magento-2-blog-extension/Block/Category/Widget.php(44): Mageplaza\Blog\Block\Adminhtml\Category\Tree->getTree(NULL, '1') #3 /opt/lampp/htdocs/magento/vendor/mageplaza/magento-2-blog-extension/view/frontend/templates/category/widget.phtml(22): Mageplaza\Blog\Block\Category\Widget->getTree() #4 /opt/lampp/htdocs/magento/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/opt/lampp/htdo...') #5 /opt/lampp/htdocs/magento/vendor/magento/fram in /opt/lampp/htdocs/magento/vendor/mageplaza/magento-2-blog-extension/Block/Adminhtml/Category/Tree.php on line 159
Preconditions
- Magento: 2.3.3
- PHP: 7.3
- MySQL: 5
Steps to reproduce
- Create a page with posts
Expected result
Actual result
- [Screenshot, logs]
Hi @EngPeterMaged,
Thanks for contacting us.
This problem occurred during our extension installation. The default data for the table mageplaza_blog_category
was not installed.
To solve this problem, you just need to add the default data for this table. Here is the default data for this table, you can add this directly on your database:
$defaultData = [
'path' => '1',
'position' => 0,
'children_count' => 0,
'level' => 0,
'name' => 'ROOT',
'url_key' => 'root'
];
Please try this solution and let me know the result. I am looking forward to hearing from you.
Thank you!
thanks for you interest but i need to copy data of registered customer to another database what's the name of event what i can use it for observer
thanks
On Mon, 22 Jun 2020 at 06:43, Bang512 [email protected] wrote:
Hi @EngPeterMaged https://github.com/EngPeterMaged,
Thanks for contacting us. This problem occurred during our extension installation. The default data for the table mageplaza_blog_category was not installed.
To solve this problem, you just need to add the default data for this table. Here is the default data for this table, you can add this directly on your database:
$defaultData = [ 'path' => '1', 'position' => 0, 'children_count' => 0, 'level' => 0, 'name' => 'ROOT', 'url_key' => 'root' ];
Please try this solution and let me know the result. I am looking forward to hearing from you.
Thank you!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mageplaza/magento-2-blog/issues/271#issuecomment-647271910, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZVX3Z6UIR4SU6VOCLJHMDRX3OOVANCNFSM4OD2ZBTQ .
can you help me
On Mon, 22 Jun 2020 at 09:53, Peter Maged [email protected] wrote:
thanks for you interest but i need to copy data of registered customer to another database what's the name of event what i can use it for observer
thanks
On Mon, 22 Jun 2020 at 06:43, Bang512 [email protected] wrote:
Hi @EngPeterMaged https://github.com/EngPeterMaged,
Thanks for contacting us. This problem occurred during our extension installation. The default data for the table mageplaza_blog_category was not installed.
To solve this problem, you just need to add the default data for this table. Here is the default data for this table, you can add this directly on your database:
$defaultData = [ 'path' => '1', 'position' => 0, 'children_count' => 0, 'level' => 0, 'name' => 'ROOT', 'url_key' => 'root' ];
Please try this solution and let me know the result. I am looking forward to hearing from you.
Thank you!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mageplaza/magento-2-blog/issues/271#issuecomment-647271910, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZVX3Z6UIR4SU6VOCLJHMDRX3OOVANCNFSM4OD2ZBTQ .
Based on the answer from @Bang512 , the following query will add the missing record in mageplaza_blog_category
table and solve the issue.
INSERT INTO mageplaza_blog_category (path,position, children_count, level,name,url_key) VALUES ('1',0,0,0,'ROOT','root');