Adding these hooks was a big mistake, because they are pointless.
A Views Form handler can have views_form_validate() and views_form_submit() methods that handle everything.
It can also add additional validation and submit callbacks either through the views_form() method or through a form alter (which is what VBO does).
No point in having a third way of doing it.
Plus, these hooks fire for all views forms, so you always need to check if it's firing on your form and whether you need to actually do anything (which is not the case with other two approaches), which is bad DX.

We never actually recommended that these hooks be used, just documented that they exist.
VBO hasn't used them in a long time, and I've posted a patch to make Draggableviews stop using it: #1477132: Stop using hook_views_form_submit(), move code to a proper submit callback.
Commerce Add To Cart Extras is also not using it.

So, an option could be to just mark those hooks as deprecated, but I'm much more in favor of just removing them.
If there's an obscure module using them, that would be a signal to actually fix their code (and I'd be glad to do it for them).

So let's evaluate the attached patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

As people use already the dev version of draggableviews, and the patch is committed there is no problem to remove this from views.

I agree that using the submit/validate on the handlers are the right place to use.
Thanks for the patch!

Committed to 7.x-3.x

bojanz’s picture

Status: Patch (to be ported) » Needs review
FileSize
3.47 KB

Great! Here's the D6 version.

pounard’s picture

This actually broke the site I'm working on, it took me a while to realize the API has changed. Can it be reverted in the 3.x stable series? Just forget it, a simple form_alter is OK.

EDIT: And my implementation is for adding simple business checks over a the Commerce cart form without overriding it.

Chris Matthews’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

The Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue