Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP warnings (related to validation feature ?) #27

Closed
dethegeek opened this issue Oct 16, 2014 · 2 comments
Closed

PHP warnings (related to validation feature ?) #27

dethegeek opened this issue Oct 16, 2014 · 2 comments
Labels
Projects
Milestone

Comments

@dethegeek
Copy link
Contributor

While setting up a form I see 2 warnings in debug mode. Here are the backtraces :

2014-10-16 15:06:09
Notice(8): Undefined index: validation_required
Backtrace :
/glpi/inc/toolbox.class.php:531 Toolbox::userErrorHandlerNormal()
/glpi/plugins/formcreator/inc/form.class.php:319 Toolbox::userErrorHandlerDebug()
/glpi/plugins/formcreator/front/form.form.php:77 PluginFormcreatorForm->showForm()

2014-10-16 15:06:09
Notice(8): Undefined index: validation_required
Backtrace :
/glpi/inc/toolbox.class.php:531 Toolbox::userErrorHandlerNormal()
/glpi/plugins/formcreator/inc/form.class.php:363 Toolbox::userErrorHandlerDebug()
/glpi/plugins/formcreator/front/form.form.php:77 PluginFormcreatorForm->showForm()

@dethegeek
Copy link
Contributor Author

I'm reviewing the code and I think the issue is related to the upgrade from the first release.

The table glpi_plugin_formcreator_forms does not have the column "validation_required".

The plugin should increment its version and update the tables upon upgrade.

@neeftarah
Copy link
Contributor

The code was here... But the condition was wrong. Thank's for this issue.

For fixing it without reinstall the plugin just run the SQL command:
"ALTER TABLE glpi_plugin_formcreator_forms ADD validation_required tinyint(1) NOT NULL DEFAULT '0';"

The correction will included in next tag.

@neeftarah neeftarah added the bug label Oct 17, 2014
@neeftarah neeftarah added this to the 0.84-2.2 milestone Oct 17, 2014
@neeftarah neeftarah self-assigned this Oct 17, 2014
@neeftarah neeftarah modified the milestones: 0.84-2.1.1, 0.84-2.2 Oct 24, 2014
@neeftarah neeftarah assigned neeftarah and unassigned neeftarah Jan 23, 2015
@neeftarah neeftarah modified the milestones: 0.84-2.1.1, 0.85-1.1 Feb 13, 2015
@ajsb85 ajsb85 added this to Done in Plugin May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Plugin
  
Done
Development

No branches or pull requests

2 participants