Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the correct preprocess function to add the modal administration #110

Closed
argiepiano opened this issue Dec 4, 2021 · 1 comment · Fixed by #111
Closed

Use the correct preprocess function to add the modal administration #110

argiepiano opened this issue Dec 4, 2021 · 1 comment · Fixed by #111
Assignees
Labels
bug Something isn't working

Comments

@argiepiano
Copy link
Contributor

argiepiano commented Dec 4, 2021

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 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.

I will submit a PR in a minute.

IMPORTANT. For the PR to work you must:

@argiepiano
Copy link
Contributor Author

argiepiano commented Dec 4, 2021

PR #111

Please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant