Skip Navigation

[Resolved] View with media not rendering with [wpv-post-featured-image] shortcode

This support ticket is created 4 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 3 voices.

Last updated by Shane 4 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#1506693
screenshot-www.mulaika.com-2020.02.13-16_59_52.png

I am trying to:
display view list for media with [wpv-post-featured-image] shortcode
Link to a page where the issue can be seen:
hidden link
I expected to see:
media images rendered
Instead, I got: missing images

*Previously it was working with displaying view list for media but after updating toolset to latest, it failed to render.*

#1507139

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eric,

Thank you for getting touch.

This is quite a strange issue as this should work as you say.

Would you mind allowing me to have admin access to the website so that I can check on this further for you ?

Thanks,
Shane

#1507813

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eric,

Thank you for the credentials,

Could you let me know which version of views this worked previously in ? As well as could I get a copy of the site for further testing ?

Thanks,
Shane

#1510383

Types and views old version working
Types 2.3.3
Views 2.5

I have rolled back to these old version on the website and all featured images displayed as per attached.

How do I send you a backup copy of the site?

#1513085

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eric,

I would need to log in and grab a copy with the duplicator plugin.

However I did some debugging and I see why this wouldn't work. The problem is that the image isn't stored as a featured image but under the table key _wp_attached_file which is different from the featured image.

Thanks,
Shane

#1513087

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Also it should be noted that many things have changed in wordpress and our toolset plugins since versions 2.5 of views so it could be related.

We can still retrieve the image url however you wouldn't be able to specify the size with the shortcode.

Thanks,
Shane

#1513125

But in older tools version were working fine. So what can be done for latest version to work? Thanks

#1517119

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eric,

Currently running checks on this for you.

#1517145

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eric,

I've escalated this one to our 2nd tier supporters for further debugging so that they can check the issue further.

I will provide an update once I get any information from them.

Thanks,
Shane

#1521869

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eric,

I'm currently in discussion with our 2nd tier supporters on this,

However you should be able to retrieve the image using this code below.

<img src="[wpv-bloginfo show='url']/wp-content/uploads/[wpv-post-field name='_wp_attached_file']">

Please let me know if this helps.
Thanks,
Shane

#1528063

thanks but unfortunately it did not work with the custom code. I reverted back to Types 2.3.3 and Views 2.5 which works with featured image

#1529261

Hi, Shane is out today for a national holiday and will return tomorrow to continue assisting you.

#1530581

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eric,

I've got some information from our 2nd tier supporters.

The verdict is essentially this shouldn't have worked in the first place because the shortcode isn't meant to be used in this context.

Perhaps in the old version of the plugin this worked perhaps because of a bug or an exception case which could've been patched out in a future update.

Essentially its because media files are stored differently from regular posts and their media files are not stored under the same name as featured images.

The only workaround to this is the shortcode I provided previously.

<img src="[wpv-bloginfo show='url']/wp-content/uploads/[wpv-post-field name='_wp_attached_file']">

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.