Bug Template error: [E_WARNING] Illegal string offset 'title'

Status
Not open for further replies.

BigIron

Customer
Whenever I modify a template with "Send webmaster alert on template edits" enabled, I get this error in the server error log. The email does send as expected. Looks like a similar error was reported by @SeToY here, not sure if it's related.

Code:
Server error log

    ErrorException: Template error: [E_WARNING] Illegal string offset 'title' internal_data/code_cache/templates/l3/s35/email/dbtech_security_alert_template.php:15

    Generated by: Admin Sep 1, 2022 at 6:13 AM

Stack trace

#0 internal_data/code_cache/templates/l3/s35/email/dbtech_security_alert_template.php(15): XF\Template\Templater->handleTemplateError(2, '[E_WARNING] Ill...', '/home/nginx/dom...', 15, Array)
#1 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(XF\Mail\Templater), Array, NULL)
#2 src/XF/Mail/Mailer.php(221): XF\Template\Templater->renderTemplate('dbtech_security...', Array)
#3 src/XF/Mail/Mailer.php(155): XF\Mail\Mailer->renderPartialMailTemplate('dbtech_security...', Array, Object(XF\Language), NULL)
#4 src/XF/Mail/Mail.php(337): XF\Mail\Mailer->renderMailTemplate('dbtech_security...', Array, Object(XF\Language), NULL)
#5 src/XF/Mail/Mail.php(405): XF\Mail\Mail->renderTemplate()
#6 src/XF/Mail/Mail.php(469): XF\Mail\Mail->getSendableMessage()
#7 src/addons/DBTech/Security/XF/Entity/Template.php(31): XF\Mail\Mail->queue()
#8 src/XF/Entity/Template.php(393): DBTech\Security\XF\Entity\Template->updateTemplateHistoryLog()
#9 src/addons/Kirby/FontAwesomeManager/XF/Entity/Template.php(18): XF\Entity\Template->_postSave()
#10 src/XF/Mvc/Entity/Entity.php(1272): Kirby\FontAwesomeManager\XF\Entity\Template->_postSave()
#11 src/XF/Service/Style/Import.php(235): XF\Mvc\Entity\Entity->save(true, false)
#12 src/XF/Service/Style/Import.php(166): XF\Service\Style\Import->importTemplates(Object(XF\Entity\Style), Object(SimpleXMLElement), '')
#13 src/addons/Kirby/FontAwesomeManager/XF/Service/Style/Import.php(17): XF\Service\Style\Import->importFromXml(Object(SimpleXMLElement))
#14 src/XF/Admin/Controller/Style.php(436): Kirby\FontAwesomeManager\XF\Service\Style\Import->importFromXml(Object(SimpleXMLElement))
#15 src/XF/Mvc/Dispatcher.php(352): XF\Admin\Controller\Style->actionImport(Object(XF\Mvc\ParameterBag))
#16 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF:Style', 'Import', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Style), NULL)
#17 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\Style), NULL)
#18 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#19 src/XF/App.php(2353): XF\Mvc\Dispatcher->run()
#20 src/XF.php(524): XF\App->run()
#21 admin.php(13): XF::runApp('XF\\Admin\\App')
#22 {main}

Request state

array(4) {
  ["url"] => string(24) "/admin.php?styles/import"
  ["referrer"] => string(57) "https://www.domain.com/admin.php?styles/import"
  ["_GET"] => array(1) {
    ["styles/import"] => string(0) ""
  }
  ["_POST"] => array(6) {
    ["_xfToken"] => string(8) "********"
    ["target"] => string(9) "overwrite"
    ["overwrite_style_id"] => string(2) "36"
    ["_xfRequestUri"] => string(24) "/admin.php?styles/import"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I also got this error on xeforo version 2.2.10 anh 2.2.10 patch 1.
Code:
ErrorException: Template error: [E_WARNING] Illegal string offset 'title' internal_data/code_cache/templates/l2/s4/email/dbtech_security_alert_template.php:13
Help me!
 
Error on php 8.0 and 8.1
Code:
LogicException: Template mail:dbtech_security_alert_template did not render to anything. It must provide either a text or HTML body. in src/XF/Mail/Mailer.php at line 160
 
Hello @BigIron,

We hope your ticket regarding DragonByte Security has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 
Hello @BigIron,

As we have not heard back from you, your ticket regarding DragonByte Security has now been closed.

If your ticket has not been resolved, please feel free to start a new support ticket and link back to this ticket.

If you have time, please leave a review on XenForo.com's Resource Manager.

Thank you.


- DragonByte Technologies, Ltd.
 
Status
Not open for further replies.

DragonByte Security

XenForo 1.5.3+ XenForo 2.0.x XenForo 2.1.x XenForo 2.2.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
2,122
Customer rating
5.00 star(s) 1 ratings
Back
Top