Invalid UI Component element nameMagento 2 - Ui Component Form: Change input nameUnable to save column in flexible tables (grids) in the system configurationMagento 2.1 Create a filter in the product grid by new attributeUI component formnon editable form field in magento 2.1Magento 2 UI component- Element argument is not allowed hereForm is not displayed on panel admin Magento 2Invalid UI Component element name: Export button not working?Magento 2 UI grid non db dataprovider and pagination issueHow to assign ID attribute to UI form element component?
LWC SFDX source push error TypeError: LWC1009: decl.moveTo is not a function
How does one intimidate enemies without having the capacity for violence?
Why is Minecraft giving an OpenGL error?
Java Casting: Java 11 throws LambdaConversionException while 1.8 does not
Malcev's paper "On a class of homogeneous spaces" in English
What is a clear way to write a bar that has an extra beat?
Why can't I see bouncing of a switch on an oscilloscope?
Paid for article while in US on F-1 visa?
What would happen to a modern skyscraper if it rains micro blackholes?
How is it possible to have an ability score that is less than 3?
Can a Cauchy sequence converge for one metric while not converging for another?
How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?
Can you really stack all of this on an Opportunity Attack?
Arrow those variables!
Client team has low performances and low technical skills: we always fix their work and now they stop collaborate with us. How to solve?
Can a vampire attack twice with their claws using Multiattack?
Character reincarnated...as a snail
Fully-Firstable Anagram Sets
Important Resources for Dark Age Civilizations?
Can I make popcorn with any corn?
Maximum likelihood parameters deviate from posterior distributions
Why are electrically insulating heatsinks so rare? Is it just cost?
Is it possible to do 50 km distance without any previous training?
Approximately how much travel time was saved by the opening of the Suez Canal in 1869?
Invalid UI Component element name
Magento 2 - Ui Component Form: Change input nameUnable to save column in flexible tables (grids) in the system configurationMagento 2.1 Create a filter in the product grid by new attributeUI component formnon editable form field in magento 2.1Magento 2 UI component- Element argument is not allowed hereForm is not displayed on panel admin Magento 2Invalid UI Component element name: Export button not working?Magento 2 UI grid non db dataprovider and pagination issueHow to assign ID attribute to UI form element component?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have this xml configuration for index controller.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="content">
<uiComponent name="cferreboeuf_bienfaiteur_listing"/>
</referenceContainer>
</page>
The controller's action is defined like that :
<?php
namespace CferreboeufTrainingdbControllerAdminhtmlBienfaiteur;
class Index extends MagentoBackendAppAction
const ADMIN_RESOURCE = 'Cferreboeuf_Trainingdb::index';
protected $resultPageFactory;
public function __construct(
MagentoBackendAppActionContext $context,
MagentoFrameworkViewResultPageFactory $resultPageFactory)
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
public function execute()
/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('Cferreboeuf_Trainingdb::bienfaiteur');
$resultPage->addBreadcrumb(__('Training'), __('Training'));
$resultPage->addBreadcrumb(__('Ajout de bienfaiteurs'), __('Ajout de bienfaiteurs'));
$resultPage->getConfig()->getTitle()->prepend(__('Bienfaiteurs'));
return $this->resultPageFactory->create();
The component is a grid that is correct xml.
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
<item name="deps" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
</item>
<item name="spinner" xsi:type="string">cferreboeuf_bienfaiteur_columns</item>
<item name="buttons" xsi:type="array">
<item name="add" xsi:type="array">
<item name="name" xsi:type="string">add</item>
<item name="label" xsi:type="string" translate="true">Ajouter un bienfaiteur</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">cferreboeuf_trainingdb/bienfaiteur/new</item>
</item>
</item>
</argument>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/bookmarks/bookmarks</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
<item name="storageConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="mui/bookmark/save"/>
<item name="deleteUrl" xsi:type="url" path="mui/bookmark/delete"/>
<item name="namespace" xsi:type="string">cferreboeuf_bienfaiteur_listing</item>
</item>
</item>
</argument>
</bookmark>
<container name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</container>
</container>
<dataSource name="cferreboeuf_bienfaiteur_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">BienfaiteurGridDataProvider</argument> <!-- Data provider class -->
<argument name="name" xsi:type="string">cferreboeuf_bienfaiteur_data_source</argument> <!-- provider defined above -->
<argument name="primaryFieldName" xsi:type="string">entity_id</argument> <!-- Primary key -->
<argument name="requestFieldName" xsi:type="string">id</argument> <!-- URL name parameter -->
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<!-- Primary key column name -->
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
</dataSource>
<columns name="cferreboeuf_bienfaiteur_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="editorConfig" xsi:type="array">
<item name="selectProvider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns.ids</item>
<item name="enabled" xsi:type="boolean">true</item>
<item name="indexField" xsi:type="string">entity_id</item>
<item name="clientConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="cferreboeuf_trainingdb/bienfaiteur/inlineEdit"/>
<item name="validateBeforeSave" xsi:type="boolean">false</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
</item>
</item>
</argument>
<selectionsColumn name="ids">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</selectionsColumn>
<column name="entity_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="label" xsi:type="string" translate="true">ID</item>
</item>
</argument>
</column>
<column name="prenom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Prénom</item>
</item>
</argument>
</column>
<column name="nom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">bienfaiteur</item>
<item name="dataScope" xsi:type="string">nom</item>
<item name="label" xsi:type="string" translate="true">Nom</item>
<item name="filter" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="editor" xsi:type="string">text</item>
</item>
</argument>
</column>
<column name="ordre">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Ordre de tri</item>
<item name="sorting" xsi:type="string">asc</item>
</item>
</argument>
</column>
<actionsColumn name="actions" class="CferreboeufTrainingdbUiComponentListingColumnBienfaiteurActions">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="resizeEnabled" xsi:type="boolean">false</item>
<item name="resizeDefaultWidth" xsi:type="string">107</item>
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</actionsColumn>
</columns>
</listing>
But when I try to display this list in the admin, I get the error :
Exception #0 (MagentoFrameworkExceptionLocalizedException): Invalid UI Component element name: 'cferreboeuf_bienfaiteur_listing'
Where am I incorrect ?
magento-2.1 uicomponent
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have this xml configuration for index controller.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="content">
<uiComponent name="cferreboeuf_bienfaiteur_listing"/>
</referenceContainer>
</page>
The controller's action is defined like that :
<?php
namespace CferreboeufTrainingdbControllerAdminhtmlBienfaiteur;
class Index extends MagentoBackendAppAction
const ADMIN_RESOURCE = 'Cferreboeuf_Trainingdb::index';
protected $resultPageFactory;
public function __construct(
MagentoBackendAppActionContext $context,
MagentoFrameworkViewResultPageFactory $resultPageFactory)
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
public function execute()
/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('Cferreboeuf_Trainingdb::bienfaiteur');
$resultPage->addBreadcrumb(__('Training'), __('Training'));
$resultPage->addBreadcrumb(__('Ajout de bienfaiteurs'), __('Ajout de bienfaiteurs'));
$resultPage->getConfig()->getTitle()->prepend(__('Bienfaiteurs'));
return $this->resultPageFactory->create();
The component is a grid that is correct xml.
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
<item name="deps" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
</item>
<item name="spinner" xsi:type="string">cferreboeuf_bienfaiteur_columns</item>
<item name="buttons" xsi:type="array">
<item name="add" xsi:type="array">
<item name="name" xsi:type="string">add</item>
<item name="label" xsi:type="string" translate="true">Ajouter un bienfaiteur</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">cferreboeuf_trainingdb/bienfaiteur/new</item>
</item>
</item>
</argument>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/bookmarks/bookmarks</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
<item name="storageConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="mui/bookmark/save"/>
<item name="deleteUrl" xsi:type="url" path="mui/bookmark/delete"/>
<item name="namespace" xsi:type="string">cferreboeuf_bienfaiteur_listing</item>
</item>
</item>
</argument>
</bookmark>
<container name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</container>
</container>
<dataSource name="cferreboeuf_bienfaiteur_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">BienfaiteurGridDataProvider</argument> <!-- Data provider class -->
<argument name="name" xsi:type="string">cferreboeuf_bienfaiteur_data_source</argument> <!-- provider defined above -->
<argument name="primaryFieldName" xsi:type="string">entity_id</argument> <!-- Primary key -->
<argument name="requestFieldName" xsi:type="string">id</argument> <!-- URL name parameter -->
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<!-- Primary key column name -->
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
</dataSource>
<columns name="cferreboeuf_bienfaiteur_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="editorConfig" xsi:type="array">
<item name="selectProvider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns.ids</item>
<item name="enabled" xsi:type="boolean">true</item>
<item name="indexField" xsi:type="string">entity_id</item>
<item name="clientConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="cferreboeuf_trainingdb/bienfaiteur/inlineEdit"/>
<item name="validateBeforeSave" xsi:type="boolean">false</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
</item>
</item>
</argument>
<selectionsColumn name="ids">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</selectionsColumn>
<column name="entity_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="label" xsi:type="string" translate="true">ID</item>
</item>
</argument>
</column>
<column name="prenom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Prénom</item>
</item>
</argument>
</column>
<column name="nom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">bienfaiteur</item>
<item name="dataScope" xsi:type="string">nom</item>
<item name="label" xsi:type="string" translate="true">Nom</item>
<item name="filter" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="editor" xsi:type="string">text</item>
</item>
</argument>
</column>
<column name="ordre">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Ordre de tri</item>
<item name="sorting" xsi:type="string">asc</item>
</item>
</argument>
</column>
<actionsColumn name="actions" class="CferreboeufTrainingdbUiComponentListingColumnBienfaiteurActions">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="resizeEnabled" xsi:type="boolean">false</item>
<item name="resizeDefaultWidth" xsi:type="string">107</item>
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</actionsColumn>
</columns>
</listing>
But when I try to display this list in the admin, I get the error :
Exception #0 (MagentoFrameworkExceptionLocalizedException): Invalid UI Component element name: 'cferreboeuf_bienfaiteur_listing'
Where am I incorrect ?
magento-2.1 uicomponent
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I have this xml configuration for index controller.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="content">
<uiComponent name="cferreboeuf_bienfaiteur_listing"/>
</referenceContainer>
</page>
The controller's action is defined like that :
<?php
namespace CferreboeufTrainingdbControllerAdminhtmlBienfaiteur;
class Index extends MagentoBackendAppAction
const ADMIN_RESOURCE = 'Cferreboeuf_Trainingdb::index';
protected $resultPageFactory;
public function __construct(
MagentoBackendAppActionContext $context,
MagentoFrameworkViewResultPageFactory $resultPageFactory)
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
public function execute()
/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('Cferreboeuf_Trainingdb::bienfaiteur');
$resultPage->addBreadcrumb(__('Training'), __('Training'));
$resultPage->addBreadcrumb(__('Ajout de bienfaiteurs'), __('Ajout de bienfaiteurs'));
$resultPage->getConfig()->getTitle()->prepend(__('Bienfaiteurs'));
return $this->resultPageFactory->create();
The component is a grid that is correct xml.
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
<item name="deps" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
</item>
<item name="spinner" xsi:type="string">cferreboeuf_bienfaiteur_columns</item>
<item name="buttons" xsi:type="array">
<item name="add" xsi:type="array">
<item name="name" xsi:type="string">add</item>
<item name="label" xsi:type="string" translate="true">Ajouter un bienfaiteur</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">cferreboeuf_trainingdb/bienfaiteur/new</item>
</item>
</item>
</argument>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/bookmarks/bookmarks</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
<item name="storageConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="mui/bookmark/save"/>
<item name="deleteUrl" xsi:type="url" path="mui/bookmark/delete"/>
<item name="namespace" xsi:type="string">cferreboeuf_bienfaiteur_listing</item>
</item>
</item>
</argument>
</bookmark>
<container name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</container>
</container>
<dataSource name="cferreboeuf_bienfaiteur_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">BienfaiteurGridDataProvider</argument> <!-- Data provider class -->
<argument name="name" xsi:type="string">cferreboeuf_bienfaiteur_data_source</argument> <!-- provider defined above -->
<argument name="primaryFieldName" xsi:type="string">entity_id</argument> <!-- Primary key -->
<argument name="requestFieldName" xsi:type="string">id</argument> <!-- URL name parameter -->
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<!-- Primary key column name -->
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
</dataSource>
<columns name="cferreboeuf_bienfaiteur_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="editorConfig" xsi:type="array">
<item name="selectProvider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns.ids</item>
<item name="enabled" xsi:type="boolean">true</item>
<item name="indexField" xsi:type="string">entity_id</item>
<item name="clientConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="cferreboeuf_trainingdb/bienfaiteur/inlineEdit"/>
<item name="validateBeforeSave" xsi:type="boolean">false</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
</item>
</item>
</argument>
<selectionsColumn name="ids">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</selectionsColumn>
<column name="entity_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="label" xsi:type="string" translate="true">ID</item>
</item>
</argument>
</column>
<column name="prenom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Prénom</item>
</item>
</argument>
</column>
<column name="nom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">bienfaiteur</item>
<item name="dataScope" xsi:type="string">nom</item>
<item name="label" xsi:type="string" translate="true">Nom</item>
<item name="filter" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="editor" xsi:type="string">text</item>
</item>
</argument>
</column>
<column name="ordre">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Ordre de tri</item>
<item name="sorting" xsi:type="string">asc</item>
</item>
</argument>
</column>
<actionsColumn name="actions" class="CferreboeufTrainingdbUiComponentListingColumnBienfaiteurActions">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="resizeEnabled" xsi:type="boolean">false</item>
<item name="resizeDefaultWidth" xsi:type="string">107</item>
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</actionsColumn>
</columns>
</listing>
But when I try to display this list in the admin, I get the error :
Exception #0 (MagentoFrameworkExceptionLocalizedException): Invalid UI Component element name: 'cferreboeuf_bienfaiteur_listing'
Where am I incorrect ?
magento-2.1 uicomponent
I have this xml configuration for index controller.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="content">
<uiComponent name="cferreboeuf_bienfaiteur_listing"/>
</referenceContainer>
</page>
The controller's action is defined like that :
<?php
namespace CferreboeufTrainingdbControllerAdminhtmlBienfaiteur;
class Index extends MagentoBackendAppAction
const ADMIN_RESOURCE = 'Cferreboeuf_Trainingdb::index';
protected $resultPageFactory;
public function __construct(
MagentoBackendAppActionContext $context,
MagentoFrameworkViewResultPageFactory $resultPageFactory)
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
public function execute()
/** @var MagentoBackendModelViewResultPage $resultPage */
$resultPage = $this->resultPageFactory->create();
$resultPage->setActiveMenu('Cferreboeuf_Trainingdb::bienfaiteur');
$resultPage->addBreadcrumb(__('Training'), __('Training'));
$resultPage->addBreadcrumb(__('Ajout de bienfaiteurs'), __('Ajout de bienfaiteurs'));
$resultPage->getConfig()->getTitle()->prepend(__('Bienfaiteurs'));
return $this->resultPageFactory->create();
The component is a grid that is correct xml.
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
<item name="deps" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_data_source</item>
</item>
<item name="spinner" xsi:type="string">cferreboeuf_bienfaiteur_columns</item>
<item name="buttons" xsi:type="array">
<item name="add" xsi:type="array">
<item name="name" xsi:type="string">add</item>
<item name="label" xsi:type="string" translate="true">Ajouter un bienfaiteur</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">cferreboeuf_trainingdb/bienfaiteur/new</item>
</item>
</item>
</argument>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/bookmarks/bookmarks</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
<item name="storageConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="mui/bookmark/save"/>
<item name="deleteUrl" xsi:type="url" path="mui/bookmark/delete"/>
<item name="namespace" xsi:type="string">cferreboeuf_bienfaiteur_listing</item>
</item>
</item>
</argument>
</bookmark>
<container name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</container>
</container>
<dataSource name="cferreboeuf_bienfaiteur_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">BienfaiteurGridDataProvider</argument> <!-- Data provider class -->
<argument name="name" xsi:type="string">cferreboeuf_bienfaiteur_data_source</argument> <!-- provider defined above -->
<argument name="primaryFieldName" xsi:type="string">entity_id</argument> <!-- Primary key -->
<argument name="requestFieldName" xsi:type="string">id</argument> <!-- URL name parameter -->
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<!-- Primary key column name -->
<item name="indexField" xsi:type="string">id</item>
</item>
</item>
</argument>
</argument>
</dataSource>
<columns name="cferreboeuf_bienfaiteur_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="editorConfig" xsi:type="array">
<item name="selectProvider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns.ids</item>
<item name="enabled" xsi:type="boolean">true</item>
<item name="indexField" xsi:type="string">entity_id</item>
<item name="clientConfig" xsi:type="array">
<item name="saveUrl" xsi:type="url" path="cferreboeuf_trainingdb/bienfaiteur/inlineEdit"/>
<item name="validateBeforeSave" xsi:type="boolean">false</item>
</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_listing.cferreboeuf_bienfaiteur_columns_editor</item>
<item name="target" xsi:type="string">startEdit</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">$ $.$data.rowIndex </item>
<item name="1" xsi:type="boolean">true</item>
</item>
</item>
</item>
</item>
</argument>
<selectionsColumn name="ids">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</selectionsColumn>
<column name="entity_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">textRange</item>
<item name="label" xsi:type="string" translate="true">ID</item>
</item>
</argument>
</column>
<column name="prenom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Prénom</item>
</item>
</argument>
</column>
<column name="nom">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="visible" xsi:type="boolean">true</item>
<item name="dataType" xsi:type="string">text</item>
<item name="formElement" xsi:type="string">input</item>
<item name="source" xsi:type="string">bienfaiteur</item>
<item name="dataScope" xsi:type="string">nom</item>
<item name="label" xsi:type="string" translate="true">Nom</item>
<item name="filter" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
<item name="editor" xsi:type="string">text</item>
</item>
</argument>
</column>
<column name="ordre">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">text</item>
<item name="validation" xsi:type="array">
<item name="required-entry" xsi:type="boolean">true</item>
</item>
</item>
<item name="label" xsi:type="string" translate="true">Ordre de tri</item>
<item name="sorting" xsi:type="string">asc</item>
</item>
</argument>
</column>
<actionsColumn name="actions" class="CferreboeufTrainingdbUiComponentListingColumnBienfaiteurActions">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="resizeEnabled" xsi:type="boolean">false</item>
<item name="resizeDefaultWidth" xsi:type="string">107</item>
<item name="indexField" xsi:type="string">entity_id</item>
</item>
</argument>
</actionsColumn>
</columns>
</listing>
But when I try to display this list in the admin, I get the error :
Exception #0 (MagentoFrameworkExceptionLocalizedException): Invalid UI Component element name: 'cferreboeuf_bienfaiteur_listing'
Where am I incorrect ?
magento-2.1 uicomponent
magento-2.1 uicomponent
asked Jul 24 '17 at 10:12
Christophe FerreboeufChristophe Ferreboeuf
566414
566414
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ yesterday
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The problem comes from the controller. In it, there are two calls to instanciate twice the resultpagefactory. Therefore, the first time the ui component is instanciated and added to the list of uicomponents. The second time, the function prepareData
of vendor/magento/module-ui/Model/Manager.php
checks for its existence and then says that a uiComponent with this name cannot be created.
/**
* Prepare the initialization data of UI components
*
* @param string $name
* @return ManagerInterface
* @throws MagentoFrameworkExceptionLocalizedException
*/
public function prepareData($name)
$this->hasData($name))
throw new LocalizedException(
new MagentoFrameworkPhrase("Invalid UI Component element name: '%1'", [$name])
);
$this->componentsPool = $this->arrayObjectFactory->create();
$cacheID = static::CACHE_ID . '_' . $name;
$cachedPool = $this->cache->load($cacheID);
if ($cachedPool === false)
$this->prepare($name);
$this->cache->save($this->componentsPool->serialize(), $cacheID);
else
$this->componentsPool->unserialize($cachedPool);
$this->componentsData->offsetSet($name, $this->componentsPool);
$this->componentsData->offsetSet($name, $this->evaluateComponentArguments($this->getData($name)));
return $this;
On line 25 of the controller, it should be return $resultPage;
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f186139%2finvalid-ui-component-element-name%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem comes from the controller. In it, there are two calls to instanciate twice the resultpagefactory. Therefore, the first time the ui component is instanciated and added to the list of uicomponents. The second time, the function prepareData
of vendor/magento/module-ui/Model/Manager.php
checks for its existence and then says that a uiComponent with this name cannot be created.
/**
* Prepare the initialization data of UI components
*
* @param string $name
* @return ManagerInterface
* @throws MagentoFrameworkExceptionLocalizedException
*/
public function prepareData($name)
$this->hasData($name))
throw new LocalizedException(
new MagentoFrameworkPhrase("Invalid UI Component element name: '%1'", [$name])
);
$this->componentsPool = $this->arrayObjectFactory->create();
$cacheID = static::CACHE_ID . '_' . $name;
$cachedPool = $this->cache->load($cacheID);
if ($cachedPool === false)
$this->prepare($name);
$this->cache->save($this->componentsPool->serialize(), $cacheID);
else
$this->componentsPool->unserialize($cachedPool);
$this->componentsData->offsetSet($name, $this->componentsPool);
$this->componentsData->offsetSet($name, $this->evaluateComponentArguments($this->getData($name)));
return $this;
On line 25 of the controller, it should be return $resultPage;
add a comment |
The problem comes from the controller. In it, there are two calls to instanciate twice the resultpagefactory. Therefore, the first time the ui component is instanciated and added to the list of uicomponents. The second time, the function prepareData
of vendor/magento/module-ui/Model/Manager.php
checks for its existence and then says that a uiComponent with this name cannot be created.
/**
* Prepare the initialization data of UI components
*
* @param string $name
* @return ManagerInterface
* @throws MagentoFrameworkExceptionLocalizedException
*/
public function prepareData($name)
$this->hasData($name))
throw new LocalizedException(
new MagentoFrameworkPhrase("Invalid UI Component element name: '%1'", [$name])
);
$this->componentsPool = $this->arrayObjectFactory->create();
$cacheID = static::CACHE_ID . '_' . $name;
$cachedPool = $this->cache->load($cacheID);
if ($cachedPool === false)
$this->prepare($name);
$this->cache->save($this->componentsPool->serialize(), $cacheID);
else
$this->componentsPool->unserialize($cachedPool);
$this->componentsData->offsetSet($name, $this->componentsPool);
$this->componentsData->offsetSet($name, $this->evaluateComponentArguments($this->getData($name)));
return $this;
On line 25 of the controller, it should be return $resultPage;
add a comment |
The problem comes from the controller. In it, there are two calls to instanciate twice the resultpagefactory. Therefore, the first time the ui component is instanciated and added to the list of uicomponents. The second time, the function prepareData
of vendor/magento/module-ui/Model/Manager.php
checks for its existence and then says that a uiComponent with this name cannot be created.
/**
* Prepare the initialization data of UI components
*
* @param string $name
* @return ManagerInterface
* @throws MagentoFrameworkExceptionLocalizedException
*/
public function prepareData($name)
$this->hasData($name))
throw new LocalizedException(
new MagentoFrameworkPhrase("Invalid UI Component element name: '%1'", [$name])
);
$this->componentsPool = $this->arrayObjectFactory->create();
$cacheID = static::CACHE_ID . '_' . $name;
$cachedPool = $this->cache->load($cacheID);
if ($cachedPool === false)
$this->prepare($name);
$this->cache->save($this->componentsPool->serialize(), $cacheID);
else
$this->componentsPool->unserialize($cachedPool);
$this->componentsData->offsetSet($name, $this->componentsPool);
$this->componentsData->offsetSet($name, $this->evaluateComponentArguments($this->getData($name)));
return $this;
On line 25 of the controller, it should be return $resultPage;
The problem comes from the controller. In it, there are two calls to instanciate twice the resultpagefactory. Therefore, the first time the ui component is instanciated and added to the list of uicomponents. The second time, the function prepareData
of vendor/magento/module-ui/Model/Manager.php
checks for its existence and then says that a uiComponent with this name cannot be created.
/**
* Prepare the initialization data of UI components
*
* @param string $name
* @return ManagerInterface
* @throws MagentoFrameworkExceptionLocalizedException
*/
public function prepareData($name)
$this->hasData($name))
throw new LocalizedException(
new MagentoFrameworkPhrase("Invalid UI Component element name: '%1'", [$name])
);
$this->componentsPool = $this->arrayObjectFactory->create();
$cacheID = static::CACHE_ID . '_' . $name;
$cachedPool = $this->cache->load($cacheID);
if ($cachedPool === false)
$this->prepare($name);
$this->cache->save($this->componentsPool->serialize(), $cacheID);
else
$this->componentsPool->unserialize($cachedPool);
$this->componentsData->offsetSet($name, $this->componentsPool);
$this->componentsData->offsetSet($name, $this->evaluateComponentArguments($this->getData($name)));
return $this;
On line 25 of the controller, it should be return $resultPage;
answered Jul 24 '17 at 10:12
Christophe FerreboeufChristophe Ferreboeuf
566414
566414
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f186139%2finvalid-ui-component-element-name%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown