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

Unable to Add Form Block on Printers #53

Closed
SumErgoCogito opened this issue Aug 24, 2016 · 7 comments
Closed

Unable to Add Form Block on Printers #53

SumErgoCogito opened this issue Aug 24, 2016 · 7 comments

Comments

@SumErgoCogito
Copy link

SumErgoCogito commented Aug 24, 2016

I get the error message: "You cannot add several blocs with type 'Insertion in the form' on same object" when I try to create a new form block within the main form of the printer-type object. I do not have any existing custom fields for printers nor do I have any currently existing form blocks that include printer as an asset type. I get the same error when attempting to do this for any other asset types. I do have main form blocks for Computers, Tickets, Peripheral (Custom Devices), Phone and Contract.

edit: Updated to fields 1.3 and this problem still persists. I'm unable to add any new main form blocks, even for asset types that do not have any custom fields. Here is the message in my /var/log/httpd/error_log:
[Tue Aug 30 14:46:45.960471 2016] [:error] [pid 31843] [client 10.0.0.152:62204] script '/usr/share/glpi/plugins/fields/ajax/container_itemtypes_dropdown.php' not found or unable to stat, referer: http://glpi.ccso.ds.clackamas.us/plugins/fields/front/container.form.php

GLPI: 0.90.5
fields: 0.90-1.3
datainjection: 2.4.1
mydashboard: 1.2.1
ocsinventoryng: 1.2.1

@SumErgoCogito
Copy link
Author

Found the reference to /ajax/container_itemtypes_dropdown.php in inc/container.class.php line 402. I commented the line out and tried again, but get the same message "You cannot add several blocks with type 'Insertion in the form' on same object". No more httpd error message however.

@SumErgoCogito SumErgoCogito changed the title Unable to Add Form Block on Phones Unable to Add Form Block on Printers Aug 31, 2016
@OscarBeiro
Copy link

OscarBeiro commented Sep 6, 2016

Same here.
GLPi: 0.90.5
fields: 0.90-1.3
File injection: 2.4.1

No additional debug errors.
Funny I found your 402 reference inc/container.class.php at 241
Commented out the whole if and message persists.

orthagh pushed a commit that referenced this issue Sep 22, 2016
* Changed way of testing for already defined block for dom insert

Fixes #57 and may be #53

* Update container.class.php
@tomolimo
Copy link
Collaborator

Hello,
Could you download the master sources and do a new test?
I believe that #57 is fixing these problems.
Thank you
Regards,
Tomolimo

@SumErgoCogito
Copy link
Author

SumErgoCogito commented Sep 23, 2016

I'm getting a 500 error now when I attempt to add a new form block. Here is the relevant message from /etc/httpd/log/error_log

[Fri Sep 23 09:26:53.534376 2016] [:error] [pid 2432] [client 10.36.27.152:52132] PHP Fatal error: Call to undefined function array_column() in /usr/share/glpi/plugins/fields/inc/container.class.php on line 240, referer: http://hostname/plugins/fields/front/container.form.php

To "update" to the master branch I first disabled the plugin, backed up the current plugins/fields directory, then overwrote the plugins/fields directory with the files from the master branch.

@SumErgoCogito
Copy link
Author

Sorry, just realized I am still on php 5.4. Let me update that and get back to you.

@SumErgoCogito
Copy link
Author

Works great! Thanks tomolimo.

@tomolimo
Copy link
Collaborator

You're welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants