Problem/Motivation

Currently the utility function civictheme_media_get_variables() has a check at the start for an actual File, however this fails when querying a Remote Video media type, as it doesn't have an associated file.

Considering there is a specific "civictheme_remote_video" media type, I would assume the CivicTheme Media function to return useful data.

Comments

toby wild created an issue. See original summary.

sime’s picture

richardgaunt’s picture

@sime

This is our proposed fix.

Update civictheme_media_get_variables to handle the OEmbed (remote video).

We want to only return the properties that are useful for remote video:

  • name
  • url
  • created
  • updated

Do not return other properties.

Does this align with your thinking?

sourav_paul’s picture

Assigned: Unassigned » sourav_paul
sourav_paul’s picture

Assigned: sourav_paul » Unassigned
joshua1234511’s picture

OEmbed (remote video) is already handled similarly to other media components, with:

civictheme_preprocess_media__civictheme_remote_video for Remote Video
civictheme_preprocess_media__civictheme_video for Video.

Is there a specific reason to use civictheme_media_get_variables() for this case?
In the current setup, this function is used only for attachments (Documents), and an image which always include an associated file.

richardgaunt’s picture

Yes the purpose is for this to be a utility to get values for a variety of different field types. As you say it only handles file type of media it would be good if it could be used for video

fionamorrison23’s picture

richardgaunt’s picture

Status: Active » Needs review
richardgaunt’s picture

richardgaunt’s picture

  • e2fb9912 committed on 1.x
    Issue #3475695 by joshua1234511, richardgaunt, sime, toby-wild:...
fionamorrison23’s picture

Status: Needs review » Reviewed & tested by the community
fionamorrison23’s picture

richardgaunt’s picture

Version: 1.8.1 » 1.10.0
Status: Reviewed & tested by the community » Fixed
fionamorrison23’s picture

Version: 1.10.0 » 1.8.1
fionamorrison23’s picture

fionamorrison23’s picture

Version: 1.8.1 » 1.10.0
fionamorrison23’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.