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: Bloq with Simple Grid erased data

Status Resolved
Add-on / Version Bloqs 5.0.10
Severity
EE Version 7.3.12

Doug Black

Jan 22, 2024

I have a page on a site that has removed all of the data in a simple grid, except for the first column.

#1

BoldMinded (Brian)

Can you share more information? What does the SG config look like? Are you up-to-date on both add-ons?

#2

BoldMinded (Brian)

Can you replicate this consistently? Was it a normal entry save vs a bulk update? I haven’t seen this happen so I need as much detail as you can provide.

#3

Doug Black

Comment has been marked private.

#4

BoldMinded (Brian)

Trying to figure out what is different b/c I have 2 blocks and they’re saving fine…

#5

Doug Black

Yeah, this was working fine up until I last edited an entry. What are our next steps? How can I help debug this?

#6

BoldMinded (Brian)

Have you tried creating a new block with a new simple grid field to test? Are you only teasing with html tags present in the content or have you tried basic text strings? Next comment will have a build that matches what I have locally and is slightly newer than what is public. Maybe try that to see if there is any difference.

#7

BoldMinded (Brian)

Comment has been marked private.

#8

Doug Black

Let me test a bit. This is happening in production, not locally.

To answer your questions:

> Have you tried creating a new block with a new simple grid field to test?

Yes, same issue.

> Are you only teasing with html tags present in the content or have you tried basic text strings?

Have tried with basic strings, still displays the broken EE tag.

#9

Jon Toney

I may have the same or at the very least, a similar issue.

When I try to add content to a Simple Grid field in Bloqs it either only saves the content in the first grid field but not the subsequent fields or it notifies me that there’s an error and doesn’t let me save. When I back out of the entry and come back in, not only is the content missing as described above but I now find that Bloqs has enjected a bunch of empty simple grid fields.

Running Local Install of EE - 7.3.15 › Bloqs 5.0.12 › Simple Grids 1.7.3

I’m running debug mode in EE and I’m not seeing anything obvious.

#10

BoldMinded (Brian)

Jon, it only happens when there is a second grid field inside the same block?

#11

Jon Toney

After some more investigation I may not have anything to do with the order of the fields. The common denominator seems to be an issue happen if grid has a text area field in particular. No text area data is being retained upon save if it happens to save at all. generally speaking, not long after placing content in a text area field, The Bloq label goes red with an attention icon and the save button grays out saying error found. If I am able to save, text input data is retained but nothing in text area and I find myself with a bunch of added Bloq fields that only displayed only non textarea fields.

#12

BoldMinded (Brian)

Jon, can you take a screenshot of your SG&T field settings, and a video of this occurring in your CP when editing an entry?

#13

Jon Toney

You bet. Give me a few minutes…

#14

Jon Toney

Do you want me to email or slack them to you? Do I need to be the OP to post files because I don’t see a way to attach them here.

#15

BoldMinded (Brian)

It really helps me to keep all related artifacts in the thread, so a private message with a link to a Dropbox file or something is fine.

#16

Jon Toney

Comment has been marked private.

#17

BoldMinded (Brian)

Comment has been marked private.

#18

BoldMinded (Brian)

Jon, check your network tab for any Ajax requests, and see if there are any that are failing and what the response is. When the save button is set to disabled and the field name turns red, it means there was a validation error and it was likely when the Ajax request tries to validate the form.

Also, the screenshots show the license settings page… I need to see how the Simple Grid field inside of the bloq is configured… so a screenshot of the bloq definition would help.

#19

Jon Toney

Comment has been marked private.

#20

BoldMinded (Brian)

This is what I’m referring to about the field settings. BTW, you can paste direct share links to individual Dropbox files in a comment and if it’s a picture it’ll render inline.

#21

BoldMinded (Brian)

Since it looked like you’re getting an error message, have you tried creating a brand new channel, a new Bloqs field, with just 1 block that has a Simple Grid in it, and see if you can replicate it there?

#22

Jon Toney

#23

Jon Toney

I

#24

Jon Toney

The above was with a new Channel and new brand New Bloq.

#25

Doug Black

Yep, I am getting the same result creating a new channel and new bloqs with it.

#26

BoldMinded (Brian)

Can you both disable the autosave feature and see if that changes the behavior?

#27

Jon Toney

looks like the link didn’t work:

#28

Jon Toney

Where do you disable Auto Save. Is that in the CP or a config setting?

#29

Doug Black

I set the autosave to a crazy high value and tried saving the page. I get a few things happening.

  1. Initially when I saved the entry with the updated content, it mass duplicated the block.
  2. Now I get a secondary saving error when trying to save.

Screenshots here: https://drive.google.com/drive/folders/1MPtdmAIm63pqGSE4OG3dtdGkOn7zwcgo?usp=sharing

#30

BoldMinded (Brian)

I’m actually not sure how to disable it… I assume setting the config value to 0 would?

$config[‘autosave_interval_seconds’] = 0;

#31

BoldMinded (Brian)

Instead of sending a whole new build, try this fix. Edit line 39 of FieldTypes/TextareaField.php to include this:

$ft->_init([
            'name' => $columnName,
        ]);

So the whole method looks like this:

private function getFieldType(string $columnName): \EE_Fieldtype
    {
        $ft = new Textarea_ft();
        $ft->field_name = $columnName;
        $ft->settings = array_merge(self::DEFAULTS, $this->getOptions());

        $ft->_init([
            'name' => $columnName,
        ]);

        return $ft;
    }
#32

BoldMinded (Brian)

Either of you have a chance to try this fix? I’d like to get a release out if I can get confirmation that it fixes it for you two as well.

#33

Jon Toney

Sorry, I’ve been running around like crazy this morning and forgot to let you know the fix indeed seem to work. I’m abot to start diving in a little more deeply, I’ll let you know if I have any more issue shortly.

#34

BoldMinded (Brian)

Ah, good to hear. Thanks for the update.

#35

Jon Toney

No worries. Thanks for the quick fix.

#36

BoldMinded (Brian)

I just released this fix as v1.7.4 and will close this ticket. If any other similar issues pop up feel free to re-open it.

Login to reply