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

Cannot generate UI component grid based on Model Triad #2396

Open
ioweb-gr opened this issue Oct 29, 2024 · 1 comment
Open

Cannot generate UI component grid based on Model Triad #2396

ioweb-gr opened this issue Oct 29, 2024 · 1 comment
Labels

Comments

@ioweb-gr
Copy link

Describe the bug (*)

I've generated my model called Lock from the phpstorm plugin.
I'm generating my ui component grid based on the Lock model triad via the ui comonent

Multiple errors arise because the naming is not consistent.

For example

In di.xml

  • The name of the virtual type is declared as is, but on the ui component it's expected to be in namespace Ui\Component\Listing
  • In the resourceModel argument the collection is passed instead of the ResourceModel
  • In the arguments list the name is missing name="collections"
    <virtualType name="IowebModuleLockListingDataProvider" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
        <arguments>
            <argument name="resourceModel" xsi:type="string">Ioweb\ModuleIntegration\Model\ResourceModel\Lock\Collection</argument>
            <argument name="mainTable" xsi:type="string">ioweb_base_lock</argument>
        </arguments>
    </virtualType>
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument xsi:type="array">
                <item xsi:type="string" name="ioweb_wupexintegration_lock_listing_data_source">IowebModuleLockListingDataProvider</item>
            </argument>
        </arguments>
    </type>

To Reproduce (*)

Steps to reproduce the behavior:

  1. Create a model triad with the extension
  2. Try to create a ui component grid for the model triad
  3. The controller is throwing various errors

Expected behavior (*)

The grid is working

Screenshots

If applicable, add screenshots to help explain your problem.

Please complete the following information: (*)

  • OS: Windows 11 x64
  • PhpStorm/Intellij version: 2024.2.4
  • Plugin Version: 5.3.1

Additional context

Add any other context about the problem here.

@ioweb-gr ioweb-gr added the bug label Oct 29, 2024
Copy link

m2-assistant bot commented Oct 29, 2024

Hi @ioweb-gr. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant