clonemeagain / osticket-slack

a Slack plugin for osTicket
MIT License
47 stars 34 forks source link

Error on some new tickets #20

Closed tauthement closed 4 years ago

tauthement commented 5 years ago

Hello,

I have the Slack plugin working and it sends a notification for some tickets but not all. We are using v1.11 of osTicket. Here is the error message I received in the Apache logs (edited for privacy) :

[Tue Apr 23 14:47:46.901934 2019] [:error] [pid 15059] [client x.x.x.x:58337] PHP Fatal error: Uncaught Error: Call to a member function getBody() on null in /var/www/osticket/include/plugins/osticket-slack-master/slack.php:41\nStack trace:\n#0 /var/www/osticket/include/class.signal.php(98): SlackPlugin->onTicketCreated(Object(Ticket), NULL)\n#1 /var/www/osticket/include/class.ticket.php(4047): Signal::send('ticket.created', Object(Ticket))\n#2 /var/www/osticket/open.php(42): Ticket::create(Array, Array, 'Web')\n#3 {main}\n thrown in /var/www/osticket/include/plugins/osticket-slack-master/slack.php on line 41, referer: https://helpdesk.*****.***/open.php

jburn88 commented 5 years ago

I'm seeing the same error on OSTicket 1.12. PHP 7.3.6

clonemeagain commented 5 years ago

Ooh, that's being created in the from the web client, not email. Interesting. Get body is supposed to fetch the contents of a thread entry, so there might be no text in there. Is that field mandatory on your form?

jburn88 commented 5 years ago

Thank you for the tip! Yes, the Issue Details form was disabled in our config, and we were just using the customer response. When I added back the Issue Details, and wrote something in it, it worked as expected. Maybe I'll see if I can point it to the Customer Response form instead.

bastisdad commented 4 years ago

could you help out? I have the same issue (500 error) and havent messed around with the configuration.

clonemeagain commented 4 years ago

I have the same issue

You have this exact issue? Then enable the Issue Details form field.. should be good mate.

bastisdad commented 4 years ago

yes, i have issue details on Enabled, but still getting an error.