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

[9.3.0] Solution N/A in notification mail #4266

Closed
ppenin opened this issue Jun 29, 2018 · 14 comments
Closed

[9.3.0] Solution N/A in notification mail #4266

ppenin opened this issue Jun 29, 2018 · 14 comments
Labels
Milestone

Comments

@ppenin
Copy link

ppenin commented Jun 29, 2018

  • Steps to reproduce (which actions have you made) :
    When a solution is added in a ticket, the ticket is closed and a mail is sent.

  • Expected result :
    Solution description in the mail (ok in 9.2.4 and earlier)
    image

  • Actual result :
    N/A instead of th solution description
    image

  • Screenshot of the problem (if pertinent) :

Fields :
image

In the notification template :
image

  • Your GLPI setup (you can find it in Setup > General menu, System tab) :

GLPI 9.3.0 (/glpi => /usr/share/glpi) Installation mode: TARBALL

Operating system: Linux s001linux02 4.4.0-128-generic #154-Ubuntu SMP Fri May 25 14:15:18 UTC 2018 x86_64 PHP 7.0.30-1+ubuntu16.04.1+deb.sury.org+1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, calendar, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_mysql, posix, readline, session, shmop, sockets, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zlib) Setup: max_execution_time="30" memory_limit="256M" post_max_size="100M" safe_mode="" session.save_handler="files" upload_max_filesize="100M" Software: Apache/2.4.18 (Ubuntu) (Apache/2.4.18 (Ubuntu) Server at 10.100.10.18 Port 80) Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0 Server Software: (Ubuntu) Server Version: 5.7.22-0ubuntu0.16.04.1 Server SQL Mode: Parameters: root@localhost/glpi Host info: Localhost via UNIX socket mysqli extension is installed ctype extension is installed fileinfo extension is installed json extension is installed mbstring extension is installed zlib extension is installed curl extension is installed gd extension is installed simplexml extension is installed xml extension is installed ldap extension is installed imap extension is installed Zend OPcache extension is installed APCu extension is not present xmlrpc extension is not present CAS extension is not present Database version seems correct (5.7.22) - Perfect! /usr/share/glpi/config : OK /usr/share/glpi/files : OK /usr/share/glpi/files/_dumps : OK /usr/share/glpi/files/_sessions : OK /usr/share/glpi/files/_cron : OK /usr/share/glpi/files/_graphs : OK /usr/share/glpi/files/_lock : OK /usr/share/glpi/files/_plugins : OK /usr/share/glpi/files/_tmp : OK /usr/share/glpi/files/_cache : OK /usr/share/glpi/files/_rss : OK /usr/share/glpi/files/_uploads : OK /usr/share/glpi/files/_pictures : OK /usr/share/glpi/files/_log : OK Web access to files directory is protected : OK

htmLawed version 1.2.4 in (/usr/share/glpi/lib/htmlawed) SimplePie version 1.5.1 in (/usr/share/glpi/vendor/simplepie/simplepie/library) TCPDF version 6.2.17 in (/usr/share/glpi/vendor/tecnickcom/tcpdf) michelf/php-markdown in (/usr/share/glpi/vendor/michelf/php-markdown/Michelf) true/punycode in (/usr/share/glpi/vendor/true/punycode/src) iacaml/autolink in (/usr/share/glpi/vendor/iamcal/lib_autolink) sabre/vobject in (/usr/share/glpi/vendor/sabre/vobject/lib)

Server: '10.100.10.1', Port: '389', BaseDN: 'DC=mydomain,DC=priv', Connection filter: none, RootDN: 'CN=Service Alerte,OU=Comptes de Services,OU=001 (FSS),DC=mydomain,DC=priv', Use TLS: none

Not active

Way of sending emails: SMTP ([email protected])

Name: '[email protected]' Active: Yes Server: '{10.100.10.66/pop/novalidate-cert/notls}INBOX' Login: 'xxxxxx' Password: Yes

barcode Name: Barcode Version: 2.1.0 State: Enabled fields Name: Champs supplémentaires Version: 1.8.0 State: Enabled timelineticket Name: Chronologie des tickets Version: 9.2+1.0 State: Not installed escalade Name: Escalades Version: 2.3.0 State: Enabled simcard Name: Gestion de cartes SIM Version: 1.4.2 State: Enabled pdf Name: Impression pdf Version: 1.3.1.1 State: Not installed datainjection Name: Injection de fichiers Version: 2.6.0 State: Enabled mailanalyzer Name: Mail Analyzer Version: 1.3.8 State: Enabled ocsinventoryng Name: OCS Inventory NG Version: 1.4.3 State: Not installed mreporting Name: Plus de rapports Version: 1.4.1 State: Not installed satisfaction Name: Plus de satisfaction Version: 1.2.1 State: Not installed reports Name: Rapports Version: 1.11.3 State: Enabled dashboard Name: Tableau de bord Version: 0.9.2 State: Enabled

@ppenin
Copy link
Author

ppenin commented Jul 1, 2018

Same issue with problems and changes solutions in mail : N/A displayes

trasher added a commit to trasher/glpi that referenced this issue Jul 2, 2018
@orthagh orthagh added the bug label Jul 2, 2018
@orthagh orthagh added this to the 9.3.1 milestone Jul 2, 2018
@trasher
Copy link
Contributor

trasher commented Jul 2, 2018

Could you please test proposed fix in #4272?

@ppenin
Copy link
Author

ppenin commented Jul 2, 2018

Fix tested. White page when validating the solution.
With debug mode :

Fatal error: Uncaught Error: Call to a member function getField() on boolean in /usr/share/glpi/inc/notificationtargetcommonitilobject.class.php:1005 Stack trace: #0 /usr/share/glpi/inc/notificationtargetticket.class.php(293): NotificationTargetCommonITILObject->getDataForObject(Object(Ticket), Array, false) #1 /usr/share/glpi/inc/notificationtargetcommonitilobject.class.php(705): NotificationTargetTicket->getDataForObject(Object(Ticket), Array) #2 /usr/share/glpi/inc/notificationtarget.class.php(1153): NotificationTargetCommonITILObject->addDataForTemplate('closed', Array) #3 /usr/share/glpi/inc/notificationtemplate.class.php(250): NotificationTarget->getForTemplate('closed', Array) #4 /usr/share/glpi/inc/notificationeventabstract.class.php(103): NotificationTemplate->getTemplateByLanguage(Object(NotificationTargetTicket), Array, 'closed', Array) #5 /usr/share/glpi/inc/notificationevent.class.php(159): NotificationEventAbstract::raise('closed', Object(Ticket), Array, '', Array, Object(NotificationTargetTicket), Object(No in /usr/share/glpi/inc/notificationtargetcommonitilobject.class.php on line 1005

With a var_dump($solution); before the $solution->getField('solutiontypes_id') I have bool(true).

@trasher
Copy link
Contributor

trasher commented Jul 2, 2018

@ppenin thanks for the test, I indeed made a mistake. It should be OK now, could you please test again?

@ppenin
Copy link
Author

ppenin commented Jul 2, 2018

@trasher It works now, we have the solution in the notification.
Thank you.

@trasher
Copy link
Contributor

trasher commented Jul 2, 2018

Super, thank you for testing :)

@renamendes
Copy link

The solution did not work for me. Can you help me?

[code]   GLPI 9.3.0 (/glpi => /var/www/html/glpi) Installation mode: TARBALL

Operating system: Linux GLPI2 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 PHP 5.6.36-0+deb8u1 apache2handler (Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apc, apcu, bcmath, bz2, calendar, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mhash, mysql, mysqli, openssl, pcre, pdo_mysql, posix, readline, session, shmop, soap, sockets, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, zip, zlib) Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files" upload_max_filesize="2M" Software: Apache/2.4.10 (Debian) (Apache/2.4.10 (Debian) Server at glpi.asperbras.com Port 80) Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0 Server Software: Debian 9.1 Server Version: 10.1.26-MariaDB-0+deb9u1 Server SQL Mode: Parameters: glpi@localhost/glpi Host info: Localhost via UNIX socket mysqli extension is installed ctype extension is installed fileinfo extension is installed json extension is installed mbstring extension is installed zlib extension is installed curl extension is installed gd extension is installed simplexml extension is installed xml extension is installed ldap extension is installed imap extension is installed Zend OPcache extension is installed APCu extension is installed xmlrpc extension is installed CAS extension is not present Database version seems correct (10.1.26) - Perfect! /var/www/html/glpi/config : OK /var/www/html/glpi/files : OK /var/www/html/glpi/files/_dumps : OK /var/www/html/glpi/files/_sessions : OK /var/www/html/glpi/files/_cron : OK /var/www/html/glpi/files/_graphs : OK /var/www/html/glpi/files/_lock : OK /var/www/html/glpi/files/_plugins : OK /var/www/html/glpi/files/_tmp : OK /var/www/html/glpi/files/_cache : OK /var/www/html/glpi/files/_rss : OK /var/www/html/glpi/files/_uploads : OK /var/www/html/glpi/files/_pictures : OK /var/www/html/glpi/files/_log : OK Web access to the files directory should not be allowed but this cannot be checked automatically on this instance. Make sure acces to error log file is forbidden; otherwise review .htaccess file and web server configuration.

htmLawed version 1.2.4 in (/var/www/html/glpi/lib/htmlawed) SimplePie version 1.5.1 in (/var/www/html/glpi/vendor/simplepie/simplepie/library) TCPDF version 6.2.17 in (/var/www/html/glpi/vendor/tecnickcom/tcpdf) michelf/php-markdown in (/var/www/html/glpi/vendor/michelf/php-markdown/Michelf) true/punycode in (/var/www/html/glpi/vendor/true/punycode/src) iacaml/autolink in (/var/www/html/glpi/vendor/iamcal/lib_autolink) sabre/vobject in (/var/www/html/glpi/vendor/sabre/vobject/lib)

@robmura76
Copy link

Sorry, I have the same problem, but I cannot undestand where is the solution or workaround waiting for 9.3.1 update.

thanks

@viveklogin
Copy link

Same issue with problems and changes solutions in mail : N/A displayes

I am also facing the same problem and got a perfect solution for this issue just replace notificationtargetcommonitilobject.class.php file with 9.3.1 file and njoy :)

@trasher
Copy link
Contributor

trasher commented Sep 13, 2018

Why the hell doing such a hack? Just update to 9.3.1 and you're done.

Mixing files beetween versions is certainly not a good idea. You can't be sure there are no other implications (and we won't check for this).

@viveklogin
Copy link

We are in process to upgrade in new version and my change is pending for approval. My 1500+ users are not getting any updates through GLPI emails after that i did this and it's temp solution.

@trasher
Copy link
Contributor

trasher commented Sep 13, 2018

You can't be sure there are no other implications

The way you advice may cause unpredictable issues.

@trasher
Copy link
Contributor

trasher commented Sep 13, 2018

Just to be clear: do what you want on your instance, and if you break something, deal with it. But please do not tell this is a "perfect solution": this is not. Or maybe on some specific cases only.
Anyways... The only official way to go is to upgrade to 9.3.1 (which is a minor).

@viveklogin
Copy link

And i am also facing strange behavior in glpi from day 1, not able to see any tickets in parent entity but child entity is working perf
glpi issue
ectly.

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

No branches or pull requests

6 participants