Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When I updated from beta3 to current HEAD, I ended up with an uncaught exception in a view with a taxonomy term filter (view attached). The commit in question is 2275e953edf12b4f319416a8bae1904c38dfa35d. If you remove the taxonomy term filter and recreate it all is well. I'm assuming since we're still in beta it's okay to ask people to fix their views by hand, but the exception seems worth catching.
Comment | File | Size | Author |
---|---|---|---|
#2 | 1124044-catch-expection.patch | 2.76 KB | dawehner |
#1 | 1124044-1.catch-exception.patch | 702 bytes | ksenzee |
taxonomy_term_filter_view.txt | 1.92 KB | ksenzee |
Comments
Comment #1
ksenzeeHere's a quick patch that simply catches the exception. Not sure if anything more is needed.
Comment #2
dawehnerHere is a slighly improved version
* catch the errors with a single try catch
* remove the try catch from preview, it's not needed anymore
* throw the error message as drupal_set_message in the live preview, so developers see them.
Comment #3
dawehnerCommited this version.
Comment #4
dawehnerOkay commited this patch.
There is one issue: you don't see the exception when you initially load the view, because the exception is part of the executing of the view which happens per default on pre_render, which is too late for $messages.