Skip to content
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

Additional data missing for media objects #144

Open
anita-chouhan opened this issue Nov 27, 2023 · 11 comments
Open

Additional data missing for media objects #144

anita-chouhan opened this issue Nov 27, 2023 · 11 comments

Comments

@anita-chouhan
Copy link

anita-chouhan commented Nov 27, 2023

I am using the oEmbed plugin to render media embeds. Currently, the field type methods (entry.field.media and entry.field.embed) are returning very few details for the embed object.

Example
Using the below code:
{% dd(entry.field.media) %}

returns only:
Screenshot 2023-11-27 at 2 27 56 PM
I need some other media details like type, provider name etc for different purposes. Can you please look into it?

Steps to reproduce

  1. Create a Craft CMS entry with an oEmbed field.
  2. In the field value set any YouTube or Vimeo URL.
  3. In the frontend template try to render media type using the below method
    {{ entry.field.media.type }}

Input field value
YouTube Link: https://www.youtube.com/watch?v=35kwlY_RR08

Expected Output
Additional media details as mentioned in the plugin doc.

entry.field.media.title
entry.field.media.description
entry.field.media.url
entry.field.media.type
entry.field.media.image
entry.field.media.imageWidth
entry.field.media.imageHeight
entry.field.media.code
entry.field.media.width
entry.field.media.height
entry.field.media.aspectRatio
entry.field.media.authorName
entry.field.media.authorUrl
entry.field.media.providerName
entry.field.media.providerUrl
entry.field.media.providerIcons
entry.field.media.providerIcon
entry.field.media.publishedDate

Additional Information
PHP version: 8.0.15
Craft CMS version: 3.8.17
oEmbed version: 1.13.19

@anita-chouhan anita-chouhan changed the title Additional data missing in media objects Additional data missing for media objects Nov 27, 2023
@reganlawton
Copy link
Member

I'll look into this more today @anita-chouhan

@reganlawton
Copy link
Member

@anita-chouhan Can I confirm your using the the release from Nov 2, 2022 AKA 1.13.19?

@anita-chouhan
Copy link
Author

@reganlawton Thank you for looking into it. Yes, I'm using version 1.13.19 of the plugin.

@reganlawton
Copy link
Member

@anita-chouhan I'll have to look into CraftCMS v3. My current Docker setup is for CraftCMS v4.

I'll get back too you on why on the issue, as it's been a why since I used the v1 branch, and it is 10:30pm AEST 😅

@espensgr
Copy link

Any news here @reganlawton? We are experiencing this on our Craft 3 site too.

@reganlawton
Copy link
Member

Oh sorry this is one of the tasks that fell off my todo list 😩 I'll assign some time to this task this weekend

@reganlawton
Copy link
Member

I'm still working on this I'm just having issues with building an older version as I dont hav the setup from >1yr ago

@maxfenton
Copy link

This is just info, but I get a lot of use out of ddev snapshot which makes saving database versions a lot easier during migrations and upgrades and makes rolling back or temporarily loading old versions a lot easier, too.
https://ddev.readthedocs.io/en/latest/users/usage/database-management/#snapshots

@espensgr
Copy link

Any progress here?

@espensgr
Copy link

Tested to turn off the cache and deleted the template cache, and then it worked, so it seems it is a caching issue like in #145 . Is there a way to get this fixed @reganlawton?

@reganlawton
Copy link
Member

A complete rework on the caching is on my pipeline still. I'm just trying to figure out how this can be done right and finding the free time to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants