I have developed a extension for Magento 2. I have doen all my development work in version 2.0.5. After completion of the development work, I tried to test it on Magento 2.1. But now I am facing problems.
On Magento 2.0 extension installed successfully and works great. But when I try to install it on Magento 2.1 then I receive the following error:
Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. current version - none, required version - 1.0.0
After this I have manually added 1.0.0 in data_version column of setup_module table.
Now after that admin panel works and I have tried to access my module then I got below error:
Class PageGridDataProvider does not exist
I am using this class in below code as per tutorial of Custom module in Magento 2.0
<dataSource name="grid_record_grid_list_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">PageGridDataProvider</argument>
<!-- here we pass dataprovider name which i will define in di.xml file of module in next step -->
<argument name="name" xsi:type="string">grid_record_grid_list_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="update_url" xsi:type="url" path="mui/index/render"/>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
I am stuck at this error. Can anybody help me please. Is magento 2.1 require different extension development process?
Thanks
EDIT:
I have added below code in di.xml and now Class PageGridDataProvider does not exist error gone.
<virtualType name="PageGridDataProvider" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider"/>
Now can you help me out to solve the first issue. In which the data-version is not inserting during Installation and below error occours:
Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory. current version - none, required version - 1.0.0