This topic contains 1 reply, has 1 voice, and was last updated by alendo 9 years, 6 months ago.
- Topic
In datagrid.yml I need to put two datagrids configuration, but I receive the following run time error. I suppose that I receive the error because in the second datagrid properties are defined in the same way of the previous, but it is the same rule. If I drop property configuratione I receive another error I suppose due to the fact that view_link is not defined (Datagrid source “Array” does not exist).
ERROR:1234567891011121314151617181920[1/2] InvalidTypeException: Invalid type for path "properties.view_link.type". Expected scalar, but got array. -in /Users/ale/Sites/crm-application/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ScalarNode.php at line 36 -protected function validateType($value){if (!is_scalar($value) && null !== $value) {$ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected scalar, but got %s.',$this->getPath(),gettype($value)at ScalarNode ->validateType (array('url', 'url'))in /Users/ale/Sites/crm-application/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php at line 265 +at BaseNode ->normalize (array('url', 'url'))in /Users/ale/Sites/crm-application/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php at line 308 +at ArrayNode ->normalizeValue (array('type' => array('url', 'url'), 'route' => array('educaevent_view', 'educaevent_view'), 'params' => array('id', 'id')))in /Users/ale/Sites/crm-application/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/BaseNode.php at line 268 +at BaseNode ->normalize (array('type' => array('url', 'url'), 'route' => array('educaevent_view', 'educaevent_view'), 'params' => array('id', 'id')))in /Users/ale/Sites/crm-application/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/PrototypedArrayNode.php at line 283 +...datagrid.yml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187datagrid:educaevent_grid:extended_entity_name: %educa_cloud_educa_event.entity.class%source:type: ormquery:select:- educaevent.id- educaevent.title- status.label as statusLabel- educaevent.description- eventmaster.title as eventmasterTitlefrom:- { table: %educa_cloud_educa_event.entity.class%, alias: educaevent }join:left:- { join: educaevent.status, alias: status }- { join: educaevent.edition_event, alias: eventmaster }columns:title:label: ec.educaevent.title.labelstatusLabel:label: ec.educaevent.status.labeldescription:label: ec.educaevent.description.labeleventmasterTitle:label: ec.educaevent.event_edition.labelproperties:id: ~view_link:type: urlroute: educaevent_viewparams: [ id ]update_link:type: urlroute: educaevent_updateparams: [ id ]delete_link:type: urlroute: educaevent_api_delete_educaeventparams: [ id ]sorters:columns:title:data_name: educaevent.titlestatusLabel:data_name: status.labeldefault:createdAt: DESCfilters:columns:title:type: stringdata_name: educaevent.titlestatus:data_name: status.idtype: entityoptions:field_options:class: EducaCloudEducaEventBundle:InternalEventStatusproperty: labelactions:view:type: navigatelabel: educaevent.datagrid.view_action.labelicon: userlink: view_linkrowAction: trueacl_resource: acl_educaevent_viewupdate:type: navigatelabel: educaevent.datagrid.update_action.labelicon: editlink: update_linkacl_resource: acl_educaevent_updatedelete:type: deletelabel: educaevent.datagrid.delete_action.labellink: delete_linkicon: trashacl_resource: acl_educaevent_updatemass_actions:delete:type: deleteentity_name: %educa_cloud_educa_event.entity.class%data_identifier: educaevent.idacl_resource: acl_educaevent_updatelabel: ec.educaevent.datagrid.deleteicon: trashoptions:entityHint: educaeventexport: true#edizioniedition_grid:extended_entity_name: %educa_cloud_educa_event.entity.class%source:type: ormquery:select:- educaevent.id- educaevent.title as eventTitle- status.label as eventStatusLabel- educaevent.description as eventDescriptionfrom:- { table: %educa_cloud_educa_event.entity.class%, alias: educaevent }join:left:- { join: educaevent.status, alias: status }- { join: educaevent.edition_event, alias: eventmaster }where:and:- eventmaster.id = :event_idcolumns:eventTitle:label: ec.educaevent.title.labeleventStatusLabel:label: ec.educaevent.status.labeleventDescription:label: ec.educaevent.description.labelproperties:id: ~view_link:type: urlroute: educaevent_viewparams: [ id ]update_link:type: urlroute: educaevent_updateparams: [ id ]delete_link:type: urlroute: educaevent_api_delete_educaeventparams: [ id ]sorters:columns:title:data_name: educaevent.titlestatusLabel:data_name: status.labeldefault:createdAt: DESCfilters:columns:eventTitle:type: stringdata_name: educaevent.titleeventStatus:data_name: status.idtype: entityoptions:field_options:class: EducaCloudEducaEventBundle:InternalEventStatusproperty: labelactions:view:type: navigatelabel: educaevent.datagrid.view_action.labelicon: userlink: view_linkrowAction: trueacl_resource: acl_educaevent_viewupdate:type: navigatelabel: educaevent.datagrid.update_action.labelicon: editlink: update_linkacl_resource: acl_educaevent_updatedelete:type: deletelabel: educaevent.datagrid.delete_action.labellink: delete_linkicon: trashacl_resource: acl_educaevent_updatemass_actions:delete:type: deleteentity_name: %educa_cloud_educa_event.entity.class%data_identifier: educaevent.idacl_resource: acl_educaevent_updatelabel: ec.educaevent.datagrid.deleteicon: trashoptions:entityHint: educaeventexport: true
The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.