Describe the bug
Attempting to embed a Tweet with a URL containing a trailing slash causes the embed to fail. While Twitter seems to default to no-slash it does not redirect a URL with a trailing slash to the no-slash version.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Tweet to embed the same as with no trailing slash
Screenshots

Desktop (please complete the following information):
Additional context
Thanks for the report, @kriskarkoski. This should be relatively straightforward to fix up. I've filed it against WordPress 5.0.x Follow Ups
Initial exploration was executed by @alpinealex in #12739. It wasn't finished and this issue can be taken over by someone else. This is the latest recommendation from @notnownikki how to fix this bug:
I'd rather this removed the trailing slash if the embed failed, just so we can support embed URLs that do end with a trailing slash. That should be easy enough to do in
componentDidUpdate(ofeditcomponent).
@gziolo I can take this over.
@gbroques, thank you 👍
@gziolo I believe I fixed the issue as @notnownikki suggested and put up a PR #14600.
However, I can't seem to run the e2e tests locally to fix the test that's failing the build.
Error: The constant 'SCRIPT_DEBUG' is not defined in the 'wp-config.php' file.
I'm using the built-in local environment as suggested by the End to end testing section in the docs.
OS: Ubuntu 16.04
Docker version: 18.09.3, build 774a1f4
Docker Compose version: 1.22.0, build f46880fe
Node version: v10.15.3
Hey folks, I can take a look at this fix tomorrow. If you're having trouble
getting e2e tests to run or pass locally, I'm happy to help out there 🙂
On Sun, 24 Mar 2019, 17:19 G Roques, notifications@github.com wrote:
@gziolo https://github.com/gziolo I believe I fixed the issue as
@notnownikki https://github.com/notnownikki suggested, but ran into
some issues running the e2e tests locally.Error: The constant 'SCRIPT_DEBUG' is not defined in the 'wp-config.php'
file.I'm using the built-in local environment
https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTING.md#local-environment
as suggested by the End to end testing
https://github.com/WordPress/gutenberg/blob/master/docs/contributors/testing-overview.md#end-to-end-testing
section in the docs.OS: Ubuntu 16.04
Docker version 18.09.3, build 774a1f4
docker-compose version 1.22.0, build f46880fe
Node version: v10.15.3—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WordPress/gutenberg/issues/12664#issuecomment-475979958,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADKSsiFx_gz4uhUhC-gXJ7Tsu9YRyBq6ks5vZ7OXgaJpZM4ZHlda
.
Another contributor can pick this issue up and use my PR #14600 as a starting place.
It looks like all that's needed is a fix to the e2e tests. Read the PR comments for @notnownikki's suggestion.
Hope this helps! :)