I want to replace the page add a product with a view :
/product/add
So I created a view, see the screenshot. I have 3 types of products "Produit", "Service", "Abonnement", the rights are identical for these 3 types of product.
When I go to my view, the link "Service" works but "Produit" and "Abonnement" displays the following error :
RuntimeException: Controller "Drupal\Core\Entity\Controller\EntityController::addTitle()" requires that you provide a value for the "$entity_type_id" argument (because there is no default value or because there is a non optional argument after this one). in Drupal\Core\Controller\ControllerResolver->doGetArguments() (line 165 of /home/www.domaine.com/public_html/web/core/lib/Drupal/Core/Controller/ControllerResolver.php).
Export :
uuid: 4ab219d8-9b12-4567-86dd-fa3b3ce87cc3
langcode: fr
status: true
dependencies:
module:
- commerce_product
- commerce_store
- user
id: boutique_liste_creer_produit
label: 'Boutique liste créer produit'
module: views
description: ''
tag: ''
base_table: commerce_store_field_data
base_field: store_id
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'view commerce_product'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: none
options:
items_per_page: null
offset: 0
style:
type: default
row:
type: fields
fields:
store_id:
id: store_id
table: commerce_store_field_data
field: store_id
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: true
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: commerce_store
entity_field: store_id
plugin_id: field
nothing:
id: nothing
table: views
field: nothing
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: true
text: '<i class="fa fa-plus"></i><a href="/product/add/produit"> Produit</a>'
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: h2
element_class: 'btn btn-success'
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: false
plugin_id: custom
nothing_1:
id: nothing_1
table: views
field: nothing
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: true
text: '<i class="fa fa-plus"></i><a href="/product/add/service"> Service</a>'
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: h2
element_class: 'btn btn-success'
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: false
plugin_id: custom
nothing_2:
id: nothing_2
table: views
field: nothing
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: true
text: '<i class="fa fa-plus"></i><a href="/product/add/abonnement"> Abonnement</a>'
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: h2
element_class: 'btn btn-success'
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: false
plugin_id: custom
filters: { }
sorts: { }
title: 'Créer un produit de type'
header: { }
footer: { }
empty:
area_text_custom:
id: area_text_custom
table: views
field: area_text_custom
relationship: none
group_type: group
admin_label: ''
empty: true
tokenize: false
content: "Vous n'administré aucune boutique.</br>\nPour créer un produit, vous devez créer une boutique :</br>\n</br>\n<a class=\"btn btn-success btn-lg\" href=\"/store/add\"><i class=\"fa fa-users fa-lg\"></i> Créer une boutique</a>"
plugin_id: text_custom
relationships:
reverse__commerce_product__stores:
id: reverse__commerce_product__stores
table: commerce_store_field_data
field: reverse__commerce_product__stores
relationship: none
group_type: group
admin_label: stores
required: false
entity_type: commerce_store
plugin_id: entity_reverse
arguments:
uid:
id: uid
table: commerce_store_field_data
field: uid
relationship: none
group_type: group
admin_label: ''
default_action: default
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: current_user
default_argument_options: { }
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
entity_type: commerce_store
entity_field: uid
plugin_id: numeric
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user
- user.permissions
tags: { }
page_1:
display_plugin: page
id: page_1
display_title: Page
position: 1
display_options:
display_extenders:
metatag_display_extender: { }
path: product/add
enabled: true
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user
- user.permissions
tags: { }
| Comment | File | Size | Author |
|---|---|---|---|
| Capture du 2017-10-24 16-51-17.png | 109.3 KB | zenimagine |
Comments
Comment #2
zenimagine commentedit works if I change the way to:
Why can not we change this way with a view ?
/product/add
Comment #3
zenimagine commentedComment #4
bojanz commentedThis is a general Drupal core question, since product/add is generated by core's EntityController.