Thanks for the example.
For reference, changing how the different forms called the handler fixed the issue:
function user_config_form_alter(&$form, FormStateInterface $form_state, $form_id) {
// Handler
$handler = 'custom_user_submit_handler';
// Login
if($form_id == 'user_login_form') {
$form['#submit'][] = $handler;
}
// Register
elseif ($form_id == 'user_register_form') {
$form['actions']['submit']['#submit'][] = $handler;
}
}
🐛 | Course | Deprecated: Creation of dynamic property Drupal\course\Storage\CourseObjectFulfillmentStorage::$entityClass is deprecated in /web/modules/contrib/course/src/Storage/CourseObjectFulfillmentStorage.php on line 40
Thanks @djdevin! The patch fixes an issue when progressing through Book and Quiz objects in a Drupal 10 course outline.
However, there are now some errors when editing a course outline:
- After adding an object to the outline, a
Drupal.AjaxError
occurs. Reloading the page then shows the added object. - When deleting an object from the outline and then clicking 'Save outline', an exception is thrown:
Call to a member function get() on null /src/Storage/CourseObjectFulfillmentStorage.php on line 106 $ret = $available[$co->get('object_type')->getString()] ?? [];
** Note: I was running into this every time an object was deleted from the outline, but now I can't replicate (?).
aisforadam → created an issue.