On the page here:
enlace oculto
The images are being displayed initially. However, once the filter is used, the background images disappear. I am using a Bootstrap layout created by Toolset and the "AJAX results update when visitors change any filter values". When I am logged into the site the issue does not happen and the images appear. But when not logged in they do not appear on any browser. The background image which should be in the 'work-single-main-inner' div is listed as "background-image: url((unknown));"
Regards,
David
Hi David,
Thank you for contacting us and I'd be happy to assist.
If you're only experiencing this as a guest (i.e. non-logged-in) visitor, it is most likely related to a cache issue. Most cache solutions, show the cached version of the pages to the guests, but, the updated/live version to the logged-in admins.
When I visit your website's homepage directly, I can see the issue of the missing background images. But, if I visit with the same page with some URL string, for example "{yourwebsite.com}/?no-cache=true", it shows the password protection message and not the page itself.
I'll recommend clearing all involved caches and then checking the page and the search filter again.
regards,
Waqar
Hi Waqar,
Thank you for your quick response.
The issue isn't caching as far as I can tell. I have tried clearing the cache without success and have turned it off without success. I have a local dev version of the site that has no caching on it in the first place and the issue persists. I have tried turning off all plugins except Tools, Views and ACF (which is where the image is coming from via a custom field) and still the issue is there.
Regards,
David
Thanks for writing back.
To troubleshoot this further, I'll need to see how this view is set up in the admin area.
Can you please share the temporary admin login details in reply to this message? I'll also need your permission to download a clone/snapshot of the website, in case it needs to be investigated on a different server.
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
Thank you for sharing the access details.
During troubleshooting, I noticed that the view is using a custom shortcode "get_image_URL_by_ID", to get the URL from the image, stored in the ACF plugin's image type field.
In the code of this shortcode, the "acf" shortcode was being used to get the ID of the image from that image field:
$image_ID = do_shortcode('[acf field="'.$atts['field'].'"]');
But, it turns out that when the AJAX operation is performed on the view, the value of that field is not available. Changing it to use the Toolset's "wpv-post-field" shortcode instead, fixed it:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-field )
$image_ID = do_shortcode('[wpv-post-field name="'.$atts['field'].'"]');
( screenshot: enlace oculto )
Hi Waqar,
Thank you for that. Thats fixed the issue, and it all works perfectly on desktop, tablets and mobile.
Warm regards,
David