After filling it in, the 2nd attempt is not blocked, the validation can be done, but it seems that the field is cleared just before submission. Olivier Crouzet
This bug is also present in current master (development branch). To test: * Go to patrons module * Click on Quick add new patron (I chose Patron as category) * On sample database these fields are marked as mandatory: * Surname * Cardnumber * Library * Category * Fill in Surname, leave cardnumber empty * Save - mandatory message is shown * Fill in cardnumber - save * The patron is saved * BUT: cardnumber is empty! Updating to major for data loss.
Created attachment 140568 [details] [review] Bug 31497: Prevent ID clash on quick add fields The quick add clones the original fields, including ids. This can cause some clash when other JS is running on the page. This patch updates the ids of the fields before adding to the form, which prevents bad copying/clearing of fields To test: * Go to patrons module * Click on Quick add new patron (I chose Patron as category) * On sample database these fields are marked as mandatory: * Surname * Cardnumber * Library * Category * Fill in Surname, leave cardnumber empty * Save - mandatory message is shown * Fill in cardnumber - save * The patron is saved * BUT: cardnumber is empty! APPLY PATCH * Repeat plan above * Cardnumber is correctly saved
Created attachment 140603 [details] [review] Bug 31497: Prevent ID clash on quick add fields The quick add clones the original fields, including ids. This can cause some clash when other JS is running on the page. This patch updates the ids of the fields before adding to the form, which prevents bad copying/clearing of fields To test: * Go to patrons module * Click on Quick add new patron (I chose Patron as category) * On sample database these fields are marked as mandatory: * Surname * Cardnumber * Library * Category * Fill in Surname, leave cardnumber empty * Save - mandatory message is shown * Fill in cardnumber - save * The patron is saved * BUT: cardnumber is empty! APPLY PATCH * Repeat plan above * Cardnumber is correctly saved Signed-off-by: David Nind <david@davidnind.com>
Created attachment 140606 [details] [review] Bug 31497: Prevent ID clash on quick add fields The quick add clones the original fields, including ids. This can cause some clash when other JS is running on the page. This patch updates the ids of the fields before adding to the form, which prevents bad copying/clearing of fields To test: * Go to patrons module * Click on Quick add new patron (I chose Patron as category) * On sample database these fields are marked as mandatory: * Surname * Cardnumber * Library * Category * Fill in Surname, leave cardnumber empty * Save - mandatory message is shown * Fill in cardnumber - save * The patron is saved * BUT: cardnumber is empty! APPLY PATCH * Repeat plan above * Cardnumber is correctly saved Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
child_input.attr("id") + "_qa" Please clarify :) + console.log( orig_input_id); Debug ?
(In reply to Marcel de Rooy from comment #5) > child_input.attr("id") + "_qa" > Please clarify :) > If you want to prevent clashing, wouldnt you need a more robust suffix?
Created attachment 140703 [details] [review] Bug 31497: (follow-up) Expand ID suffix, fix password2, remove debug
Created attachment 140808 [details] [review] Bug 31497: Prevent ID clash on quick add fields The quick add clones the original fields, including ids. This can cause some clash when other JS is running on the page. This patch updates the ids of the fields before adding to the form, which prevents bad copying/clearing of fields To test: * Go to patrons module * Click on Quick add new patron (I chose Patron as category) * On sample database these fields are marked as mandatory: * Surname * Cardnumber * Library * Category * Fill in Surname, leave cardnumber empty * Save - mandatory message is shown * Fill in cardnumber - save * The patron is saved * BUT: cardnumber is empty! APPLY PATCH * Repeat plan above * Cardnumber is correctly saved Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 140809 [details] [review] Bug 31497: (follow-up) Expand ID suffix, fix password2, remove debug Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for upcoming 22.05.07 release
applied to 21.11 for 21.11.14
21.05.x not affected, no backport. Nothing to document, marking resolved.
*** Bug 30978 has been marked as a duplicate of this bug. ***
*** Bug 29303 has been marked as a duplicate of this bug. ***