Form Block $this->action Page Not Found

Permalink
Hi,

I apologise if this has already been discussed anywhere but I can't seem to find anything on it,

I'm currently using 5.7.2

When I add a form block into a global area the post back gives me a 'Page Not Found' error but works fine when used in a general (non global) area.

I'm using everything out the box with no customisations or custom templates.

Is this a know thing and is there a work around?

Thanks

Kieran

kieranrushby
 
Tom0 replied on at Permalink Reply
I was just about to post the exact same thing. Just ran into this problem my self. Very annoying.


EDIT:

This only happens when you have only one page (The homepage)

EDIT:

Doesn't work on the new pages
andrew replied on at Permalink Reply
andrew
I don't know if that has anything to do with it – I think you may have just submitted the form on a page that has another form block on it.

I think block actions – used by interactive blocks that post back, like form and survey – are broken when included in global areas. I have added this as something to fix in Github.
kieranrushby replied on at Permalink Reply
kieranrushby
Ah ok, as long as i'm not going loony.

Do you know if there is anyway round it for the time being? All i'm trying to do is get the good old contact form in a global area.

Thanks

Kieran

Edit: I think I have answered my own question, Essentially create an element in the theme and hard code the form and submission, it is a global area after all. It will do until a new solutions comes up.
dclmedia replied on at Permalink Reply
dclmedia
I have tried hardcoding the form (a simple single field mailing list) and it still kicks out the 404 error.

This is what I have hardcoded...

<div class="ccm-custom-style-container ccm-custom-style-main-718 block-subscribe-form" >
                        <div id="formblock718" class="ccm-block-type-form">
                           <form enctype="multipart/form-data" class="form-stacked" id="miniSurveyView718" class="miniSurveyView" method="post" action="/clanline/index.php/submit_form#1417089750">
                              <div class="fields">
                                 <div class="form-group field field-email col-md-12">
                                    <input name="Question6" id="Question6" class="form-control test" type="email" placeholder="Enter your email address" value="" />         
                                 </div>
                              </div><!-- .fields -->
                              <div class="form-actions">
                                 <input type="submit" name="Submit" class="btn btn-primary" value="GO!" />
                              </div>
                              <input name="qsID" type="hidden" value="1417089750" />
                              <input name="pURI" type="hidden" value="" />
                           </form>
                        </div><!-- .formblock -->
dclmedia replied on at Permalink Reply
dclmedia
I've been doing some experiments with this, and I have found that if I have a form of any type in a standard Area the form in the Global Area is processed by the form in the standard Area and not by itself. The 'Global' form isnt calling the controller.php file.

Andrew, is there something that needs to be done to this line of code to call the controller.

$formAction = $view->action('submit_form').'#'.$qsID;


escpecially the
$view->action

element.

How do other blocks call/reference the controller.php file from a GlobalArea, and what is different with the form block?

Apologies if this doesn't make much sense, very happy to discuss further.