Oembed legacy filter returns empty string

Created on 15 April 2015, almost 10 years ago
Updated 26 November 2024, 4 months ago

The oembed legacy filter is non-functional in the current 7.x-1.x-dev release, due to a code error on line 49 of oembed_legacy.inc:

return $prefix . oembed_resolve_link($_oembed_default_parameters, $url) . $suffix;

The parameters above are in the wrong order which results in the URL never being matched, and causes this error in watchdog:

Warning: html_entity_decode() expects parameter 1 to be string, array given in decode_entities()

To fix, simply swap the order of the parameters in the function call. ie:

return $prefix . oembed_resolve_link($url, $_oembed_default_parameters) . $suffix;

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom rmathew

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine AstonVictor

    I'm closing it because the issue was created a long time ago without any further steps.

    if you still need it then raise a new one.
    thanks

Production build 0.71.5 2024