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: Simple Grid is causing error in entry preview

Status Resolved
Add-on / Version Simple Grids & Tables 1.5.4
Severity
EE Version 7.2.12

Axel Hebenstreit

Apr 04, 2023

Hi,

when I click on preview in an entry form, where the channel has 2 simple grid fields, I get the following error instead of the preview:

Error Caught

Call to a member function save() on null

user/addons/simple_grids/ft.simple_grid.php:79

Stack Trace: Please include when reporting this error

#0 [internal function]: Simple_grid_ft->{closure}()
#1 user/addons/simple_grids/ft.simple_grid.php(81): array_walk()
#2 ee/ExpressionEngine/Service/LivePreview/LivePreview.php(116): Simple_grid_ft->save()
#3 ee/ExpressionEngine/Addons/channel/mod.channel.php(5214): ExpressionEngine\Service\LivePreview\LivePreview->preview()
#4 ee/legacy/libraries/Actions.php(181): Channel->live_preview()
#5 ee/legacy/libraries/Core.php(678): EE_Actions->__construct()
#6 ee/legacy/controllers/ee.php(51): EE_Core->generate_action()
#7 [internal function]: EE->index()
#8 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array()
#9 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController()
#10 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run()
#11 index.php(172): require_once('...')
#11 index.php(172): require_once('...')
#1

BoldMinded (Brian)

Apr 04, 2023

Comment has been marked private.

#2

Axel Hebenstreit

Apr 04, 2023

Thank you Brian, but now I get a slightly different error:

Error Caught

Call to a member function save() on null

user/addons/simple_grids/ft.simple_grid.php:79

Stack Trace: Please include when reporting this error

#0 [internal function]: Simple_grid_ft->{closure}()
#1 user/addons/simple_grids/ft.simple_grid.php(81): array_walk()
#2 ee/ExpressionEngine/Service/LivePreview/LivePreview.php(116): Simple_grid_ft->save()
#3 ee/ExpressionEngine/Addons/channel/mod.channel.php(5214): ExpressionEngine\Service\LivePreview\LivePreview->preview()
#4 ee/legacy/libraries/Actions.php(181): Channel->live_preview()
#5 ee/legacy/libraries/Core.php(678): EE_Actions->__construct()
#6 ee/legacy/controllers/ee.php(51): EE_Core->generate_action()
#7 [internal function]: EE->index()
#8 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array()
#9 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController()
#10 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run()
#11 index.php(172): require_once('...')
#11 index.php(172): require_once('...')
#3

BoldMinded (Brian)

Apr 04, 2023

What column types do you have defined in your SG field?

#4

Axel Hebenstreit

Apr 04, 2023

only text columns

#5

BoldMinded (Brian)

Apr 04, 2023

Have you by chance tried to re-save the SG field settings?

#6

Axel Hebenstreit

Apr 04, 2023

Yes I did re-save all SG fields.
When in an entry with mixed fields like text, file and SG and I open the preview it works as long as I do not enter any data to a SG field.
But when I click add row in one of the SG fields the preview changes from the correct preview to the error mentioned above.

#7

Axel Hebenstreit

Apr 05, 2023

So i created a test channel with a freshly created Simple Grid field with one Text field row.
Created a new entry and opened the preview.
Entered some text in a normal text field and it shows instantly in the preview.
Now added the first row in the simper grid field and instantly the preview is replaced by the error above.
Deleting the row immediately shows the correct preview again.

#8

BoldMinded (Brian)

Apr 06, 2023

Comment has been marked private.

#9

Axel Hebenstreit

Apr 08, 2023

Works! Thank you.
Happy easter!

Login to reply