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.

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 Table maximum rows is reverting back to previous value on save

Status Resolved
Add-on / Version Simple Grids & Tables 1.4.4
Severity
EE Version 6.x

John Derrick

Feb 11, 2022

I recently upgraded to EE 6.2.5 and I am not sure if this started with the upgrade or if it might have existed prior, but when I attempt to edit the “Maximum rows” field for a Simple Table, from its current value which is currently set to ‘99’ in my installation, to a new value, like ‘4,’ it reverts back to ‘99’ every time. It does this both in Bloqs and within a Fieldtype for an entry.

#1

BoldMinded (Brian)

Hi John, thanks for catching this. The easy fix is to add these two lines to the ft.simple_table.php file, around line 113

$saveSettings['min_rows'] = $this->getMinRows($settings);
        $saveSettings['max_rows'] = $this->getMaxRows($settings);

So the code block looks like this:

$saveSettings['field_fmt'] = 'none';
        $saveSettings['field_show_fmt'] = 'n';
        $saveSettings['field_wide'] = true;
        $saveSettings['min_columns'] = $this->getMinColumns($settings);
        $saveSettings['max_columns'] = $this->getMaxColumns($settings);
        $saveSettings['min_rows'] = $this->getMinRows($settings);
        $saveSettings['max_rows'] = $this->getMaxRows($settings);
        $saveSettings['allow_heading_rows'] = $this->getAllowHeadingRows($settings);
#2

John Derrick

Thanks, I tried adding that snippet of code but received an error on save after updating the file.

Call to undefined method Simple_table_ft::getAllowHeadingRows() user/addons/simple_grids/ft.simple_table.php:111

Stack Trace: Please include when reporting this error

#3

BoldMinded (Brian)

Sorry, I pasted too much. Remove the last line in that example.

$saveSettings[‘allow_heading_rows’] = $this->getAllowHeadingRows($settings);

#4

John Derrick

Excellent, that worked. Thank you!

Login to reply