Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Conversation Block: .vtt and .sbv files are not supported, even though inline help says they are. #52276

Open dpasque opened 3 years ago

dpasque commented 3 years ago

Steps to reproduce the behavior

  1. Go to Wordpress.com Post/Page editor
  2. Add a Conversation block
  3. Upload a .vtt file or .sbv file

What I expected to happen

File is parsed

What actually happened

Error banner appears that says file type isn't supported. If it won't be supported, .vtt and .sbv should be removed from the help text.

Context

Browser / OS version

Chrome 90.0.4430.72 Windows 10 Home 19042.928

Reproducibility (Consistent, Intermittent) Leave empty for consistent.

Screenshot / Video: If applicable, add screenshots to help explain your problem.

vtt_not_supported

pauljacobson commented 2 years ago

We have encountered what seems to be a similar issue in 5202633-zen where our user tried to upload a series of .vtt files to their site, and this failed with the following error:

Error: vtt file is invalid format.

We investigated further, and noticed that the files were using UTF-8 with BOM encoding. We recommended that they convert the files to regular UTF-8 encoding in a text editor like Sublime Text or VS Code, like this:

https://user-images.githubusercontent.com/2912202/168784760-4206df77-d78a-4515-be6d-e4e079d4bf83.mp4

I tested this using VS Code version 1.67.1 on macOS 12.3.1.

The user reported the following:

Your colleague pointed out I need to change my encoding from UTF-8 with BOM to UTF-8 (without BOM). This helps, but it appears there’s a second issue which in my opinion is a bug due to uploading from a Windows PC. I noticed from the video your colleague provided for me that you are using a Mac computer as opposed to mine which is Windows PC. In light of this, I reupload the VTT subtitle files using my iPhone and everything was successful on the first try.

The user said they don't use macOS computers for the most part, rather they use Windows computers. I came across this support document: Use UTF-8 code pages in Windows apps - Windows apps | Microsoft Docs and this left me wondering if there is an issue with UTF-8 encoding on Windows that we could perhaps cater for in our .vtt format support?

Is it possible for us to cater for whatever the differences are between Windows formatting and other operating systems, or is this an unfortunate issue with Microsoft Windows?

pauljacobson commented 2 years ago

Also, potentially related issue:

1448-gh-Automattic/en.support-docs-content

thekingsprojects commented 2 years ago

The user wrote back to provide their browser information, just in case it's helpful: https://www.whatsmybrowser.org/b/BTAIJ

arunsathiya commented 2 years ago

πŸ“Œ HOUSEKEEPING

πŸ“Œ SCRUBBING

πŸ“Œ FINDINGS/SCREENSHOTS/VIDEO

Did not test.

πŸ“Œ ACTIONS

thedebian commented 2 years ago

Hi, I'm not sure we could really answer the question, but it seems VTT files are usually unsupported. We added support only for the video block, when they're uploaded as a text track for a VideoPress video (and, as pointed out, they need to be encoded without BOM, if UTF-8). As far as I'm aware of, VTT files can't be uploaded to the media library, I'm not sure about other blocks.