-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set a webpage as a valid source URL (fallback to iframe) since v1.3.11 #101
Comments
@reganlawton |
OMFG I completely forgot about that cos I normally do it myself and accepted the PR via the Github Mobile. I'll sort this right this second. |
@juban that has now got a release tag. |
@reganlawton |
@juban thanks for contributing |
We're heavily using your excelent plugin for many projects.
Until version 1.3.10, it was possible to give any kind of url as a source for the Embed. In that case, the plugin was kindly switching to an iframe version.
There is an annoying regression since version 1.3.11 and the introduction of the FallbackAdapter. In that context, even if the source url is valid, it will result in a "Please check your URL." error and blank output in the templates.
The reason this is happening is related to a silent error thrown in the
embed
method of the OembedService class.When the
$media = Embed::create($url, $options, $dispatcher);
is called with a standard webpage url, the resulting Embed object will give an empty result when calling$media->getCode()
.So the following code (line 84 and 85) will result in an exception:
Changing that part with the following code revert the previous plugin behavior and works well with "normal" embedable urls:
I can send you a PR for that matter if it helps.
The text was updated successfully, but these errors were encountered: