Skip Navigation

[Resolved] Views generated image links need to be updated

This thread is resolved. Here is a description of the problem and solution.

Problem: Several custom field images are showing the wrong URL. It appears to be generated using the original image guid.

Solution: Update to Types 3.2 to get the fix for this bug.

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 22 replies, has 3 voices.

Last updated by Christian Cox 5 years, 12 months ago.

Assisted by: Christian Cox.

Author
Posts
#1114334

Hello, I was working on a clone of this site in a sub-folder called "test" and ended up moving the whole thing back in to the root. I ran a search and replace app to get rid of all instances of "test" (I thought) but the views-generated images that were created while in the test folder still seem to be using the old URL.

For example mysite.com/test/wp-content/uploads/2018/07/theimage-wpcf_1024x1024.jpg, rather than mysite.com/wp-content/uploads/2018/07/theimage-wpcf_1024x1024.jpg. This only applies to images with the views suffix. Is there a cache I can clear somewhere or something as these URLs are not in the database?

#1114497

Shane
Supporter

Languages: English (English )

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

Hi Zoe,

Thank you for contacting our support forum.

Were the images moved to the sub domain ? or are they still located on the main domain?

Please let me know.

Thanks,
Shane

#1114499

Hi Shane, the images do exist on the live site. I only noticed the problem because when I deleted the "test" sub-folder, most of the images broke. If I could have fixed the URLs it would have been fine, but because I couldn't see how to do that, I had to re-clone the live site back to "/test" so that the live site is not full of broken images!

So basically both sites have the full complement of images – they are clones – but on the live site, Views is still generating image links to the old test site for some reason.

On the home page of the live site, you can see for example "Somptueuse Maison …" down at the bottom. That property was added while the site was in the test folder, and still has "/test" in the URL of the image shown on the home page. If you actually click to view the property, all of the image URLs are correct – that content template is generating them correctly, but it seems the one that generated the grid images is not.

#1114538

Shane
Supporter

Languages: English (English )

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

Hi Zoe,

Have you tried resetting the permalinks ?

You can do this by following the instructions in the link below.
hidden link

Thanks,
Shane

#1114539

I hadn't thought of that, but no sadly that hasn't fixed it.

#1115716

Shane
Supporter

Languages: English (English )

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

Hi Zoe,

Would you mind if I took a look at this for you on the backend ?

The private fields will be enabled for your next response.

Thanks,
Shane

#1116474

Shane
Supporter

Languages: English (English )

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

Hi Zoe,

I checked on this for you but wasn't able to see any issues with the urls for the images. Perhaps i'm looking in the wrong place.

Could you point me to the page that I can see the issue ?

Thanks,
Shane

#1117678

Hi Shane

It only affects one property on the home page, but many others elsewhere. On the home page, if you search the source code for /test/, you should find it. It's "somptueuse maison…" On the prestige page, it affects most of them from that same property onwards. Those are all the ones that were imported while the site was in the test sub-folder. The ones that don't have 'test' in the image URLs were added more recently.

Thanks

#1117689

I have discovered that it can be corrected by manually re-saving the post, but is there a way to do this without manually opening and saving over a hundred posts?

#1118547
Screen Shot 2018-10-01 at 4.05.54 PM.png
Screen Shot 2018-10-01 at 4.04.54 PM.png

Hi, Shane is on holiday this week so I'm going to try to help. There is a cache of images used by Toolset, and it can be reset by going to Toolset > Settings > Custom Content. Try clearing both cached and outdated cached images first. If that doesn't work, you can try going to the post dashboard, check all the checkboxes, then use the "Bulk Actions" menu to edit the posts simultaneously. Update the posts without making any changes, and see if this solves the problem.

#1118566

Hi Christian, thanks for your reply, but no, none of that worked. I had already tried clearing the cached images several times. The bulk actions route also didn't work, which is consistent with my experience with that method for other things in the past. It's really very stubborn! Will the cache ever expire by itself?

#1119267

It's difficult for me to predict the image cache expiration behavior when you have other systems in play, like SG Cache, Views and WPML, which also have their own caching systems. To purge the Views cache, I added the cached="off" attribute to the View shortcode, like this:

[wpv-view name="featured-house" cached="off"]

This temporarily disabled the View cache, which was holding on to the old image references. Then I went to WPML > Assistance Technique > Dépannage to purge the WPML cache. Then I used the top menu to "Purge SG Cache", and now the test image URLs are no longer appearing. Can you check the site and let me know if any test image URLs are still showing?

#1119269

Hi Christian, no I'm afraid I still see /test in the URL of the background image for "somptueuse maison…" on the home page. I had already cleared the SG cache, and also Cloudflare several times before starting this thread so they should not have been a factor. If it really can't be sorted any other way, then it's not the end of the world, it just means I'm using up quite a lot of extra server space by having to have a duplicate of the site in the test folder.

#1119928

You're right, I'm not sure how I overlooked that yesterday during testing but it's obviously not working. I'd like to do some deeper investigation if that's okay with you. I'd like to create a clone of this site to see what's going on in the database, and report any potential bugs to my team. If you approve, I'll install the Duplicator plugin and create that clone so I can run tests locally without causing problems on your live site.

#1119942

Hi Christian, more than happy for you to do this, the only issue is that I already have a clone of the site on the server and the images for all of those properties take up a lot of space. I have removed a backup from the server, so there should be enough space to create a Duplicator package, but please remove it afterwards. Thanks very much!