Error during form submission

Permalink Browser Info Environment
I have a couple of forms working without a problem, but needed to add one form to the website footer.
Created an new global area and inside that new area, I build that new form.
Everthing is ok, bur when i submit the form, I get the exception, "Invalid Request":

/application/blocks/form_plus/controller.php 266
        $token = Core::make('token');
        if (!$token->validate('theme_submit_qs_'.$qsID)) {
            throw new Exception(t("Invalid Request"));
        }
.

Can you help?
Thanks!

Type: Discussion
Status: In Progress
AliceYN
View Replies:
BlueFractals replied on at Permalink Reply
BlueFractals
I've tried this on my end but could not replicate the issue you were having. The form submits fine when placed within a global area.

From your supplied code above, it looks like you have created an override of Form Plus controller in "/application" folder. So there must be something wrong with the custom code you have added to the controller. So you'll have to figure that out from your end.

You might have to add this in the view.php right after the opening <form ....> line:
<?=Core::make('token')->output('theme_submit_qs_'.$qsID);?>
AliceYN replied on at Permalink Reply
AliceYN
Thank you BlueFractals!
This isn't a projet I've built, just trying to add a form. So I don't know much... it's a custom theme. Tried to put your code on view . php, but nothing happens. Also tried in on the top of footer . php, where the form is used, with no success.

I placed this new form inside the footer on a new stack I'v created with this code
$dpp = new GlobalArea('FormdoFooter');
 $dpp->display();

Is this wrong?
Another thing is, wrong captcha stops the form from submiting but it allows to submit with a field required field missing. This validation is done before submition, right?

This is all strange as all the other forms are working fine.
BlueFractals replied on at Permalink Reply
BlueFractals
Your GlobalArea code looks fine.
Looks like you are dealing with an overridden version of Form Plus in the "/application" folder by another developer. I'm not sure what else has been modified. So this is really beyond the scope of my support.
AliceYN replied on at Permalink Reply
AliceYN
BlueFractal, THANK YOU for trying to help!
Had to build it on PHP, so I'm going to loose the database log of the submition. It's only working with Mailchimp.

Best regards,

Paulo

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.1
Version Installed - 8.5.1
Database Version - 20190301133300

# concrete5 Packages
Block Designer (3.3.0), Block Designer Pro (3.0.1), Cookies Disclosure (0.9.4), ExchangeCore reCAPTCHA (1.1.1), Form Plus (2.4.2)

# concrete5 Overrides
blocks/form/view.php, blocks/form/controller.php, blocks/form, blocks/content/templates............

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - Off
Full Page Caching - On - If blocks on the particular page allow it.
Full Page Cache Lifetime - Every 1 minutes.

# Server Software
Apache

# Server API
apache2handler

# PHP Version
7.1.30

# PHP Extensions
apache2handler, bz2, calendar, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring, mcrypt, mysqli, mysqlnd, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.