-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't save new entries with a static Super Table Field on it #518
Comments
Not sure if there is a relation to this issue: craftcms/cms#13155 |
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 craftcms/cms#12983 to Super Table locally and that seems to resolve it. |
@engram-design can you have a look, would be great :) |
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 #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
The text was updated successfully, but these errors were encountered: