Invalid form action is generated on errorPresenter

Notice: This thread is very old.
maarlin
Member | 207
+
0
-

The problem is caused by this:
https://github.com/…/UI/Form.php#L69

When user gets an error rendered by an ErrorPresenter, and there's a form inside layout (therefore the component is inside BasePresenter), the action is generated as similar:

/error/?do=componentName-submit

Because Error presenter is not linkable, ain't sure about any good solution than:

  1. overloading attached() method in desired form and setting it up to any other linkable presenter in case it is attached to error presenter
  2. add a ONE_WAY route for error presenter, which would lead to a linkable presenter

Any other ideas?

Last edited by maarlin (2013-04-08 07:50)

maarlin
Member | 207
+
0
-

I've found a workaround (actually a colleague of main) – just manually set the action to a specific presenter:

$url = $this->link( 'Homepage:', array(
	Presenter::SIGNAL_KEY => $name . self::NAME_SEPARATOR . 'submit'
) );
$form->setAction( $url );