pluginsGLPI / formcreator

GLPI Plugin Formcreator (DOWNLOAD : https://github.com/pluginsGLPI/formcreator/releases)
http://www.teclib-edition.com
GNU General Public License v3.0
174 stars 125 forks source link

submit button displayed only when navigator is in private mode #3250

Open davidgras38 opened 1 year ago

davidgras38 commented 1 year ago

*Describe the bug The submit button disappears or not appear and the only way I found to bypass this problem is to use private navigation (where problem does not appear)

To Reproduce with edge or chrome on windows https://xxxxxx/plugins/formcreator/front/formdisplay.php?id=14)

Expected behavior The submit button should always appears.

Screenshots

GLPI / Plugins (please complete the following information):

Desktop (please complete the following information):

Smartphone (please complete the following information): it seems that problem does not appear on smartphone

Additional context In form creator, the submit button is taged as "always display"

Thank you, best regards,

btry commented 1 year ago

Hi

Please do not expose here a public form or you take the risk of being spammed. If the captcha feature is not enabled, you may use it to reduce risk of spamming.

btry commented 1 year ago

I don't reproduce; then please check for errors related to this page

davidgras38 commented 1 year ago

Hello,

Thank you a lot (and for deleting my public url, sorry...)

I have no errors in php-errors.log neither in sql-errors.log

in the console brower I have 2 errors but they alsa appear in private mode when the submit button appears.

In the following link you can find videos where I reproduce the problem : https://

I also join a screenshot of the configuration of the form where the "submit button" is "always display"

Thank you a lot!

Best regards

btry commented 1 year ago

Hi

Links to the videos and screenshots are missing.

davidgras38 commented 1 year ago

Hi, Here a link for 3 videos : https://we.tl/t-tYvC95H9xF? Videos named chrome and edge show the error with submit button which disappears. The third video whos edge "in private" mode where submit button does not disappear.

Thank you again.

Best regards

btry commented 1 year ago

Hi

In the 2 videos (Chrome, Edge) I see that the "Save" button is visible, but disappears whil you're filling the form. This means that the problem is very likely in the HTTP request to formcreator/ajax/showfields.php .

In the video using Edge in private mode, the "Save" button is still visible when you fill the form.

Open the developer tools of your browser then fill the form. While typing things, you will see several HTTP requests to the above URL. Check the HTTP response code, it should be 200. Show the response body of a request sent when or after the button disappears. It should be a valid JSON string.

davidgras38 commented 1 year ago

Hello, You are right. In private mode, the http response code is 200 and the response body is valid json. When I am not in private mode, the http response is also 200 but the response body is (preview of dev tools)


Attention

L'action que vous avez réalisée n'est pas autorisée. GLPI Copyright (C) 2015-2022 Teclib' and contributors


and the first line of the response body is <!DOCTYPE html>

GLPI - Accès refusé" But I don't understand why... Thank you a lot! Best regards, D.
btry commented 1 year ago

If you have invalid JSON, can you show it ?

If the invalid content is some pho error, you will find it In php-errors.log with a complete backtrace. This may help to find out the problem.

davidgras38 commented 1 year ago

Actually it is not json but html response tough http response code is 200. I copied the beginning of the response body. (I have just hide the content of glpi:csrf_token as I did not know) I have no errors in php-errors.log neigther in sql-errors.log.

Thank you again!

<!DOCTYPE html>

GLPI - Accès refusé Githubissues.
  • Githubissues is a development platform for aggregating issues.