Skip Navigation

[Resolved] Fatal error when display a checkbox

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

Problem:
When I display a checkbox I see:

Fatal error: Uncaught Error: Undefined class constant 'WPML_CHECKBOX_SELECTED' in .../plugins/types/application/models/field/part/option.php on line 139

Solution:
Update to the latest Toolset versions.

This support ticket is created 5 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by jeffC-6 5 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#952429
Broken Page.png
Set-Up.png

I am trying to:
Output a checkbox value of "hidden" using <?php echo types_render_field('hide-header');?>

Link to a page where the issue can be seen:
hidden link

I expected to see:
The field outputted as was working in 3.0.4

Instead, I got:
A broken page.

As soon as I uncheck that field all works well. If I do not use the field in the template all works well. Was working fine yesterday, started happening with the latest update.

#952793

Can you confirm that if you enable WP Debug you see this error where the Checkbox value should display:

Fatal error: Uncaught Error: Undefined class constant 'WPML_CHECKBOX_SELECTED' in .../plugins/types/application/models/field/part/option.php on line 139

https://codex.wordpress.org/WP_DEBUG

It happens only where the field actually has a value stored and if the Checkbox field has "Show one of these two values:" selected.

I already escalated this, I just want to be sure wee are speaking about the same issue.

#953627

Yes, you can see the php error here:
hidden link

#954292

This is now resolved in the last release.

#991109

Thanks!

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