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

Erro na atribuição e salvamento de chamados #3414

Open petrickfreitas opened 1 year ago

petrickfreitas commented 1 year ago

Boa tarde! Estou usando o GLPI 10.0.3, e ontem atualizei a versão do Form Creator para a versão 2.13.8. Desde então venho enfrentando problemas em relação a atribuição de chamados, salvamento deles e na criação de chamados. No salvamento e atribuição de chamados ele direciona para a URL /front/ticket.form.php?id=2023110163 e a página fica toda em branco, sem dar erro nem nada, como se no diretório não houvesse nada. Quando eu dou um Ctrl + F5, ele recarrega a página e aparece você não tem acesso a essa opção. Gostaria de saber, qual a versão estável do Form Creator para essa versão do GLPI em questão. Quando eu desativo o plugin, não dar o erro, e detalhe, com perfil de administrador também não dar o erro, funciona normalmente. Só que ao desativar o plugin, quando vou em criar um novo chamado com perfil de usuário, ele não aparece nada, somente "Item não encontrado!" E ao ativar, ele aparece, só que ao gravar o chamado, em vez da página recarregar e fechar o formulário, continua da mesma tela, só aparece que um item foi salvo. Induzindo o usuário ao erro, achando que o chamado não foi aberto, abrindo mais de uma vez.

English translation

Good afternoon! I'm using GLPI 10.0.3, and yesterday I updated the Form Creator version to version 2.13.8. Since then I have been facing problems regarding assigning tickets, saving them and creating tickets. When saving and assigning tickets, it directs to the URL /front/ticket.form.php?id=2023110163 and the page is completely blank, without giving an error or anything, as if there was nothing in the directory. When I press Ctrl + F5, it reloads the page and it appears you do not have access to this option. I would like to know what is the stable version of Form Creator for this version of GLPI in question. When I deactivate the plugin, it doesn't give the error, and detail, with the administrator profile it also doesn't give the error, it works normally. But when I deactivate the plugin, when I go to create a new ticket with a user profile, nothing appears, just "Item not found!" And when activated, it appears, but when recording the call, instead of the page reloading and closing the form, it continues on the same screen, it only appears that an item has been saved. Misleading the user, thinking that the ticket was not opened, opening it more than once.

rafacss commented 1 year ago

After updating to version 2.13.8, the form creator malfunctions. When trying to send form data, the page freezes and an error is generated in the GLPI log.

[2023-11-16 21:30:27] glpiphplog.CRITICAL: *** Uncaught Exception RuntimeException: Invalid field name SELECT glpi_plugin_credit_entities.name, glpi_plugin_credit_entities.quantity, (SELECT SUM(glpi_plugin_credit_tickets.consumed) FROM glpi_plugin_credit_tickets WHERE glpi_plugin_credit_tickets.plugin_credit_entities_id = glpi_plugin_credit_entities.id AND glpi_plugin_credit_tickets.tickets_id = 0006466) AS consumed_on_ticket, (SELECT SUM(glpi_plugin_credit_tickets.consumed) FROM glpi_plugin_credit_tickets WHERE glpi_plugin_credit_tickets.plugin_credit_entities_id = glpi_plugin_credit_entities.id) AS consumed_total FROM glpi_plugin_credit_entities WHERE is_active=1 and entities_id=0 in /home/domain.com.br/public_html/src/DBmysql.php at line 1250 Backtrace : src/DBmysqlIterator.php:288 DBmysql::quoteName() src/DBmysqlIterator.php:111 DBmysqlIterator->buildQuery() src/DBmysql.php:1078 DBmysqlIterator->execute() marketplace/credit/hook.php:134 DBmysql->request() src/Plugin.php:1665 plugin_credit_get_datas() src/NotificationTarget.php:1365 Plugin::doHook() src/NotificationTemplate.php:278 NotificationTarget->getForTemplate() src/NotificationEventAbstract.php:122 NotificationTemplate->getTemplateByLanguage() src/NotificationEvent.php:187 NotificationEventAbstract::raise() src/CommonITILObject.php:8146 NotificationEvent::raiseEvent() src/Ticket.php:2222 CommonITILObject->handleNewItemNotifications() src/CommonDBTM.php:1324 Ticket->post_addItem() ...lace/formcreator/inc/targetticket.class.php:906 CommonDBTM->add() ...place/formcreator/inc/formanswer.class.php:1000 PluginFormcreatorTargetTicket->save() ...place/formcreator/inc/formanswer.class.php:1232 PluginFormcreatorFormAnswer->generateTarget() src/CommonDBTM.php:1324 PluginFormcreatorFormAnswer->post_addItem() marketplace/formcreator/ajax/formanswer.php:60 CommonDBTM->add()

petrickfreitas commented 1 year ago

Obrigado pelo respaldo! Eu voltei para a versão que já estava em uso FormCreator 2.13.6 e normalizou.

english translation

Thanks for the support! I went back to the version that was already in use FormCreator 2.13.6 and it returned to normal.

btry commented 1 year ago

Hi @petrickfreitas

In the releases notes I mentionned you must use the latest revision of GLPI which is 10.0.10 right now. Using GLPI 10.0.3 you will have fatal errors due to an improvement in the plugin for anonymisation features provided by GLPI.

btry commented 1 year ago

Hi @rafacss

It is highly probable that your issue is diferent from the issue described initially. Please ensure you are using GLPI 10.0.10 (just in case), and try to disable the plugin Credit. I'm suspecting that the 2 plugins don't worl well together, as I noticed the SQL error ocurs when working on tables of this that plugin.

rafacss commented 1 year ago

problema seja diferente do descrito inicialmente. Certifique-se de estar usando o GLP

Hi @rafacss

It is highly probable that your issue is diferent from the issue described initially. Please ensure you are using GLPI 10.0.10 (just in case), and try to disable the plugin Credit. I'm suspecting that the 2 plugins don't worl well together, as I noticed the SQL error ocurs when working on tables of this that plugin.

I'm using Glpi 10.0.10, the problem started to occur right after updating the form creator. I followed your guidance and deactivated the Credit plugin. After deactivating the Credit plugin, the problems in Form Creator disappeared. Thank you for your help!

btry commented 1 year ago

@rafacss : You should probably check the tables of Credit plugin involved in the faulty query. You may have a missing column ?

rafacss commented 1 year ago

@rafacss : You should probably check the tables of Credit plugin involved in the faulty query. You may have a missing column ?

As I wasn't using the credit plugin, despite it being in the latest version, I ended up uninstalling it because I wasn't using it. Can I help you with any checks after removing the plugin?

btry commented 1 year ago

If you remove the plugin there is no way to investigate anymore as the problem seems to be an inconsistency between its code and the structure of its tables. I don't believe for now that Formcreator is responsible of your bug.