Warning error in Directory listings

Hi,

I am getting the following message in my directory listings under the rate this line.

Warning: Invalid argument supplied for foreach() in /nfs/c09/h01/mnt/127207/domains/naturaltransition.com/html/wp-content/plugins/directory/ui-front/general/display-custom-fields-values.php on line 45

I am running version 3.3.1, Directory 2.0.3 and custom press 1.2.

I have temporarily changed the permissions on the themes folder to 777 as mentioned in the custom press settings.

Any ideas?

  • Kimberly
    • Champion of Loops

    naturaltransition

    Hi and Welcome to WPMUdev forums!

    Do you currently have any custom fields in your Directory?

    If so have you embeded them in your post? You can find instructions for how to add in the CustomPress custom fields at the bottom of the Installation and Use Instructions for Directory.

    If you have not created or started any custom fields can you please check to see if you can get the error to disappear by systematically deactivating your plugins and checking to see if that will help remove the error. It will help us to determine if there is a conflict somewhere.

    Are you using CustomPress in any other Post Type?

    Best,

    Kimberly

  • naturaltransition
    • Flash Drive

    Thanks for your help Kimberly.

    CustomPress actually messed up the navigation for the directory so I deleted it. The problem was there before I installed it and remain after I deleted it but no, I wasn't using it for any other post types.

    I went through and deactivated plugins in batches and on the third batch, the warning disappeared. I then activated the three from that batch one at a time and mysteriously, the warning didn't come back. So I guess the problem is solved though I have no idea how or why!

    One other thing I need help with. I think it easiest if I just show you via screen shots which I have attached. The first one is for the naturaltransition.com/listings-category/ pages and the second is for the naturaltransition.com/listings/ pages

    Thanks again for your help.

    Regards,

    Julie

  • Kimberly
    • Champion of Loops

    Hey Julie,

    There is a conflict with Custompress and Directory as it uses some of the same class designations. This will be fixed with the new update/reslease of Directory and I think it may have been partially addressed in a recent CustomPress update.

    I'd love to help with your remianing issue, I don't see any screenshots though... or did you start another thread with those and an explanation already?

    Cheers! :slight_smile:

  • Kimberly
    • Champion of Loops

    Ah, you will need to insert the code calling the category into the single post page template. :slight_smile:

    An you will need to edit the category page template. I can't recall which it is at the moment, but you can search the .php files for "Listing Category:" without the quotes. When you find it you will see the code below that calls the Second Category Title.

    Wish I could offer more detail on the page, but we are running out of the door and my kids are tugging at my legs! I will check back later to see if you have made progress, if not I will dig into it!

    Best,

    Kimberly

  • aecnu
    • WP Unicorn

    Greetings naturaltransition,

    Just a heads up that there have been updates made to both the directory plugin and the custom press plugin since you started this post.

    Please be advised to backup both your site and your database before running the updates for these two products.

    Cheers, Joe

  • naturaltransition
    • Flash Drive

    Ah, great, thanks Joe. I'll get to work on finishing that project off tonight hopefully!

    Do you have any further detail on what code needs to be changed to achieve my goals as mentioned previously? I've really got no clue.

    And... thanks Kimberly for your help, I haven't been back since your last post, I appreciate your help.

    Regards,

    Julie

  • aecnu
    • WP Unicorn

    Greetings Julie,

    There are massive changes with these plugins so beware and caution - that is why I suggested to be sure to back up both the site and your database.

    We may just find that these tweaks you were considering may no longer be applicable.

    Please advise how it goes.

    Cheers, Joe

  • naturaltransition
    • Flash Drive

    Hi Joe,

    I've just checked for updates and found that I've been using directory 2.0.5 for a couple of weeks already. I updated as soon as it came out. I'm no longer using custompress because it didn't seem to help anything and caused a few problems that were fixed by removing the plugin.
    It is the same as above. I still need to tweak it if I can. Can you help?

  • aecnu
    • WP Unicorn

    Greetings Julie,

    Sorry for the delay here in a response, somehow your response to this ticket got past me.

    Sure I will most happily try to help anyway that I can.

    However, though I am more then willing to help tweak this version, please be advised that the new lead developer of the Directory plugin whom is also the new lead developer of Custom Press and the Classifieds plugin has given me the heads up that his first new version of this plugin will be coming out soon.

    Therefore it may be in your interest to hold off until the new version comes out if you can so we may not be spinning our wheels over what may soon become totally obsolete issues.

    But I am willing to work with you as the plugin stands now if you so desire.

    Please advise.

    Cheers, Joe

  • aecnu
    • WP Unicorn

    Greetings Julie,

    First I would like to commend you on your patience, thank you for that and I am truly sorry that it has taken so long to get the issues with the Directory plugin addressed.

    The reason it has taken so long is because the new developer has had to first fix Custom Press so that it would correctly integrate with the Directory plugin instead of the piece meal fashion that had been integrated into it by the previous developer that is no longer with WPMU Dev.

    In addition the need to overcome all the incorporated permalink issues that are inherent in the current version.

    To get right to the bottom line of the direct question you asked about a time frame, I can only offer that it has been assigned as top priority for the new developer by our Boss.

    Though I have not yet seen a RC release or Beta release come out yet, with the above in mind I would imagine it should be fairly soon.

    On the other hand, I will see if I can get the lead developer in here asap to possibly offer his advice/advise to fixing the warning you are receiving with the plugin as is:

    Warning: Invalid argument supplied for foreach() in /nfs/c09/h01/mnt/127207/domains/naturaltransition.com/html/wp-content/plugins/directory/ui-front/general/display-custom-fields-values.php on line 45

    Cheers, Joe

  • Arnold
    • El Macho WP

    The error occurs because the old version doesn't create a variable for a blank list of custom fields. A temporary fix is install CustomPress and create a custom fields and save it. You can delete it afterward if you like as the variable for it will remain though it will be empty.

  • aecnu
    • WP Unicorn

    Greetings Julie,

    It appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you for being a WPMU Dev member!

    Cheers, Joe :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.