Re: [Tiki-devel] Problem with templates tiki-forums.tpl and tiki-view_forum.tpl

Marc Laporte <[email protected]>
Newsgroups gmane.comp.cms.tiki.devel
Message-ID <[email protected]>
Are you using PHP8?

Does it seem like this?
https://sebhastian.com/php-unsupported-operand-types/

FYI:
https://doc.tiki.org/PHP8

Thanks!

Marc

On Sat, 14 Jan 2023 19:11:08 +0100 Tiki developers [email protected] said

> On opening my forums page, there is crash
>        with the following information in an invisible block: 
> Fatal error: 
> Uncaught TypeError: Unsupported operand types: string - string
>        in 
> D:\xampp\htdocs\tiki-25.0\temp\templates_c\en_classic^cd0c7e830956ca50ce2bc1e82ffa7f0965df5457_0.file.tiki-forums.tpl.php:111
> 
> Stack trace: 
> #0
> D:\xampp\htdocs\tiki-25.0\vendor_bundled\vendor\smarty\smarty\libs\sysplugins\smarty_template_resource_base.php(123):
> content_63c2e7c004d759_94187908(Object(Smarty_Internal_Template)) 
> #1
> D:\xampp\htdocs\tiki-25.0\vendor_bundled\vendor\smarty\smarty\libs\sysplugins\smarty_template_compiled.php(114):
> Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
> 
> #2
> D:\xampp\htdocs\tiki-25.0\vendor_bundled\vendor\smarty\smarty\libs\sysplugins\smarty_internal_template.php(216):
> Smarty_Template_Compiled->render(Object(Smarty_Internal_Template)) 
> #3
> D:\xampp\htdocs\tiki-25.0\vendor_bundled\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(238):
>        Smarty_Internal_Template->render(false, 0) 
> #4
> D:\xampp\htdocs\tiki-25.0\vendor_bundled\vendor\smarty\smarty\libs\sysplugins\smarty_internal_templatebase.php(116):
> Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template),
>        NULL, NULL, NULL, 0) 
> #5 D:\xampp\htdocs\tiki-25.0\lib\init\smarty.php(290):
>        Smarty_Internal_TemplateBase->fetch('D:\\xampp\\htdocs...',
>        NULL, NULL, NULL) 
> #6 D:\xampp\htdocs\tiki-25.0\lib\init\smarty.php(515):
>        Smarty_Tiki->fetch('D:\\xampp\\htdocs...', NULL, NULL, NULL) 
> #7 D:\xampp\htdocs\tiki-25.0\lib\init\smarty.php(459):
>        Smarty_Tiki->assign_layout_sections('tiki.tpl', NULL, NULL,
>        NULL) 
> #8 D:\xampp\htdocs\tiki-25.0\tiki-forums.php(90):
>        Smarty_Tiki->display('tiki.tpl') 
> #9 {main} 
> thrown in 
> D:\xampp\htdocs\tiki-25.0\temp\templates_c\en_classic^cd0c7e830956ca50ce2bc1e82ffa7f0965df5457_0.file.tiki-forums.tpl.php
>        on line 111 
> 
> Line 111 in tiki-forums.tpl.php contains 
> $_smarty_tpl->inheritance->instanceBlock($_smarty_tpl,
>        'Block_146473736063c2ea7009da95_72008211', 'forum'-'header'); 
> 
> Guessing that the problem is related to 'forum'-'header', I have
>      edited the template file tiki-forums.tpl at two places: 
> At Line 72, I have changed 
>         {block name=forum-header} 
> to 
>         {block name=forumheader} 
> At Line 115, I have changed 
>                 {block name=forum-row} 
> to 
>                 {block name=forumrow} 
> 
> That fixes the problem in tiki-forums.tpl . 
> There is a similar problem in tiki-view_forum.tpl . 
> I don't really know anything about the Smarty template engine, so
>      I can't judge whether my change is at all sensible. 
> Phil

_______________________________________________
TikiWiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.