CalcBuilder Forum

Formular gets Error 500

User Sebastian Arnold 2024-10-22 22:17:39

Hello to everyone who can help.
I have updated Joomla to version 4.4.8 and calcbuilder to version 5.2.0.50. Unfortunately, I get a 500th server error in the console output when elements are filled in the form and then checked. Could you please help me with this? What are our next steps and how can I help?

Thank you in advance
Best regards
Sebastian

User Sebastian Arnold 2024-10-22 22:20:33

addendum:
The Form is located here
https://heimerl.skwebspace.de/angebot-anfordern

Thank you in advance
Best regards
Sebastian

User Sebastian Arnold 2024-10-22 22:46:54

addendum:
seems that i could fix the error. I received the Mail. But still got 500 error in console after submitting Mail and got not redirecting to exit page

Thank you in advance
Best regards
Sebastian

Moonsoft support 2024-10-23 09:06:57

Hi,
we've checked your page and we do see the error at the console, when clicking the pdf button. In order to see the detailed error message, you can turn on for a while the joomla error reporting setting, that way you will get the specific origin of the issue and we'll let you know how to fix.

Thanks, best regards
Silvia Martínn
Moonsoft Team

User Sebastian Arnold 2024-10-29 14:23:23

Hello,

Thank you for your answer. Unfortunately, I have already checked this in addition to various other tests. Unfortunately, the error output does not change when you activate the error messages and debugging. The single-line error output remains in the console and the page does not redirect to the thank you page. Do you have any other suggestions for solving the problem?

Thank you in advance.

Moonsoft support 2024-10-29 16:17:14

Hi,
ok, then we'd need to introduce some logging at the code to try to print a more detailed message. If you can share an access to your site we'll debug and find the origin of the issue. You can share a temp access at the 'private data' section of this ticket.

Thanks, best regards
Silvia Martín
Moonsoft Team

User Sebastian Arnold 2024-10-29 22:35:08

Hello,
thank you for your response. I appreciate your help.
I added the data requested.
Thank you in advance.

Moonsoft support 2024-10-30 10:17:44

Hi,
ok, we've checked at your site and found out the error is thrown at the server, before even reaching the Joomla code. The server has a restriction about the lenght of the parameters it can receive, and due to the number of fields your form has, there is a very long parameter being sent to achieve the function 'store the last user input'. If you configure the setting 'show last calculator inputs' to 'None' at the 'preferences' menu you should see your form working properly.
We'll study for future versions how to reduce/compress this parameter for a better handling of big forms trying to avoid server restrictions, but you can also ask your server support about the possibility of increasing this limit and allow more information in the request in case you want to enable this 'last calculator inputs' option.

Regards
Silvia Martín
Moonsoft Team




User Sebastian Arnold 2024-10-30 21:29:30

Thank you so much for your support and identifying the error.

Do you mean this field by "last calculator inputs"? I have attached it as a file. Here you can only select cookie or user. Cookie is currently selected. I therefore assume you mean somewhere else by "preferences"?
By "parameter" you don't mean the "max_input_vars"? These are already at 16000.

Another important point is:
It takes a while for the visitor to see the response text. Without visual feedback for system activity. This leads to clicking the send button several times. This in turn sends emails every time. Before the software was updated, it was redirected to a separate response page, so it was not possible to click again. Are there configuration options to a) give visual feedback that the sending process is in progress b) redirect to a separate thank you page c) prevent clicking after the form has been submitted?

How can you add the email address from the form to cc? This used to work via $variablename. This now just means that the email is sent to the $variablename@mailserver.com address.

Perhaps the last points could be added to the tutorials? Unfortunately I couldn't find them there.

Many thanks in advance and kind regards

Moonsoft support 2024-10-31 10:17:18

Hi,
yes, that's the configuration field we're refering to, you'd need to disable it (set it to 'none') and the long parameter won't be sent, thus avoiding the server limit. The max_input_vars is not the one affecting you, the server has a limit about the lenght a single parameter can contain, not the number of variables that you use (16000 is far enough). For enabling this function we suggest to wait to future release of the extension, where we'll introduce some improvements about the way to send this info that hopefully will overcome server limits for very big forms.

About your questions, there are no configuration options that will create those behaviors by default, but you can create all of them using the different js code sections
a) give visual feedback that the sending process is in progress and/or c) hide the calculate button You can use the tab JS->executed on loaded page' to show a section/hide the button info when the request is sent and hide section/show button once completed.

For ex, if you add a div with id="loading" at the end of your form, it could be something like

CB(document).on("ajaxSend", function(){
CB("#loading").show();
CB("input").hide();
}).on("ajaxComplete", function(){
CB("#loading").hide();
CB("input").show();
});


b) This is not included in any version, but if you had any method to achieve this in a previous calculator, you can use the same js or php code in order to pass/recover variables and it should work because all valid js/php is available in all versions.


-Add the email address from the form to cc:
This was formerly included at the main 'To' configuration parameter, but we think having this option at the cc/bcc fields is useful as well, so we have added it, you should see it working if you upgrade to latest version.

Hope this helps, regards
Silvia Martín
Moonsoft Team

...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!
...
Support/development 40 hours

With the peace of mind of having a professional team at your service (20% discount)

Buy now!