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
Preprocessing of Entity Plus entities is confusing. One would logically assume that the following preprocess hook would work: template_preprocess_paragraphs_item() to preprocess paragraph items. But no. These preprocessing functions never get called. Which is what led people to use #theme_wrappers (to force that hook to run, but caused other issues). This also led a previous PR to use paragraphs_preprocess() to add the modal classes. Instead, you must use hook_preprocess_entity_plus and use if statements to check that you are preprocessing the right template/entity.
This relates to #91 - specifically see my comment #91 (comment)
Preprocessing of Entity Plus entities is confusing. One would logically assume that the following preprocess hook would work:
template_preprocess_paragraphs_item()
to preprocess paragraph items. But no. These preprocessing functions never get called. Which is what led people to use #theme_wrappers (to force that hook to run, but caused other issues). This also led a previous PR to useparagraphs_preprocess()
to add the modal classes. Instead, you must use hook_preprocess_entity_plus and use if statements to check that you are preprocessing the right template/entity.I will submit a PR in a minute.
IMPORTANT. For the PR to work you must:
The text was updated successfully, but these errors were encountered: