Skip Navigation

[Resolved] Gallery with lightbox has stopped working

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

Problem: A lightbox gallery has stopped working. The link href attribute contains a Types field shortcode that is not parsed as expected.

Solution: In this case it appears another plugin was causing a conflict. Delaying that plugin's execution by modifying the priority seems to have fixed the issue.

This support ticket is created 6 years, 1 month 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.

Our next available supporter will start replying to tickets in about 8.66 hours from now. Thank you for your understanding.

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 4 replies, has 2 voices.

Last updated by JamesS2731 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#635841

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"]
<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]

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

#636740

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.

#637378

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

#639014

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.

#640495

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

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.