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: Expressionengine preview does not render assets within bloqs
Status | Resolved |
Add-on / Version | Bloqs 4.1.1 |
Severity | |
EE Version | 5.3.0 |
Est Digital
Nov 27, 2019Expressionengine preview does not render assets within bloqs. the {if image} statement returns false because the value is empty in the preview. I’ve done some digging and noticed that the $adapter->getBlocksFromPost in ft.bloqs.php row 440 does not return assets values. The $this->getBlocks function does return assets values but only shows data from the saved entry, and not the unsaved/changed data in the preview (from post). Could you modify the getBlocksFromPost to return the assets data aswell?
EE 5.3.0
Bloqs 4.1.1
Assets 3.3.3
BoldMinded (Brian)
Nov 27, 2019
Hi there. Thanks for the report. Unfortunately I can’t make it work. If you are adding a new file to an Assets field, it does not yet exist in the $_POST array, or anywhere on the local filesystem other than in a /tmp directory. This isn’t only an issue for Bloqs, but an issue for Assets itself. If you add a normal Assets field to an entry (not in Matrix/Grid/Bloqs), create a new entry and add a file to the field, then attempt to preview it, you’ll see that the image doesn’t work there either. Hopefully this is something that can be fixed in Assets or in EE itself in the upcoming versions, but for now, Assets file previews only work if the file is already attached to an entry.
BoldMinded (Brian)
Nov 27, 2019
Jelle, can you respond in the ticket please, not directly to the email.
I just tested it locally, with an EE File field, and Assets field. The Assets field was pulling images from S3.
BoldMinded (Brian)
Nov 27, 2019
I messed up the first test and will take another look at this.
BoldMinded (Brian)
Nov 27, 2019
This probably isn’t something I’ll have a quick fix for… could be a few days or a couple weeks.
BoldMinded (Brian)
Nov 27, 2019
Are you using Publisher with this site?
Est Digital
Nov 27, 2019
Hi, not im not using publisher, would that fix the problem?
BoldMinded (Brian)
Nov 27, 2019
No it won’t fix it. I’m just trying to debug it.
BoldMinded (Brian)
Nov 27, 2019
I do see the issue, but I also see following code in the getBlocksFromPost() method appears to correctly set the value of the Assets field. I’ll dig into it more, but to confirm, when I save an entry the Assets image is not displayed in the Preview, which it should.
BoldMinded (Brian)
Nov 27, 2019
So, I talked to Jace at EE Harbor, and confirmed that Assets does not officially support Live Preview, and may not for some time (they’re focused on EE6 right now). If an Assets field works in LP in as a standalone field it is basically by dumb luck (b/c it already contains the full path to an image in a saved entry). A standalone field is very different than Bloqs or Grid. Basically if Assets doesn’t officially support LP, then I can’t officially support it inside of Bloqs either. Probably not what you want to hear, but there isn’t much I can do :/
BoldMinded (Brian)
Dec 02, 2019
Closing this ticket b/c it isn’t something I can fix.