Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Cannot use Preview with a simple Grid Field

Status Resolved
Add-on / Version Simple Grids & Tables 1.5.3
Severity
EE Version 7.2.0

Kevin Chatel

Nov 21, 2022

Hi Brian,
We are getting this error in the CP when previewing an entry to edit. (Its the regular EE Preview not the view draft and preview).
I’m using a simple grid inside a block element.

Here is the error
—-

Cannot access offset of type string on string
user/addons/simple_grids/abstract.simple_grids.php:218

Stack Trace: Please include when reporting this error
#0 [internal function]: SimpleGrids->pre_process()
#1 user/addons/bloqs/Controller/FieldTypeWrapper.php(279): call_user_func_array()
#2 user/addons/bloqs/Controller/FieldTypeWrapper.php(346): BoldMinded\Bloqs\Controller\FieldTypeWrapper->call()
#3 user/addons/bloqs/Controller/TagController.php(1110): BoldMinded\Bloqs\Controller\FieldTypeWrapper->preProcess()
#4 user/addons/bloqs/Controller/TagController.php(791): BoldMinded\Bloqs\Controller\TagController->replaceTag()
#5 user/addons/bloqs/Controller/TagController.php(378): BoldMinded\Bloqs\Controller\TagController->_renderBlockSection()
#6 user/addons/bloqs/Controller/TagController.php(309): BoldMinded\Bloqs\Controller\TagController->parseNestedBlocks()
#7 user/addons/bloqs/Controller/TagController.php(271): BoldMinded\Bloqs\Controller\TagController->replaceNestedBlocks()
#8 user/addons/bloqs/ft.bloqs.php(607): BoldMinded\Bloqs\Controller\TagController->replace()
#9 ee/legacy/libraries/api/Api_channel_fields.php(381): Bloqs_ft->replace_tag()
#10 ee/legacy/libraries/channel_entries_parser/components/Custom_field_pair.php(183): Api_channel_fields->apply()
#11 ee/legacy/libraries/channel_entries_parser/Parser.php(291): EE_Channel_custom_field_pair_parser->replace()
#12 ee/legacy/libraries/Channel_entries_parser.php(172): EE_Channel_data_parser->parse()
#13 ee/ExpressionEngine/Addons/channel/mod.channel.php(2489): EE_Channel_parser->parse()
#14 ee/ExpressionEngine/Addons/channel/mod.channel.php(257): Channel->parse_channel_entries()
#15 ee/legacy/libraries/Template.php(1793): Channel->entries()
#16 ee/legacy/libraries/Template.php(1469): EE_Template->process_tags()
#17 ee/legacy/libraries/Template.php(608): EE_Template->tags()
#18 ee/legacy/libraries/Template.php(241): EE_Template->parse()
#19 ee/legacy/libraries/Template.php(171): EE_Template->fetch_and_parse()
#20 ee/ExpressionEngine/Service/LivePreview/LivePreview.php(208): EE_Template->run_template_engine()
#21 ee/ExpressionEngine/Addons/channel/mod.channel.php(5217): ExpressionEngine\Service\LivePreview\LivePreview->preview()
#22 ee/legacy/libraries/Actions.php(175): Channel->live_preview()
#23 ee/legacy/libraries/Core.php(668): EE_Actions->__construct()
#24 ee/legacy/controllers/ee.php(51): EE_Core->generate_action()
#25 [internal function]: EE->index()
#26 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array()
#27 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController()
#28 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run()
#29 index.php(164): require_once(’...’)
#29 index.php(164): require_once(’...’)

thanks
Kevin

#1

BoldMinded (Brian)

Hi, Kevin. PHP version?

#2

Kevin Chatel

Hi Brian, PHP Version 8.1.12

#3

BoldMinded (Brian)

Try changing line 218 of the abstract file to this:

$data = $data['rows'] ?? [];
#4

Kevin Chatel

That seemed to have fixed the issue. We are able to see the previews now with Grid Fields. Thanks

#5

BoldMinded (Brian)

Awesome. I’ll include this with the next release.

Login to reply