- Issue created by @thisisalistairsaccount
- Assigned to abhishek_virasat
- Issue was unassigned.
- Status changed to Needs review
7 months ago 5:51am 14 June 2024 - 🇮🇳India abhishek_virasat
@thisisalistairsaccount, fixed the issue and created MR. please review it once.
- Status changed to Postponed: needs info
6 months ago 11:34am 23 June 2024 - 🇦🇺Australia alex.skrypnyk Melbourne
@thisisalistairsaccount
If you see this occurs - something went very wrong with the list.
For all cases on when the view would be NULL, is a watchdog record created.Is it possible to provide this watchdog record here?
@abhishek_gupta1
Appreciate the help, but we cannot simply put the missing view - the engine behind the Automated List - into a partial condition and proceed the processing as if everything is okay (as per your MR). I will wait for more information on how to reproduce this issue. - 🇦🇺Australia ivrh
Same issue for me, using vanilla CivicTheme 1.7.1
I created an automated list but omitted metadata configuration — asking it to show all page content.
The error is:
Error: Call to a member function id() on null in civictheme_preprocess_paragraph__civictheme_automated_list() (line 69 of /app/web/themes/custom/civictheme/includes/automated_list.inc).
The problem is within the "_civictheme_automated_list__get_view()" function, it returns NULL on many occasions and the code within the "automated_list.inc" (line 69) unconditionally calls $view->id() (but the $view is NULL).
I provided a workaround, please validate:
https://github.com/civictheme/monorepo-drupal/compare/develop...ivangryn...It may be a better approach to trow an exception within the "_civictheme_automated_list__get_view()" function and use try/catch within the automated_list.inc file.
- Status changed to Needs review
6 months ago 11:51pm 24 June 2024 - Assigned to alex.skrypnyk
- 🇦🇺Australia alex.skrypnyk Melbourne
There should not be a case when this takes place. However, hiding the error from the end-user makes sense to me.
Noting that we already log the reason why the returned view is NULL to watchdog.
-
alex.skrypnyk →
authored 6ee0b85c on 1.x
Issue #3454548 by alex.skrypnyk, abhishek_gupta1, ivrh,...
-
alex.skrypnyk →
authored 6ee0b85c on 1.x
- Status changed to Fixed
6 months ago 8:58am 29 June 2024 Automatically closed - issue fixed for 2 weeks with no activity.