Closed davidhellmann closed 1 year ago
Not sure if there is a relation to this issue: https://github.com/craftcms/cms/issues/13155
Test it also with other fields on the Entries, same problem:
Updated to the latest versions, still the same problem :/
@brandonkelly is that maybe something related to matrix? When I'm right, SuperTable is using some Matrix Stuff itself under the hood?
@davidhellmann Super Table reproduces a lot of the same code as Matrix, but it’s separate.
Are you able to reproduce the same bug using a static Matrix field? (were Min and Max rows are each set to the same number)
@brandonkelly yep. I changed the settings from static to min 1 / max 1, but I got the same result. I'll start the update process from scratch next week and try to update just CraftCMS, and if that works, I'll update super-table, and then we'll know where the problem comes from. But I think it's more an super-table thing. I'll give an update if I have further information.
I applied the Matrix bug fix from https://github.com/craftcms/cms/pull/12983 to Super Table locally and that seems to resolve it.
@engram-design can you have a look, would be great :)
I applied the Matrix bug fix from craftcms/cms#12983 to Super Table locally and that seems to resolve it.
Yep that works here too.
// Safe to create the default blocks?
if ($createDefaultBlocks || $this->staticField && count($value) < $this->minRows) {
$blockTypeJs = Json::encode($this->getBlockTypes()[0]);
$view->setInitialDeltaValue($this->handle, null);
$minRows = ($this->staticField) ? 1 : $this->minRows;
for ($i = count($value); $i < $minRows; $i++) {
$js .= "\nsuperTableInput.addRow({$blockTypeJs});";
}
}
Sorry for ping you again @engram-design, but maybe you can fix that?
🤔
Should be fixed in this PR https://github.com/verbb/super-table/pull/528
Describe the bug
I did some updates to CraftCMS 4.4.10 and Supertable 3.0.8.1
When I create a new entry where a Super Table field is attached (min: 1, max: 1, Static Field: True), then I can't save the entry. If I change something within the Super Table field I can save the entry.
Within the logfile I found this:
Two screenshots:
Steps to reproduce
Craft CMS version
4.4.10
Plugin version
3.0.8.1
Multi-site?
Yes
Additional context
No response