Support

Account

Home Forums Add-ons Repeater Field Leaving fields blank causes notices in wp-includes files

Solving

Leaving fields blank causes notices in wp-includes files

  • Hello.

    This site is using a combination of advanced fields, relationships and repeaters seem to be causing the problems.

    Two problems we’re having.
    First, http://gold.shockingcreations.com/annual-symposium/presenters/

    On the presenters page there is a presenter ‘Scott Danielson’ who does not have a value in the excerpt field of his profile. (This is the regular WP excerpt field.)
    Expecting to see a blank space where his excerpt would go, instead I see a notice.
    If I give him an excerpt, the next presenter in the list who doesn’t have an excerpt will have this same notice in it’s place.

    Notice: Object of class WP_Post could not be converted to int in /var/www/vhosts/gold.shockingcreations.com/httpdocs/wp-includes/post-template.php on line 251

    The other issue is on the presenter profile pages.
    http://gold.shockingcreations.com/presenters/scott-danielson/
    In the ‘gallery’ or ‘articles written’ sections, when no value is entered in either field the following notice is displayed.

    Notice: Uninitialized string offset: 0 in /var/www/vhosts/gold.shockingcreations.com/httpdocs/wp-includes/query.php on line 3739

    Not sure where to begin debugging this. Are there any known solutions? Any help is greatly appreciated. Thank you.

  • Hello, does anyone have any insight on this? Still an issue we’re hoping to solve soon. Thank you.

  • Not sure if this is the same issue you experienced but I was using a Relationship field, and when it was blank I was getting the “Notice: Uninitialized string offset: 0” message.

    I changed the name of the variable “$posts” to something else, and now it all seems to work correctly.

  • I can confirm the same error message appearing with a Relationship field, and changing the variable to something other than $posts does fix the issue.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Leaving fields blank causes notices in wp-includes files’ is closed to new replies.