cliffhoelz
El Presidente
Friendly Neighbour
Member Likes (0)
i am getting this warning instead of the data on selectbox fields:
the setup in the template is
<?php echo do_shortcode('[ct id="_ct_selectbox_4f84cc23411ff" property="value"]'); ?>
all of the drop downs have many entries and are set with a default
the Warning
Warning: Invalid argument supplied for foreach() in /home/content/03/4427803/html/AZProject/wp-content/plugins/custompress/core/content-types.php on line 1123
any ideas on what may be wrong?

Responses (4)
Inactive (joined February 2012) Likes (0)
Hey cliffhoelz,
This is a bit strange, I got the same errors as well. I think this has to do with the Field Type being used. It works fine for date picker, but with radio buttons and drop down boxes I get the same error.
At the same time it works fine when title or description is used as property instead of value.
I will notify the developer regarding this. Thanks for bringing this up :)
Inactive (joined February 2012) Likes (0)
Note to Arnold:
Here is what I did.
- Created a custom field for a custom post type.
- One was a Date Picker, One Radio Buttons, One is a Drop Down Select Box.
- Used the following embed codes in theme. The Datepicker works fine, Radio Buttons and Drop Down select boxes give the error when value is used as property. It works fine when title or description is used instead.
This one worked:
<?php echo do_shortcode('[ct id="_ct_datepicker_4f7cb2bec4897" property="value"]'); ?>This one worked too:
<?php echo do_shortcode('[ct id="_ct_radio_4f7cb266332d8" property="title"]'); ?>Error:
<?php echo do_shortcode('[ct id="_ct_selectbox_4f7cb36350af5" property="value"]'); ?>Warning: Invalid argument supplied for foreach() in C:\Program Files\IWP\InstantWP_4.1\iwpserver\htdocs\wordpress\wp-content\plugins\custompress\core\content-types.php on line 1123
See the screenshot attached too. Hope this helps.
Developer (joined January 2012) Likes (0)
I just posted a version that should fix this.
Inactive (joined February 2012) Likes (0)
Awesome! it is fixed now :)
@cliffhoelz - Please update your plugin to the latest version (1.2.1.1) and the errors will go away.
See the screenshot attached.
Become a member