Closed (fixed)
Project:
Scheduler
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 May 2016 at 09:11 UTC
Updated:
7 Aug 2016 at 11:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ciss commentedComment #3
legovaerI added a simple check in the if statement that checks wether
clicked_buttonhas been set.Comment #4
jonathan1055 commentedThanks for the patch Legovaer. It removes the error/warning, but we should also think about the implications of using #executes_submit_callback. @ciss I presume you are setting the submit button's #executes_submit_callback to FALSE and then submitting the form in some other way? This patch would mean that you wold not skip over the validation on 'delete' in this case. How exactly are you submitting the form? and does it allow the 'delete' operation?
Comment #5
ciss commented@legovaer I always find checking the submit value to be quite fragile for buttons that use the standard name "op". I'd propose checking for submit callbacks on triggering_element instead:
@jonathan1055 I'm using a select element that triggers a form rebuild when the selection is changed:
As you can see by looking at #limit_validation_errors the intention isn't even to fully submit the node form.
Comment #6
jonathan1055 commented@ciss Thanks for that suggestion, yes it does seem better to check for a programatic value instead of text. Patch for review and testing.
Comment #8
jonathan1055 commentedAvoiding errors with the 'delete' button operation is covered by our simpletests, so that's good. Also manual testing worked fine. There are no other places where the code checks for
t('Delete'). Also, this fix is not applicable in 8.x because the node edit form has a link for delete, not a button.Committed and fixed. Thanks @ciss and @legovaer