Skip Navigation

[Resolved] Types thinks that Custom Field is empty when it is not

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

Problem:

The issue here is that the user had a nested RFG and wanted to use the value of the parent RFG to determine the display of the child field

Solution:

All that is needed is to write your conditional using the parent shortcode value.

[wpv-conditional if="('[wpv-post-id item="@class-chapter-video.parent"]' ne '' )" ] <i class="far fa-play-circle"></i>[/wpv-conditional]

The above is an example of how this looks.

This support ticket is created 4 years, 10 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 2 voices.

Last updated by liatG 4 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1255289
Screenshot_Liat 2019-05-31 at 11.29.14 AM.jpg
Screenshot_Liat 2019-05-31 at 11.03.44 AM.jpg
Screenshot_Liat 2019-05-31 at 11.03.09 AM.jpg
Screenshot_Liat 2019-05-31 at 11.01.56 AM.jpg
Screenshot_Liat 2019-05-31 at 11.01.13 AM.jpg
Screenshot_Liat 2019-05-31 at 10.59.50 AM.jpg
Screenshot_Liat 2019-05-31 at 10.59.05 AM.jpg
Screenshot_Liat 2019-05-31 at 10.57.32 AM.jpg

I have a View set up that displays a play icon in a menu when a certain Custom Field is not empty. It has always worked in the past. Now when I add a new Online Class Chapter and select the Class Chapter Video from the dropdown, the play icon is not displayed.

I tested this on a staging site I set up a month or two ago, and it is working correctly.

I created a copy of my current site and put it at hidden link. I tried using theme TwentyNineteen. The problem persists. I deactivated all plugins except Toolset and the problem still persists.

#1255411

Shane
Supporter

Languages: English (English )

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

Hi Liat,

Thank you for getting in touch.

It seems the site is on a private server.

Could you send the credentials for this as well ?

Thanks,
Shane

#1255415
#1255419

Shane
Supporter

Languages: English (English )

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

HI Liat,

I'm able to get on now.

Could you let me know the page where I can see the issue ?

Thanks,
Shane

#1255451

Hi! Sure, sorry I left that out.

hidden link
Scroll up to see the sidebar with the problem. The problem is also apparent at that anchor link (the "pipe" is missing as shown in screenshots)

You can see the URLs for the various Views also on all the screenshots.

#1255473

Shane
Supporter

Languages: English (English )

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

Hi Liat,

I tried enabling back the original Astra theme and I was greeted with an error.

Unfortunately I cant proceed any further since i dont have ftp access.

However the first thing I would do is to add debug='true' to the conditional statement and check to see what values are being passed in the conditional, especially the one where the play button isn't showing up.

This will let us know exactly what the conditional is seeing from the post.

Thanks,
Shane

#1255481
Screenshot_Liat 2019-05-31 at 3.34.29 PM.jpg

Thank you Shane!
Thank you for the information about debugging the condition. This will be very useful!!

I added the debug code to the View on the live site and took a screenshot. You can see that for the chapter above the problematic one, the condition sees the video field as filled with the post id. In the problematic one, the field seems to be empty.

I think the error message on the staging site is due to my hosting account being full (too many staging copies) so I will work on deleting those. I can always make another one.

#1255501

I created a new staging site from my live site:

hidden link
login: knitfree_staging
pw: W=fa{Rie_dLT

Those are the credentials to the site, not the admin. The admin credentials are the same as what I left you in the private fields before.

I tried one other thing. I deleted the post reference field "class-chapter-video" (keeping the associations), saved the group, and then re-added the field. No change. No matter what video I select for that field, the site thinks the field is empty.

Please let me know what else I should try!
Thank you.

#1256331

Is Christian around today? Can anyone help me solve this issue?
Thanks.

#1257021

Shane
Supporter

Languages: English (English )

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

Hi Liat,

I'm here now,

Checking on this for you today, I was able to log in successfully. However i'm having difficulties finding the view that is listing out the content for the sidebar.

I eventually did find the view but in my checks i see that the posts that dont have the video icon are not connected to a video. Example here.
hidden link

If you're able to link me directly to a post that has a video that doesn't show the icon please do.

Thanks,
Shane

#1257291

Hi Shane,

The post that has a video that doesn't show the icon is here:
hidden link

It's the one that I show in the screenshots.

It's a post that I added recently. All posts that I create since then have the same issue. I created several to test.

#1257295

Also you can find the views by looking at the URLs in the screenshots. The view that has the sidebar menu is 43615. I hope that helps.

#1257389

Shane
Supporter

Languages: English (English )

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

Hi Liat,

Should be working now.

I changed the conditional to use the shortcode instead.

[wpv-conditional if="('[wpv-post-id item="@class-chapter-video.parent"]' ne '' )" ] <i class="far fa-play-circle"></i>[/wpv-conditional]

Thanks,
Shane

#1257403

Hi Shane,
Thank you so much! I can't believe you figured this out. What a wonderful way to fix the problem. Thank you so much.

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