0

getting error in Magestore Banner Slider,

2 exception(s): Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.entity_id' in 'field list', query was: SELECT main_table.entity_id FROM magestore_bannerslider_slider AS main_table Exception #1 (PDOException): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.entity_id' in 'field list'

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main_table.entity_id' in 'field list', query was: SELECT main_table.entity_id FROM magestore_bannerslider_slider AS main_table

enter image description here

3
  • Extension installation issues, the column is not created. You need to reinstall this one. Oct 29, 2020 at 14:32
  • @DhirenVasoya can you let me know which column is not created in this error? Oct 29, 2020 at 16:22
  • entity_id not created. Oct 30, 2020 at 4:07

2 Answers 2

2

I also had this issue. For fixing that I did the following:

  1. create a new module: module.xml, registration.php

  2. add di.xml

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> 
    <preference for='Magestore\Bannerslider\Block\Adminhtml\Slider\Grid'
                     type='Fix\BannerSlider\Block\Adminhtml\Slider\Grid' />
    </config>
    
  3. add Grid.php

     namespace Fix\BannerSlider\Block\Adminhtml\Slider;
     class Grid extends \Magestore\Bannerslider\Block\Adminhtml\Slider\Grid
     {
         /**
          * @return $this
          */
         protected function _prepareMassaction()
         {
             parent::_prepareMassaction();
             $this->setMassactionIdField('slider_id');
             return $this;
         }
     }
    
0

In my case ver. 2.3.5 had only app/code/Magestore/Bannerslider/Block/Adminhtml/Slider/Grid.php which contained entity_id that I replaced with slider_id. Trying directly to reproduce after changing it the error was fixed.

Error appeared in var/log/system.log

Reproducing: Banner Slider -> Manage Sliders (URL contains ..admin/bannerslideradmin/slider/index/..)

1
  • Thanks for adding your answer, but It's always better to add solution in answer instead of 3rd party link. Please follow best practice for answer on community. Jan 28 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.