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: Fatal error when a block’s atom field is set to required and not filled in
Status | Resolved |
Add-on / Version | Bloqs 3.2.0 |
Severity | |
EE Version | 3.5.2 |
EEHarbor Testing
Sep 13, 2018Description: When saving an entry that has a block with an Atom that has a required field, it throws a fatal error that the fieldtype is null (screenshot: Capture2.png).
Ansel: 2.0.11 (but tested with current Ansel as well)
Atom field is an Ansel field that has the “Require Title” field set to “Yes” (screenshot: require-title.png)
Ansel Atom itself is NOT required.
3.2.0 PublishController.php Line 329 is:
$fieldtype->setSetting('grid_row_id', $blockId);
I tried upgrading Ansel and Bloqs and the issue persisted but with a different fatal error on a different line:
Call to a member function getShortName() on null
4.0.5 PublishController.php Line 318 is:
$block->addAtom($atomDefinition->getShortName(), $atom);
Debugging this error led me to find that an array key of “search” was being added to the “values” array of the block data (screenshot: data.png).
I don’t know where this “search” is coming from but my test fix was modifying this line and adding the check for “search” in the “$valueId”:
4.0.5 PublishController Line 294:
if ($valueId === 'search' || substr($valueId, -6) === '_error') {
BoldMinded (Brian)
So, I actually I can’t even submit the entry form in EE 3 or EE 4, the JS validation catches it.
https://d.pr/i/xPjjoN
https://d.pr/i/7M8Rgl
In your case is this happening after submitting the form?
BoldMinded (Brian)
Unable to replicate. Closing ticket per EEHarbor’s direction. Can re-address if it becomes an issue again.