Warning error in Classifieds

When i want to create a new Ads in the classifieds module i have this issue in the footer

Warning: Invalid argument supplied for foreach() in /home/mitribu/public_html/wp-content/plugins/classifieds/ui-front/buddypress/members/single/classifieds/custom-fields.php on line 24

Thanks in advance

  • Kimberly
    • Champion of Loops

    Hello migueldelacueva

    Are you using any custom fields in your setup? This portion of the code is saying that something is breaking when the "object type" is being looked for.

    foreach ( $custom_field['object_type'] as $custom_field_object_type ){
    	if ( $custom_field_object_type == 'classifieds' ){
    		$output = true; break;

    We had a similar error in the previous version of a plugin that used CustomPress the same way this one does. Can you try something here? create a custom field for the classified post type. you don't have to use it, just create one.

    Thanks!

    Kimberly

  • arthur_leite
    • New Recruit

    Hello, I'm getting the same issue "
    Warning: Invalid argument supplied for foreach() in /home/.../wp-content/plugins/classifieds/ui-front/buddypress/members/single/classifieds/custom-fields.php on line 24

    It shows below the cost and right before the save changes button (not in the footer) when you try to create a new ad. I'm still able to create it.

    Using WordPress 3.3.1
    My server is running PHP version 5.2.17 and MySQL version 5.5.23

  • arthur_leite
    • New Recruit

    I did create a custom field when I added a new ad from the admin page. I just created a new one and put something random for a value. Not sure if that was enough as I didn't understand much on your suggestion :slight_smile:

    let me know if you need more info

  • Kimberly
    • Champion of Loops

    I've done a test install and cannot seem to replicate this issue.

    I've tried with both versions of Classifieds and CustomPress and I'm using the Buddypress Corporate theme.

    Can you try this with the default buddyrpess to see if you still have same issue?

    What theme are you using?

    Best,

    Kimberly

  • migueldelacueva
    • Design Lord, Child of Thor

    Hi KimberlyL

    My site is working with Buddypress into a subdomain like this subdomain.mysite.com, i had configured the bp-custom.php file according the buddypress instructions provided into the main theme.

    I think that these installed plugins that may interfiere with this issue
    - Custompress
    - Woocommerce with manages products as custom posts.
    - Buddypress
    - Buddypress template pack
    - Classifieds

    Sorry for my delay, thanks in advance

  • Ashley Keable
    • The Incredible Code Injector

    I am having the same issue with my buddyboss theme, however i switched to the buddypress default and the error still persists so it isnt theme dependant.

    I have enclosed a screenshot of the error to see if this helps.

    Please can you get on this asap as it seems to be a common issue?????

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.