You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use a title field in our vertical_teaser - this is throwing an error at line 65 as the title field element doesn't contain a "#formatter" array item.
Notice: Undefined index: #formatter in cambridge_teasers_preprocess_field() (line 65 of profiles/cambridge/modules/features/cambridge_teasers/cambridge_teasers.module).
Can we add an additional check in at line 65 to either - check the field isn't title, or check that the #formatter array item exists before we try and get the format. The latter seems a better solution to be able to prevent for any other fields that don't have a formatter array item.
So either: && isset($vars['element']['#formatter']) before the 'smart_trim_format' === $vars['element']['#formatter'] check
OR
&& $vars['element']['#field_name'] !== 'title' before the 'smart_trim_format' === $vars['element']['#formatter'] check
The text was updated successfully, but these errors were encountered:
We use a title field in our vertical_teaser - this is throwing an error at line 65 as the title field element doesn't contain a "#formatter" array item.
Notice: Undefined index: #formatter in cambridge_teasers_preprocess_field() (line 65 of profiles/cambridge/modules/features/cambridge_teasers/cambridge_teasers.module).
Can we add an additional check in at line 65 to either - check the field isn't title, or check that the #formatter array item exists before we try and get the format. The latter seems a better solution to be able to prevent for any other fields that don't have a formatter array item.
So either:
&& isset($vars['element']['#formatter'])
before the'smart_trim_format' === $vars['element']['#formatter']
checkOR
&& $vars['element']['#field_name'] !== 'title'
before the'smart_trim_format' === $vars['element']['#formatter']
checkThe text was updated successfully, but these errors were encountered: