Jump to content

Support Manager Plugin causing errors in Blesta logs on PHP 7.4


Alk

Recommended Posts

Hello,

I have narrowed down that a large number of errors in the blesta logs (logs_blesta) folder is being caused by the Support Manager plugin when browsing the Knowledgebase (KB) and using Support Tickets under PHP 7.4. There are no visible problems with the functioning of the KB or Support Tickets, however, if you have robots trawling your KB, or use your Support Desk a lot, you get a lot of errors appearing in your logs. So I have been trying to find out where the errors in the logs are coming from and enabling error reporting once I have narrowed it down, so that I can tell you the exact pages.

I am running Blesta v5.1.2. It is important to note that these errors appear in the general-error and general-notice logs and they only appear under PHP 7.4 and they do not appear under PHP 7.2. To eliminate it being an issue with my existing install, I installed a fresh install of Blesta v5.1.2 and re-created the problem.

Focusing on the KB for now; I have attached a video showing where the errors occur (please be patient, as I was a bit slow with the mouse cursor!). With error reporting enabled, you can see from my video that the errors are logged as you browse the KB (URL: /client/plugin/support_manager/knowledgebase/) and the articles (eg. URL: /plugin/support_manager/knowledgebase/view/1/this-is-a-test-kb-article-no-1/1/).

The errors are as follows:

From general-error log (these only appear with error reporting enabled):

[2021-07-16T20:45:36.016244+00:00] general.ERROR: UnknownException: Trying to access array offset on value of type null in /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php:252 Stack trace: #0 /home/username/public_html/dev/blesta/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(232): UnknownException::setErrorHandler(8, 'Trying to acces...', '/home/username/...', 252, Array) #1 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(252): Monolog\ErrorHandler->handleError(8, 'Trying to acces...', '/home/username/...', 252, Array) #2 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(52): Parsedown->lines(Array) #3 /home/username/public_html/dev/blesta/helpers/text_parser/text_parser.php(52): Parsedown->text('This is a Test ...') #4 /home/username/public_html/dev/blesta/plugins/support_manager/views/default/knowledgebase.pdt(42): TextParser->encode('markdown', 'This is a Test ...') #5 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/View.php(163): include('/home/username/...') #6 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/Controller.php(321): View->fetch('/home/username/...', NULL) #7 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/Dispatcher.php(173): Controller->render() #8 /home/username/public_html/dev/blesta/index.php(21): Dispatcher::dispatch('/dev/blesta/use...') #9 {main}  
[2021-07-16T20:45:52.826547+00:00] general.ERROR: UnknownException: Trying to access array offset on value of type null in /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php:252 Stack trace: #0 /home/username/public_html/dev/blesta/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(232): UnknownException::setErrorHandler(8, 'Trying to acces...', '/home/username/...', 252, Array) #1 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(252): Monolog\ErrorHandler->handleError(8, 'Trying to acces...', '/home/username/...', 252, Array) #2 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(52): Parsedown->lines(Array) #3 /home/username/public_html/dev/blesta/plugins/support_manager/views/default/knowledgebase_view.pdt(15): Parsedown->text('Here I am writi...') #4 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/View.php(163): include('/home/username/...') #5 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/Controller.php(321): View->fetch('/home/username/...', NULL) #6 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/Dispatcher.php(173): Controller->render() #7 /home/username/public_html/dev/blesta/index.php(21): Dispatcher::dispatch('/dev/blesta/plu...') #8 {main}  

From general-notice log (these appear all of the time with error reporting disabled):

[2021-07-16T20:41:34.532923+00:00] general.NOTICE: E_NOTICE: Trying to access array offset on value of type null {"code":8,"message":"Trying to access array offset on value of type null","file":"/home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php","line":252} 
[2021-07-16T20:41:34.533888+00:00] general.NOTICE: E_NOTICE: Trying to access array offset on value of type null {"code":8,"message":"Trying to access array offset on value of type null","file":"/home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php","line":258} 
[2021-07-16T20:42:34.438278+00:00] general.NOTICE: E_NOTICE: Trying to access array offset on value of type null {"code":8,"message":"Trying to access array offset on value of type null","file":"/home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php","line":252}

 

I then identified that these errors are also appearing for Support Tickets:

So the same errors above from the general-notice log that appear for the KB, also appear when you view a support ticket (URL: /admin/plugin/support_manager/admin_tickets/reply/1/) and then the errors will re-appear multiple times every minute when you leave the support ticket open in the web browser (ie. just viewing the ticket and not doing anything on it) with error reporting disabled. This is the same as DannyXYZ is reporting here. Secondly, this time with error reporting enabled, when you open a ticket or update the ticket with a reply from the Staff Portal (URLs: /admin/plugin/support_manager/admin_tickets/add/ or /admin/plugin/support_manager/admin_tickets/reply/1/), you again also receive an error very similar to the KB from the general-error log - screenshot attached:

[2021-07-30T22:00:13.139661+00:00] general.ERROR: UnknownException: Trying to access array offset on value of type null in /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php:252 Stack trace: #0 /home/username/public_html/dev/blesta/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(232): UnknownException::setErrorHandler(8, 'Trying to acces...', '/home/username/...', 252, Array) #1 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(252): Monolog\ErrorHandler->handleError(8, 'Trying to acces...', '/home/username/...', 252, Array) #2 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(52): Parsedown->lines(Array) #3 /home/username/public_html/dev/blesta/helpers/text_parser/text_parser.php(52): Parsedown->text('This is reply N...') #4 /home/username/public_html/dev/blesta/plugins/support_manager/models/support_manager_tickets.php(1911): TextParser->encode('markdown', 'This is reply N...') #5 /home/username/public_html/dev/blesta/plugins/support_manager/controllers/admin_tickets.php(401): SupportManagerTickets->sendEmail('1', Array) #6 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminTickets->add() #7 /home/username/public_html/dev/blesta/index.php(21): Dispatcher::dispatch('/dev/blesta/adm...') #8 {main}  
[2021-07-30T22:05:31.180411+00:00] general.ERROR: UnknownException: Trying to access array offset on value of type null in /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php:252 Stack trace: #0 /home/username/public_html/dev/blesta/vendors/monolog/monolog/src/Monolog/ErrorHandler.php(232): UnknownException::setErrorHandler(8, 'Trying to acces...', '/home/username/...', 252, Array) #1 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(252): Monolog\ErrorHandler->handleError(8, 'Trying to acces...', '/home/username/...', 252, Array) #2 /home/username/public_html/dev/blesta/vendors/blesta/parsedown/Parsedown.php(52): Parsedown->lines(Array) #3 /home/username/public_html/dev/blesta/helpers/text_parser/text_parser.php(52): Parsedown->text('This is reply N...') #4 /home/username/public_html/dev/blesta/plugins/support_manager/views/default/admin_tickets_replies.pdt(90): TextParser->encode('markdown', 'This is reply N...') #5 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/View.php(163): include('/home/username/...') #6 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/Controller.php(222): View->fetch('/home/username/...', NULL) #7 /home/username/public_html/dev/blesta/plugins/support_manager/controllers/admin_tickets.php(580): Controller->partial('admin_tickets_r...', Array) #8 /home/username/public_html/dev/blesta/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminTickets->reply() #9 /home/username/public_html/dev/blesta/index.php(21): Dispatcher::dispatch('/dev/blesta/adm...') #10 {main}  

 

I have taken the above errors from the logs of the fresh development install that I made purely to test these bugs. However, I have correlated that the errors match exactly with my production install. I have attached the development install's log files to this topic. The log files dated for the 16th July cover the KB errors and the log files dated for the 30th July cover the Support Ticket errors.

Blesta v5.1.2, Support Manager plugin version 2.27.2. Cloudlinux, PHP 7.4, MariaDB 10.3.30.

Thank you very much indeed.

 

 

2021-07-30_23h05_19.png

general-error-2021-07-16.log general-notice-2021-07-16.log general-error-2021-07-30.log general-notice-2021-07-30.log

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...