- Issue created by @dalin
- 🇨🇭Switzerland saschaeggi Zurich
Closing as duplicate of 🐛 Js error when saving reference field Active
Not sure what is unique about my setup and why this didn't break everything.
1. Create or edit any node.
2. Hit "Save"
Nothing happens.
In the console
Uncaught TypeError: document.querySelector(...) is null
updateFormId http://pr-334.beta.my-site.org/themes/contrib/gin/dist/js/more_actions.js?solp63:24
updateFormId http://pr-334.beta.my-site.org/themes/contrib/gin/dist/js/more_actions.js?solp63:23
updateFormId http://pr-334.beta.my-site.org/themes/contrib/gin/dist/js/more_actions.js?solp63:20
init http://pr-334.beta.my-site.org/themes/contrib/gin/dist/js/more_actions.js?solp63:9
attach http://pr-334.beta.my-site.org/themes/contrib/gin/dist/js/more_actions.js?solp63:4
attachBehaviors http://pr-334.beta.my-site.org/core/misc/drupal.js?v=10.3.10:166
...
The code in question
buttonSelector.addEventListener("click", (e => {
e.preventDefault(), document.querySelector(`[data-drupal-selector="${formId}"] [data-drupal-selector="${buttonId}"]`).click();
})));
If I put a breakpoint in, I see that ${buttonId} is "edit-submit"
This would find something just fine:
document.querySelector(`[data-drupal-selector="${buttonId}"]`)
but not with the additional form selector.
I think this is due to this last-minute commit
https://www.drupal.org/project/gin/issues/3491672
🐛
Node form sticky submit interferes with another form
Active
Active
3.0
Code
Closing as duplicate of 🐛 Js error when saving reference field Active