Skip Navigation

[Resolved] Views is still using the old /files/ path for uploaded media

This support ticket is created 6 years, 2 months 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 9 replies, has 2 voices.

Last updated by Christian Cox 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1131919

I am trying to: Set all Views to use the new media files upload path, instead of the old /files/ path. I just switched from the old structure to the new one, so I'd like to get rid of all /files/ media path.

Link to a page where the issue can be seen: hidden link

The home slideshow Views are still printing the old /files/ path for the slideshow images. These images are coming from a CPT's featured image setting.

I use the [wpv-post-featured-image size="full" output="url"] shortcode to output the featured image url as a background. If I use the same shortcode to output the full img html tag, than it is working great, as you can see on the same page , where you see 3 posts (Post title: "Tűt a szénakazalban – RTLS megoldással").

So somehow the same shortcode is not working as expected, when it has to output only the url.

I expected to see: Every Views should be showing the right image path, like: /wp-content/uploads/sites/42/

Instead, I got: The [wpv-post-featured-image size="full" output="url"] shortcode is showing the wrong (old) path.

#1132137

Hi, please try the following troubleshooting steps first:
- Clear the Toolset image cache. Go to Toolset > Settings > Custom Content and click "Clear Cached Images"
- Turn off Views caching for this View. Look for the shortcode used to insert the View, and add cached="off" like this:

[wpv-view name="Your Homepage View" cached="off"]

Please let me know the results of these steps and we can go from there.

#1132142

Hi Christian,

thank you for your quick response!

I have done both suggested steps, cleared the cache and disabled caching for that view. Unfortunately, the images are still getting the old path structure.

As I told you, the shortcode is printing the right path, if I set it to show the img html tag, instead of the raw url. So I guess, this is not a caching problem.

#1132214

Okay thanks, I will report this to my 2nd tier support team. We recently saw an issue similar to this with Types field shortcodes and custom images, and I suspect this is a symptom of a similar problem. I'll let you know what I find out.

#1134185

Hi,

I have the solution for this issue: the shortcode is reading the path from the posts table, from the guid, that's why it is printing the old path.

I can resolve it with a search and replace, but I think, you should consider using another method to get always the current path and url.

#1134415

You're correct, the post GUID is being used improperly here. We had another ticket recently where this was happening with Types field shortcodes, but the solution implemented there did not apply to the featured image shortcode. It looks like this will require another code fix, so I think your temporary solution of modifying the GUID in the database is probably okay in the short term. I'll be glad to keep you posted here when the permanent fix is in place.

#1134482

Sure, please let me know, when it is fixed. Thank you!

#1134487

Okay I'm updating the ticket status, no need to reply right now.

#1145807

Hi, our developers have informed me that this issue will be resolved in Views 2.7. I will keep you posted here as I receive more information about the upcoming release.

#1155527

Views 2.7 has been released and is now available for automatic update or download. Please update to the latest versions of all Toolset plugins and let me know if the problem is not completely resolved.