formcreator icon indicating copy to clipboard operation
formcreator copied to clipboard

issue creating forms

Open killmasta93 opened this issue 3 years ago • 10 comments

Describe the bug Hi Currently installed the form creator when i create does not let me save does not show any buttons? To Reproduce Steps to reproduce the behavior:

  1. Go to 'home--administration--forms'
  2. Click on '+ '
  3. Scroll down to 'to find the save button did not find it'
  4. See error

Screenshots image

**GLPI / Plugins 4.2.0

  • GLPI version 9.5.2

Thank you

killmasta93 avatar Aug 01 '22 01:08 killmasta93

Hi

You probably have an error in sql-errors.log, php-errors.log or in the errors log of your http server. Can you show it ? Select only those related to the problem. put it ( or them) here avoiding screenshot. Text is better

btry avatar Aug 01 '22 05:08 btry

sorry for the late reply, didnt get alerted, i was checking on the logs but didnt see anything, currently i have docker as GLPI whats odd is that im using version 2.15.5 but on the webgui shows 2.15.4 image

killmasta93 avatar Aug 18 '22 00:08 killmasta93

Hi

Let's check if you have a HTTP 500 response code : open the developer tools of your browser, and view the tab "Network". Next browse in GLPI to the form and reproduce the problem. You will find a HTTP request to common.tabs.php. This request loads a tab content. Check if this request ends with the code 200 or the code 500.

If you get a code 500, then there is a high chance to get a PHP backtrace in the HTTP server's log. This log is (by default and for debian based distros) in /var/log/apache/errors.log or /var/log/nginx/errors.log for Anache and Nginx respectively.

Without backtrace I cannot investigate further because I don't have enough clues to find the faulty code.

btry avatar Aug 18 '22 08:08 btry

thank you so much for the reply, so i ran the following tests but did not find the in HTTP request the common.tabs.php attaching picture

image

killmasta93 avatar Aug 19 '22 03:08 killmasta93

Hi

I found the reason. I missed the fact that your form does not exist yet. In this case there is no HTTP request to common.tabs.php. Check instead the HTTP request form.form.php.

It appears that the problem is near the display of the HTML inputs for users and group validators.

btry avatar Aug 19 '22 06:08 btry

thank you so much reply, so when i click at the bottom

image

and i get this

scripts.js?v=2.12.4:2034 Uncaught TypeError: Cannot read properties of null (reading 'style')
    at plugin_formcreator_changeValidators (scripts.js?v=2.12.4:2034)
    at HTMLSelectElement.onchange (form.form.php:1)
    at Object.trigger (base.min.js?v=9.5.2:25)
    at HTMLSelectElement.<anonymous> (base.min.js?v=9.5.2:25)
    at Function.each (base.min.js?v=9.5.2:14)
    at jQuery.fn.init.each (base.min.js?v=9.5.2:14)
    at jQuery.fn.init.trigger (base.min.js?v=9.5.2:25)
    at n.i.define.n.select (base.min.js?v=9.5.2:446)
    at s.<anonymous> (base.min.js?v=9.5.2:446)
    at s.i.define.n.invoke (base.min.js?v=9.5.2:446)
plugin_formcreator_changeValidators @ scripts.js?v=2.12.4:2034
onchange @ form.form.php:1
trigger @ base.min.js?v=9.5.2:25
(anonymous) @ base.min.js?v=9.5.2:25
each @ base.min.js?v=9.5.2:14
each @ base.min.js?v=9.5.2:14
trigger @ base.min.js?v=9.5.2:25
i.define.n.select @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
i.define.n.invoke @ base.min.js?v=9.5.2:446
i.define.n.trigger @ base.min.js?v=9.5.2:446
i.define.s.trigger @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
i.define.n.invoke @ base.min.js?v=9.5.2:446
i.define.n.trigger @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
dispatch @ base.min.js?v=9.5.2:25
m.handle @ base.min.js?v=9.5.2:25
scripts.js?v=2.12.4:2037 Uncaught TypeError: Cannot read properties of null (reading 'style')
    at plugin_formcreator_changeValidators (scripts.js?v=2.12.4:2037)
    at HTMLSelectElement.onchange (form.form.php:1)
    at Object.trigger (base.min.js?v=9.5.2:25)
    at HTMLSelectElement.<anonymous> (base.min.js?v=9.5.2:25)
    at Function.each (base.min.js?v=9.5.2:14)
    at jQuery.fn.init.each (base.min.js?v=9.5.2:14)
    at jQuery.fn.init.trigger (base.min.js?v=9.5.2:25)
    at n.i.define.n.select (base.min.js?v=9.5.2:446)
    at s.<anonymous> (base.min.js?v=9.5.2:446)
    at s.i.define.n.invoke (base.min.js?v=9.5.2:446)
plugin_formcreator_changeValidators @ scripts.js?v=2.12.4:2037
onchange @ form.form.php:1
trigger @ base.min.js?v=9.5.2:25
(anonymous) @ base.min.js?v=9.5.2:25
each @ base.min.js?v=9.5.2:14
each @ base.min.js?v=9.5.2:14
trigger @ base.min.js?v=9.5.2:25
i.define.n.select @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
i.define.n.invoke @ base.min.js?v=9.5.2:446
i.define.n.trigger @ base.min.js?v=9.5.2:446
i.define.s.trigger @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
i.define.n.invoke @ base.min.js?v=9.5.2:446
i.define.n.trigger @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
dispatch @ base.min.js?v=9.5.2:25
m.handle @ base.min.js?v=9.5.2:25
scripts.js?v=2.12.4:2034 Uncaught TypeError: Cannot read properties of null (reading 'style')
    at plugin_formcreator_changeValidators (scripts.js?v=2.12.4:2034)
    at HTMLSelectElement.onchange (form.form.php:1)
    at Object.trigger (base.min.js?v=9.5.2:25)
    at HTMLSelectElement.<anonymous> (base.min.js?v=9.5.2:25)
    at Function.each (base.min.js?v=9.5.2:14)
    at jQuery.fn.init.each (base.min.js?v=9.5.2:14)
    at jQuery.fn.init.trigger (base.min.js?v=9.5.2:25)
    at n.i.define.n.select (base.min.js?v=9.5.2:446)
    at s.<anonymous> (base.min.js?v=9.5.2:446)
    at s.i.define.n.invoke (base.min.js?v=9.5.2:446)
plugin_formcreator_changeValidators @ scripts.js?v=2.12.4:2034
onchange @ form.form.php:1
trigger @ base.min.js?v=9.5.2:25
(anonymous) @ base.min.js?v=9.5.2:25
each @ base.min.js?v=9.5.2:14
each @ base.min.js?v=9.5.2:14
trigger @ base.min.js?v=9.5.2:25
i.define.n.select @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
i.define.n.invoke @ base.min.js?v=9.5.2:446
i.define.n.trigger @ base.min.js?v=9.5.2:446
i.define.s.trigger @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
i.define.n.invoke @ base.min.js?v=9.5.2:446
i.define.n.trigger @ base.min.js?v=9.5.2:446
(anonymous) @ base.min.js?v=9.5.2:446
dispatch @ base.min.js?v=9.5.2:25
m.handle @ base.min.js?v=9.5.2:25

killmasta93 avatar Aug 21 '22 20:08 killmasta93

Hi

The JS error happens after an other problem. It is probably a consequence of the missing parts in the page. Is there really nothing relevant in the logs serverside ?

btry avatar Aug 21 '22 20:08 btry

thanks for the reply, i was checking the server logs on GLPI it was in another location finally found it and shows this

root@dockers:/glpi/html/glpi/files/_log# tail -f php-errors.log
[2022-08-21 16:45:46] glpiphplog.CRITICAL:   *** Uncaught Exception Error: Call to undefined method Session::getNewIDORToken() in /var/www/html/glpi/plugins/formcreator/inc/form.class.php at line 559
  Backtrace :
  inc/commonglpi.class.php:627                       PluginFormcreatorForm->showForm()
  ajax/common.tabs.php:92                            CommonGLPI::displayStandardTab()
  

as soon i click on the plugin shows this log which

killmasta93 avatar Aug 21 '22 21:08 killmasta93

Hi

OK, You need to upgrade GLPI to the latest 9.5.8 version. The problem should be solved.

btry avatar Aug 22 '22 06:08 btry

thank you again going to update to 10 and postback

killmasta93 avatar Aug 23 '22 03:08 killmasta93

HI

This issue is obsolete, I close.

btry avatar Apr 25 '23 12:04 btry