Skip Navigation

[Resolved] Error in beta: types field shortcode for empty image custom field

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

Problem: I am experiencing a problem in the beta plugins. I have an image custom field in my custom post type that is not required. I have placed that image field in my Layout using the Types field shortcode. If the current post has no image in the custom image field, a fatal error is shown.

Solution: Update to the latest beta plugins, including Types 3.0-b1

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

Last updated by sinisaB 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#628332

Hi, you can now find Types 3.0-b1 available for download in your account area here at https://toolset.com/account/downloads. This new beta release includes a fix for this issue with empty repeating image fields in Layouts. Please install the update and let me know if you continue to experience the fatal error.

#628395

"Bug" is still here...

If there is not any image uploaded at the image custom field "Ostale fotografije" (other images), complete custom post frontend won't be displayed after admin approval (draft>published, it is visible on the frontend for admin only BEFORE publishing), just blank page!
hidden link

It should look like this:
hidden link

This conditional output solves Problem, but I think it is not a permanent solution:

<p>[wpv-conditional if="( $(wpcf-ostale-fotografije) ne '' )"]Ostale fotografije:</p>
<p>[types field='ostale-fotografije' alt='%%ALT%%' title='%%TITLE%%' size='thumbnail' align='none' resize='proportional' separator=', '][/types]</p>
<p><p/>
[/wpv-conditional]<br />
<hr/>

I don't know it is some kind of bug, but I think it is not a plugins conflicts or similar, I've deactivated all other plugins several times

Thanks,

Sinisa

#628507

Okay can I get updated login credentials? I need to make a copy of your site to run some additional tests.

#628572
Screen Shot 2018-03-26 at 5.55.53 PM.png

I can see that you have not updated to the latest Types beta. Your site has Types 2.3-b5 installed, not Types 3.0-b1. Maybe there was a problem during the automatic update? I downloaded a copy of your site and ran some tests. When I updated to the latest beta, I was not able to replicate the fatal error and the correct Layout appears as shown in the attached screenshot. Please update Types and try again.

#628579

Done!
After the update, everything works fine, no issue with that image field anymore...

Thank you!

P.S.
I haven't seen till now that I am able to make an update on any of Toolset plugins...
Today I was on plugins update page and everything was green, but meanwhile "red number" on Types appears!
So, no problem anymore!