- Issue created by @a.dmitriiev
- Merge request !9871Issue #3481695: Add config action to copy entity displays β (Closed) created by a.dmitriiev
- π©πͺGermany a.dmitriiev
Uploading patch so that it can be used in Search Track issue of Drupal CMS.
- π©πͺGermany a.dmitriiev
As functionality mimics what field_ui module is doing, I placed the config action there, but maybe there is a better place for it. Also the tests are needed, I guess.
- First commit to issue fork.
- πΊπΈUnited States phenaproxima Massachusetts
I'd call this a bug; the clone action as it currently exists doesn't work for entity displays.
- πΊπΈUnited States smustgrave
There's 2 MRs but not sure which one to remove. Can 1 be closed or hidden.
- π©πͺGermany a.dmitriiev
Closing MR https://git.drupalcode.org/project/drupal/-/merge_requests/9871 in favor of https://git.drupalcode.org/project/drupal/-/merge_requests/9874 to have more general solution in place.
- πΊπΈUnited States phenaproxima Massachusetts
We've settled on !9874. I'm updating the issue summary to reflect that.
- π©πͺGermany a.dmitriiev
Uploading the updated patch to work with Drupal CMS Search track.
- π©πͺGermany a.dmitriiev
Updated approach works for entity displays now, also with wildcard
- π¨π¦Canada b_sharpe
Code looks good and works, added comment as I'm not sure if this needs a doc update specific for config actions and/or recipes?
- π¬π§United Kingdom alexpott πͺπΊπ
I think we might be able to fix setting the ID in entity displays and then this will be a little less special case.
- πΊπΈUnited States phenaproxima Massachusetts
So, good news and bad news.
The good news: yes, your idea seems to work. It supports this use case, and is tested:
core.entity_view_display.node.page.full: cloneAs: node.page.search_index
The catch is that this pattern won't support wildcards, which is specifically needed by @a.dmitriiev to get Drupal CMS's search indexing to work. So I had to expose
createCopy()
as an action method for that case:core.entity_view_display.node.*.default: createCopy: search_result
This necessitated a change to the EntityMethod action, which doesn't account for the possibility of the method returning a different entity (i.e., a clone).
- πΊπΈUnited States thejimbirch Cape Cod, Massachusetts
We will need to update the docs and I assume this should have a change record also.
- πΊπΈUnited States phenaproxima Massachusetts
- πΊπΈUnited States thejimbirch Cape Cod, Massachusetts
Amazing! Marking as RTBC.
-
alexpott β
committed 9b7d24a6 on 10.4.x
Issue #3481695 by phenaproxima, a.dmitriiev, thejimbirch, b_sharpe,...
-
alexpott β
committed 9b7d24a6 on 10.4.x
-
alexpott β
committed a1b47eaf on 11.x
Issue #3481695 by phenaproxima, a.dmitriiev, thejimbirch, b_sharpe,...
-
alexpott β
committed a1b47eaf on 11.x
- π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed a1b47eafdb9 to 11.x and 9b7d24a6fad to 10.4.x. Thanks!
- π©πͺGermany a.dmitriiev
`createCopy` config action works as expected for Search Track of Drupal CMS recipe.
Thank you all!
Automatically closed - issue fixed for 2 weeks with no activity.