Skip Navigation

[Closed] Toolset image repeater field (gallery) is never empty

This support ticket is created 3 years, 8 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 6 replies, has 3 voices.

Last updated by Christian Cox 3 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#2161159
dinamic-conditions.png

Hello,
I am using Elementor image slide widget with a repeating toolset image field to show a gallery. If there are images uploaded in the gallery the widget works fine like here: hidden link
But if there are no images uploaded in the gallery there is always one image showing like here: hidden link
Image VBAL7410 is not uploaded in the gallery nor any other gallery in the website.
I have the same issue with the same widget which I use on several pages, for example here:
hidden link
The image VBAL7410 stays everywhere but it is not uploaded in any gallery on my website.
I am using the Dynamic Conditions plugin to hide this widget when the toolset gallery is empty and in debug mode, it shows that the condition is not met (see the attached screenshot.
Can you help?

Regards,
Nelly

#2161365

Hello, can you test by placing a Types field shortcode in this template?

[types field="artist-galeria"][/types]

I'd like to know what is displayed in posts that have no images saved in the image field, for example, in the post /artist/abisal-gergiew/

#2161369

The shortcode is pasted in the artist-single template.
Artist with no images in the gallery: hidden link
Artist with images in the gallery: hidden link

#2162413

Shane
Supporter

Languages: English (English )

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

Hi Nelly,

Christian is currently out today on holiday and should be back tomorrow to continue assisting.

Thanks,
Shane

#2163039

Hi, has something changed in the last day or two? I no longer see an image appear on this Artist post, and the Toolset shortcode produces no results for the image gallery:
hidden link

Did you add some custom code to prevent the problem, or is something different today?

#2164309

Hello,
I had to put a javascript code to hide the missing gallery in the artist-single template as my client was impatient.
You can still see the issue here:
Gallery with uploaded images: hidden link
Gallery with no uploaded images: hidden link

The shortcode [types field="sp-galeria"][/types] is pasted on both pages.

Regards,
Nelly

#2165197
Screen Shot 2021-09-09 at 4.52.37 PM.png

Thanks for the update. I added a hidden span wrapper in the Elementor template so that the results of the shortcode are not displayed on the front-end of the site:

<span style="display:none;" class="tssupp">[types field="sp-galeria"][/types]</span>

This is the template I edited:
hidden link

You can still see the results of the shortcode by examining the front-end page in the browser inspector, or by examining the page source code. I'm attaching a screenshot here so you can see the relevant page source markup for the gallery with no uploaded images. Link to the post: hidden link

The span tag is empty, nothing here shows VBAL7410 or anything related to that image. In other words, the Types field shortcode is showing that no images are saved in the image field. So from a Types perspective here, this field is empty. Not sure why the Dynamic conditions feature and the Elementor carousel feature are interpreting the field as anything other than "empty", since as you can see the Types field shortcode produces nothing here in the page source. It sounds like a problem in Elementor or in the Dynamic conditions plugin if their systems show non-empty fields here.

I'm not very familiar with Dynamic conditions...do you know if it is possible to use Dynamic conditions to test the value of a shortcode? In other words, instead of selecting a Toolset field to test directly, is it possible to have Dynamic conditions test the value of the Types field shortcode instead?

If not, I was hoping to use Toolset's conditionals instead of Dynamic Conditions features so I spent some time trying to make this work today, but could never get the image carousel to work correctly. I was hoping I could do something like this in the Elementor design:

Test conditional:<br />
[wpv-conditional if="( '[types field="sp-galeria" output="raw" item="$current_page"][/types]' ne '' )"]
  Conditional is true. Test template:<br />
  [elementor-template id="12345"]
  End template.
[/wpv-conditional]
End conditional.<br />

The conditional part works correctly, but the embedded Elementor template part isn't working correctly here. I was hoping an image carousel element in an Elementor template would automatically pull images pull from the correct post. However, when I tested it out I can see the image carousel does not work correctly on posts that include images in the repeating image field. I tried using a Global element as well, but had no luck.

So if you know how to use Dynamic Conditions to test the value of a shortcode, please let me know.

The topic ‘[Closed] Toolset image repeater field (gallery) is never empty’ is closed to new replies.