Hi, i'm building a Custom Block and i could use some help on a problem that i have.
The block is working fine, but when i'm trying to add the "Content" tab on the block's settings it's not working.
Actually, i want to be able to select some categories, and besad on the selected categories to do something in the front-end.
So, in order to select the categories i used this code:
$schema['ds_categories_scroller'] = array ( 'templates' => 'addons/ds_categories_scroller/blocks/ds_categories_scroller.tpl', 'wrappers' => 'blocks/wrappers', 'cache' => false, 'content' => array( 'items' => array( 'type' => 'enum', 'object' => 'categories', 'items_function' => 'fn_get_categories', 'remove_indent' => true, 'hide_label' => true, 'fillings' => array( 'manually' => array( 'params' => array( 'plain' => true, 'simple' => false, 'group_by_level' => false, ), 'picker' => 'pickers/categories/picker.tpl', 'picker_params' => array( 'multiple' => true, 'use_keys' => 'N', 'status' => 'A', 'positions' => true, ), ), ), ), ) );return $schema;
The problem now is that when i try to open the block's setting i got this cs-cart error:
[23-Feb-2021 15:15:08 Europe/Athens] PHP Warning: Illegal string offset 'items' in /home/designplus/public_html/staging/app/controllers/backend/block_manager.post.php on line 656 [23-Feb-2021 15:15:08 Europe/Athens] PHP Fatal error: Uncaught Error: Cannot use string offset as an array in /home/designplus/public_html/staging/app/controllers/backend/block_manager.post.php:656 Stack trace: #0 /home/designplus/public_html/staging/app/functions/fn.control.php(679): include() #1 /home/designplus/public_html/staging/app/functions/fn.control.php(430): fn_run_controller('/home/designplu...', 'block_manager', 'update_block', '', '') #2 /home/designplus/public_html/staging/instore.php(27): fn_dispatch() #3 {main} thrown in /home/designplus/public_html/staging/app/controllers/backend/block_manager.post.php on line 656 [23-Feb-2021 15:15:08 Europe/Athens] PHP Fatal error: ob_get_clean(): Cannot use output buffering in output buffering display handlers in /home/designplus/public_html/staging/app/Tygh/Ajax.php on line 139
I think there must be something with the 'type' => 'enum', because i tryied to change this for test perpuses with 'type' => 'text', and the setting opened normaly.