All add-ons currently require PHP 7.4 or greater.
On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.
Please read about the changes to BoldMinded add-on licensing.
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, 2023Hi,
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('...')
BoldMinded (Brian)
Comment has been marked private.
Axel Hebenstreit
Thank you Brian, but now I get a slightly different error:
BoldMinded (Brian)
What column types do you have defined in your SG field?
Axel Hebenstreit
only text columns
BoldMinded (Brian)
Have you by chance tried to re-save the SG field settings?
Axel Hebenstreit
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.
Axel Hebenstreit
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.
BoldMinded (Brian)
Comment has been marked private.
Axel Hebenstreit
Works! Thank you. Happy easter!