Brightcove 7.x-5.1 broken when embedded in paragraphs

Created on 7 December 2016, about 8 years ago
Updated 23 January 2025, about 1 month ago

Hi All,

When using the brightcove module in conjunction with paragraphs the autocomplete and browse functionality don't show up. What happens is that the $entity_type variable gets set as "paragraphs_item" when the widget HOOK gets fired and the brightcove widget is nested in a paragraph. Normally the brightcove field widget is expected to be embedded on a node, so that variable ends up being "node" instead.

That variable is then used to construct an autocomplete path URL, and in typical drupal fashion that URL is broken down as page_access arguments in HOOK_menu. Since 'paragraphs_item' is an invalid argument the constructed url for autocomplete and browse fail to work.

What I have done is made the brightcove module aware of the 'paragraphs_item' entity type, and I have it translated to the 'node' entity type which corrects the problem. Although I am not 100% certain this is the best way to correct this issue.

Attached is the patch that I worked on to fix the problem.

πŸ› Bug report
Status

Closed: outdated

Version

6.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ancapaaron

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.

Production build 0.71.5 2024