Our reviews pages (an example can be seen at hidden link) have a lightbox gallery that was working until recently. The images now return a 404 when clicked.
The code I"m using in Layouts is as follows:
[wpv-for-each field="wpcf-gallery"]
[types field='gallery' alt='%%ALT%%' title='%%TITLE%%' size='medium' align='center' resize='proportional' separator=', '][/types]
[/wpv-for-each]
I'm using the Responsive Lightbox plugin from dFactory - https://wordpress.org/plugins/responsive-lightbox/
Any thoughts or suggestions as to how to rectify this greatly appreciated.
Kind regards
James
Hi, I noticed you have WP Bakery Page Builder active. Please try this updated syntax:
[wpv-for-each field="wpcf-gallery"]
<a href="{!{types field='gallery' size='full' url='true' separator=', '}!}{!{/types}!}">{!{types field='gallery' alt='%%ALT%%' title='%%TITLE%%' size='medium' align='center' resize='proportional' separator=', '}!}{!{/types}!}</a>
[/wpv-for-each]
If this does not resolve the issue, please tell me more about how this is added to the Layout - in a Post Content cell, a visual editor cell, etc.
Hi Christian,
Many thanks for getting back to me so quickly.
I've just tried updating to that code but with no luck. The url produce for each image is like this (as an example)
/review/helly-hansen-hydropower-4-shoes-review/%7B!%7Btypes%20field='gallery'%20size='full'%20url='true'%20separator=',%20'%7D!%7D%7B!%7B/types%7D!%7D
and returns a 404.
If you would like access to the site to see the layout, I have created a login for you, as follows:
- removed by admin -
The problem field is in a Layout found in Toolset > Layouts > Template for Review Posts
Its the last field on the page and is just added using your visual editor.
I look forward to your thoughts.
Kind regards
James
Okay I don't see anything wrong with the code here, so there must be something else going on. Please try the following troubleshooting steps:
- Temporarily deactivate all plugins except Types, Views, and Layouts. If you need to run a plugin like Maintenance Mode during testing, that's fine.
- Activate a default theme like Twenty Seventeen.
- Check the link destinations for each gallery image. If the link destinations have been fixed, there must be a conflict in your theme or another plugin. Reactivate them one by one until the conflict is revealed. If the link destinations have not been fixed, I'll need to take a closer look. I can install the Duplicator plugin to create a clone of your site and run some additional tests.
Let me know what you find out.
Hi Christian,
Many thanks for the advice. I traced the error to the Advanced Ads Pro plugin. I had previously had some issues with their ads displaying and their support team suggested adjusting the 'Priority of content injection filter' but, at the time, had said that if the priority was set too low (below 10) it may adversely affect other elements.
It was set to 2, so I raised it to 5 and the issue disappeared.
Many thanks for all your help on this.
Kind regards
James