Audio icon looks broken in editor's block preview

Hi,

We setup a block for an audio player – it works fine, but displays a ‘broken/missing image’ icon in the editor view. Is this a bug &/or can you recommend a way to add a default audio icon for audio files?

Hello @kwebbink can you send us the URL of the record (at support@datocms.com) so we can see what image inside the block is causing that broken preview?
Thank you!

Just to close this topic, we followed up on email and shipped a fix to the dashboard, now you should be able to see the audio icon on the collapsed block :slight_smile:

Thank you once again for the feedback!

Thanks @m.finamor !

& sorry to potentially re-open, but in case it’s related:

Text-previews seem to have disappeared from collapsed-blocks – mainly for blocks with only text (no image/media) – e.g. our ‘Text, Single Column’ block:

& inspect-view if it helps:

We noticed it soon after the audio-icon was fixed earlier in July, but if it’s unrelated, all ears & I’ll follow up separately

Thanks,
Kate

Hey @kwebbink

No problem at all!
Could you share with us the schema of that block that has no preview?
A screenshot with the field type (and order of those fields) inside of the block definition, so we can try and reproduce the issue on our end

Thank you!

Sure thing – here’s a screenshot of our preview-less text_single_column block:

& the schema in json if this helps:

{'data': {'id': '654834', 'type': 'item_type', 'attributes': {'name': 'Text, Single Column', 'singleton': False, 'sortable': False, 'api_key': 'text_single_column', 'ordering_direction': None, 'ordering_meta': None, 'tree': False, 'modular_block': True, 'draft_mode_active': False, 'all_locales_required': True, 'collection_appeareance': 'table', 'collection_appearance': 'table', 'has_singleton_item': False, 'hint': 'https://www.datocms-assets.com/44232/1636581479-block-text-single.png\nA single column of rich text, positioned in the middle.', 'inverse_relationships_enabled': False}, 'relationships': {'fields': {'data': [{'id': '3369161', 'type': 'field'}, {'id': '10559547', 'type': 'field'}]}, 'fieldsets': {'data': []}, 'singleton_item': {'data': None}, 'ordering_field': {'data': None}, 'title_field': {'data': None}, 'image_preview_field': {'data': None}, 'excerpt_field': {'data': None}, 'workflow': {'data': None}}, 'meta': {'has_singleton_item': False}}, 'included': [{'id': '3369161', 'type': 'field', 'attributes': {'label': 'Text', 'field_type': 'text', 'api_key': 'text', 'hint': None, 'localized': False, 'validators': {'required': {}}, 'position': 1, 'appearance': {'addons': [], 'editor': '39094', 'parameters': {}, 'type': '39094'}, 'appeareance': {'addons': [], 'editor': '39094', 'parameters': {}, 'type': '39094'}, 'default_value': ''}, 'relationships': {'item_type': {'data': {'id': '654834', 'type': 'item_type'}}, 'fieldset': {'data': None}}}, {'id': '10559547', 'type': 'field', 'attributes': {'label': 'Class', 'field_type': 'string', 'api_key': 'class', 'hint': None, 'localized': False, 'validators': {'enum': {'values': ['text-with-note']}}, 'position': 2, 'appearance': {'addons': [], 'editor': 'single_line', 'parameters': {'heading': False}}, 'appeareance': {'addons': [], 'editor': 'single_line', 'parameters': {'heading': False}}, 'default_value': ''}, 'relationships': {'item_type': {'data': {'id': '654834', 'type': 'item_type'}}, 'fieldset': {'data': None}}}]}

Many thanks!
-Kate

Hello @kwebbink

It seems that this is happening due to the plugin applied to the text field:

If you re-order and put class above text, or remove the plugin from the text field, you should be able to see the preview as expected

Hi @m.finamor

Much appreciated – We’re aiming to switch out the ToastUI plug-in in the near future, and will give the field re-ordering suggestion a try in the meantime.

Thanks very much again for your help!
-Kate

1 Like

Hi again @m.finamor,

We switched from the ToastUI plug-in, and are now using the HTML editor, but still can’t see previews for text_single_column & similar blocks.

Re-ordering the ‘class’ field above ‘text’ does make the ‘class’ field’s value appear in the preview, but editors need a preview of the ‘text’ instead (which still doesn’t display after reverting the order)

If you’re able to take another look, do you have any other suggestions?

Many thanks,
Kate

Hello @kwebbink I see, in this case, can you send us the URL of one of the records where that preview is not being correctly shown at support@datocms.com so we can take a closer look at what could be happening? Thank you!

Hello once again @kwebbink

Thank you for the email!
Taking a closer look I was able to individuate the issue, and its due to this behaviour:

We always prioritise “Single line string” fields as titles for blocks, over multi line strings. The “class” field inside your block is a single line string, and the one above it is a multi line string, so the “class” field will always be the title for this block.

I see how being able to select a title field manually for blocks could be helpful in this case, could you perhaps open a feature request for this so we can track it?

Many thanks for the explanation @m.finamor – That helps

Here’s a feature request, and all ears if other suggestions come up.

@m.finamor Hello! I see that this is marked as solved, but for me, I still would like to see a preview of text in the Text, Single column block. As a web editor, aving this feature makes it so much easier to edit pages, especially more complicated pages with multiple text, single column blocks. I have been missing this feature since it disappeared months ago. Thank you.