Reputation: 736
I found some info here https://forge.typo3.org/issues/6166, but there is no solution. how to fix that without global settings $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError'] = 'false';
My problem: I have new extbase extention, builded with extention_builder on TYPO3 8.7.7. I haven't use RealUrl. All works fine, but in my plugin with simple action "list" exist simple fluid form with some demand fileds (method="post"). When I try to submit form , I get "Page Not Found Reason: Request parameters could not be validated (&cHash empty)".
When I use $GLOBALS['TYPO3_CONF_VARS']['FE']['pageNotFoundOnCHashError'] = 'false';
all work fine. Ofcource in my form url I have no cHash. And have no clue have generate and add that to commit my form and get list with demand result without this error. Some info, some idea, any help?
Fluid Form
<f:form name="demand" object="{demand}" action="list" class="filter-form pagination-target">
<div class="row">
<div class="col-md-3 col-lg-2">
<div class="form-group">
<label for="fulltext"><f:translate key="filter.search" default="Search:"/></label>
<f:form.textfield property="fulltext" class="form-control"/>
</div>
</div>
<div class="col-xs-2">
<div class="form-group">
<label> </label> <br>
<f:form.hidden property="pagination.perPage" class="per-page-holder"/>
<f:form.hidden property="pagination.page" class="page-holder" value="0"/>
<f:form.submit value="{f:translate(key: 'filter.submit', default: 'Filter')}" class="btn btn-warning"/>
</div>
</div>
</div>
</f:form>
-- Update ---
Thx, TYPO3 Developer for sugestions with addQueryString="1"
, but i don't have get params in my case. i think i dont need chach at all and it shoud work without it. Mb i need add something in some cHash ignore or like that?
-- Update ---
After i submit my form with method=POST i have no GET parameters, so cHash should not be required but still my TYPO3 fails with following error "... &cHash empty ..." and judging from this link https://forge.typo3.org/issues/6166 i'm not only one who has such problem.
Upvotes: 1
Views: 2617
Reputation: 802
I also had this problem in my extension and also in the search of EXT:news (see https://github.com/georgringer/news/issues/413). Perhaps it has to do something with the POST parameters, perhaps it is a bug of Extbase/Fluid.
In my case, it helped to generate a cHash by applying a GET parameter, I've added parameters "action" and "controller" to my "f:form". Adding an arbitrary parameter could also help: arguments="{dummy: 1}"
Upvotes: 1
Reputation: 3207
Try to add addQueryString = '1'
in your f:form
like below.
<f:form name="demand" object="{demand}" action="list" method="get" addQueryString="1" class="filter-form pagination-target">
........
........
</f:form>
Upvotes: 1