Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
forms system
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
14 Aug 2012 at 11:11 UTC
Updated:
25 Jun 2025 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sunLet's see what breaks.
I know for sure that Taxonomy has at least 1-2 stone-age submit handlers that are still checking for 'op' instead of using dedicated #submit handlers.
Comment #3
sunAlmost all of the test failures are expected — "Undefined index: op" — those can be fixed very easily.
There's one nasty surprise though: The Views "wizard" multistep form implementation seems to depend on 'op', too... that might take more time to refactor :-/
Comment #4
sunAttached patch fixes most of the test failures.
Comment #6
sunAttached patch should resolve the Views UI failures.
Apparently, the Views Wizard plugin already contained a @todo about some weird validation logic in there. Resolved that while being there.
Comment #8
sunFixed Form\ProgrammaticTest.
Comment #10
sunComment #11
dawehnerWhat is the reason why catch DataBaseExceptionWrapper here? The usages i could found didn't used it.
So we don't want to have a redirect anymore? Not sure whether return actually works but there is at least an intention to do so.
Is there a fundamental reason we have to change so much in this patch? Couldn't we just replace $op with using triggered element?
Also lost?
Oh i thought the standard now suggests to prepend the "\"
Yeah I totally think we can remove that now, as it's silly complicated stuff.
Comment #12
sunThanks for reviewing!
re: Catching a database exception for
menu_get_item()indrupal_retrieve_form():This allows DrupalUnitTestBase to submit forms programmatically without having to install the {menu_router} & Co database schemata first.
The include file from the route definition is optional, and that was only added to support processing of cached forms, which may be re-retrieved on a different router path (e.g., /system/ajax).
re: Redirects in form submission handlers:
All of these filter forms actually do not want to redirect anywhere. They want to show the form on the same page they were displayed before.
And yeah, the instances that returned a path as string from the submit handler did not redirect anymore in the first place. That way no longer works since D6, I think.
re: Different button submit handlers:
I think we're generally moving towards separate button submit handlers. But as you probably noticed, I only figured out later when doing the patch that I could as well just replace $form_state['values']['op'] with $form_state['triggering_element']['#value']...
Don't have a strong preference there myself. Not sure whether it's worth to revert the button submit handler changes (and redo them in a separate issue).
Comment #13
sun#10: drupal8.form-state-values-clean.10.patch queued for re-testing.
Comment #15
tim.plunkettReviving this.
Comment #30
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #31
smustgrave commentedSince there's been no follow up to above in 3+ months going to close out. If still a valid task please re-open
Thanks all!