- Issue created by @WalterP
- Assigned to eleonel
- 🇦🇺Australia murrayw
The field widget only handles the targetting of direct fields on the entity. It may be possible to add the field widget into the Paragraphs form and have it work that way, so it may be possible,
Assigning this across to Eleo to comment on whether it is possible and what it would take to achieve this.
- 🇮🇳India naveenvalecha New Delhi
This is a new feature request instead of a support request.
- 🇩🇪Germany WalterP
Thank you for answering.
I solved the problem with a patch in the AugmentorBaseWidget.
I add the case for entity_reference_revisions type and pass the entity_id to the service:
foreach ($source_fields as $field_name) { $field_type = $entity->get($field_name)->getFieldDefinition()->getType(); $nid = $entity->id(); if (!$entity->get($field_name)->isEmpty()) { $values = $entity->get($field_name)->getValue(); foreach ($values as $value) { switch ($field_type) { case 'image': case 'entity_reference_revisions': $value = strval($nid); break;
And in the service I load the entity and get the paragraphs field values and process them.
- 🇦🇺Australia murrayw
Thanks for the code WalterP. Eleo passing this over to you to see.
- Status changed to Postponed: needs info
over 1 year ago 6:16pm 3 May 2023 - 🇯🇵Japan eleonel Itoshima 🇯🇵
Hi Walter, by looking at the code that you provided I can see you are trying to use a paragraph reference field as a source for an augmentor field, and this is something we are trying to avoid, because then how we know from which paragraph fields you want to extract data and merge it for the input
Instead I recommend to add the augmentor field into the paragraph type and select the source that you want from there. Once you are in the parent entity form, you will be able to execute the augmentor as usual, with the particularity of having the augmentor button inside the paragraph.
- Status changed to Closed: works as designed
over 1 year ago 12:08pm 28 June 2023 - 🇺🇸United States keiserjb
I found this thread because I'm trying to use the module with paragraphs. I could add the augmentor to the paragraph type but there may be more than one of the paragraph type and I would want the augmentor to use the data in all of the body paragraphs not just one of them.
Looking for ideas.
- 🇺🇸United States keiserjb
Putting the Augmentor field inside the paragraph doesn't really work. Say I have a site without body fields. I only have paragraphs. If I put an Augmentor on a body paragraph to create the title of the node I can't target a field outside of the paragraph when configuring it.