XF 2.2 an error on template modification occurs for Search node type..

securedme

Active member
CSS:
Server error log
TypeError: Extension public:thread_list_macros :: main_cell() error: Cannot access offset of type string on string internal_data/code_cache/templates/l2/s5/public/thread_list_macros.php:567
Generated by: user Aug 20, 2022 at 10:42 AM

line 567 of thread_list_macros.php

CSS:
if (!$__templater->func('in_array', array($__vars['forum']['node_id'], array(235, 394, 240, 260, ), ), false)) {

This is what I've done for thread_list_macros:

Find:
CSS:
/<li><xf:username(.*)Forum\.title}<\/a><\/li>
                        <\/xf:if>/ms

Replace:
CSS:
**SOMETHING BEFORE...

<xf:if is="!in_array({$forum.node_id},
        [235,394,240,260])">

**SOMETHING AFTER...

The above template modification actually works typical discussion node type but generated the error mentioned only for Search type node.

Any helps on this? Thanks.
 
Top Bottom