Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Whenever I got database exception when trying to add new field to a content type, the exception is shrinked only to SQL error number without full SQL query text. The exception is not written to any log or watchdog.
So there is no way to debug SQL problems got when creating new content types and fields.
Steps:
1) Make it impossible to create new tables in your SQL database.
2) Add new field to existing content type.
Proposed resolution
The thing is there is no re-throw statement at field_ui.admin.inc line 831 , just
catch (Exception $e)
{
drupal_set_message(t('There was a problem creating field %label: !message', array('%label' => $instance['label'], '!message' => $e->getMessage())), 'error');
}
Adding
throw $e;
to the scope will do so the exception is handled and logged by other modules down the stack.
Comment | File | Size | Author |
---|---|---|---|
Error-page.png | 62.25 KB | feoff |
Comments