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

WSOD on sublanding page / topic list builder if referencing a deleted topic #254

Closed
andybroomfield opened this issue Apr 30, 2024 · 0 comments · Fixed by #255
Closed

WSOD on sublanding page / topic list builder if referencing a deleted topic #254

andybroomfield opened this issue Apr 30, 2024 · 0 comments · Fixed by #255
Labels
bug Something isn't working

Comments

@andybroomfield
Copy link
Contributor

Seeing this error, which prevents a page load

Error: Call to a member function label() on null in localgov_services_sublanding_preprocess_paragraph__topic_list_builder() (line 132 of /var/www/html/docroot/modules/contrib/localgov_services/modules/localgov_services_sublanding/localgov_services_sublanding.module).

This happens becuase on an older page, if a topic is deleted and there is no custom header value, then you get a WSOD.

Steps to reproduce:

  1. Create a topic
  2. Create a sub landing page, using the topic list builder, set the topic as the one previously created, leave the header blank and save.
  3. Delete the referenced topic
  4. Flush caches and view the sublanding page.

Expected result:
Sub landing page displays, allbeit the heading is no longer present.

Actual result:
WSOD and above error in logs.

@andybroomfield andybroomfield added the bug Something isn't working label Apr 30, 2024
andybroomfield added a commit that referenced this issue Apr 30, 2024
Fix #254

Fetch the label using in a NULL safe way.
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