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.
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.
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.
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.
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.
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.
Sure, please let me know, when it is fixed. Thank you!
Okay I'm updating the ticket status, no need to reply right now.
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.
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.