Problem/Motivation
The regex for the Vimeo provider is very strict and doesn't allow inputs containing query strings. We've had users try and input Vimeo URLs like this and it won't work because of the query string:
https://vimeo.com/123123123?fl=pl&fe=vl
I'm not sure what those params are for, but Vimeo provider refuses to parse the ID.
#3238136: Unlisted Vimeo videos don't work because they are missing the required hash parameter mentions this as a problem too, but that issue is adding a feature as well. This is just the bug fix.
Steps to reproduce
Try and add a Vimeo video using a URL like above, you'll get a validation error.
Proposed resolution
Minor change to the regex that validates a Vimeo URL to remove the $ at the end.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork video_embed_field-3569488
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
bkosborneMR submitted. I noticed the unit tests for ProviderUrlParseTest were already failing, so I fixed those here too. Note that as a result of relaxing the regex, it now allows through some previously invalid inputs for time index like this:
https://vimeo.com/193517656#t=(notice missing time)But that seems totally fine. The time is still not parsed. We just accept the URL and still parse the vimeo ID.
Comment #4
mably commentedHi @bkosborne, thanks for your MR.
Looks like it needs a rebase though.
Comment #5
mably commentedComment #7
bkosborneI'm very confused with the branches here. There is both a 3.x and a 3.0.x branch. The 3.0.x branch is behind 3.x but 3.0.x is the default branch that was chosen when I created the issue fork. Which branch is "main"?
In any case, I created a new branch from 3.x with the changes.
Comment #9
mably commented@bkosborne, I updated your MR to simply update the regexp to allow any query string before the optional timestamp fragment.
It does not require to disable the existing tests.
Is it ok for you?
Comment #10
bkosborneYes that's fine with me. Thank you!
Comment #12
mably commentedGreat, thanks! Merged.