- 🇨🇦Canada joseph.olstad
Re-rolled patch 2 on the head of 8.x-1.x, gets rid of the paths that had no business being there such as
modules/contrib/token
This way folks that use composer to apply patches will be able to use this patch. - Status changed to Needs review
over 1 year ago 11:02pm 14 June 2023 - last update
over 1 year ago 77 pass - last update
over 1 year ago 77 pass - last update
over 1 year ago 77 pass - last update
over 1 year ago 77 pass - last update
over 1 year ago 78 pass - last update
over 1 year ago 78 pass - 🇨🇦Canada joseph.olstad
Berdir expressed some concerns with this patch, with that said, we've been using it as there's currently no better solution available.
- 🇬🇧United Kingdom 2dareis2do
This patch kind of works for me. I have a field name field_feed_item_description which is of type "Text (formatted, long, with summary)" The logic did not apply with the following conditions:
isset($field_item->$property_name) && $field_item instanceOf TextWithSummaryItem
actually i discovered in my case that field_item is
$field_item instanceOf Drupal\text\Plugin\Field\FieldType\TextItemBase
Also
isset($field_item->$property_name)
is sort of like saying
isset($field_item->summary)
in web/core/modules/node/node.tokens.inc
we have the following logic:
// If the summary was requested and is not empty, use it. if ($name == 'summary' && !empty($item->summary)) { $output = $item->summary_processed; }
So my feeling is $field_item->summary is not always available.
- 🇦🇺Australia yeniatencio
Added and additional validation to avoid `Call to a member function getComponent() on null` issues.
- 🇬🇧United Kingdom 2dareis2do
This broke for me when upgrading token 1.15.0
I have tried both #17 and #18 patches and none worked for me.
Please try this patch and see if it works for you or not.
Screenshot showing token output also shown