• Resolved Charles Fulton

    (@mackensen)


    We updated from 2.4.2 to 2.8.0 and now see the following notices in our wp-json feed:

    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php on line 557

    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php on line 557

    Warning: Invalid argument supplied for foreach() in /var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php on line 557

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php:557) in /var/www/html/wp-includes/rest-api/class-wp-rest-server.php on line 1337

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php:557) in /var/www/html/wp-includes/rest-api/class-wp-rest-server.php on line 1337`

    This is on WordPress 5.4. Disabling the plugin resolves the issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author andergmartins

    (@andergmartins)

    Hi @mackensen I tried to replicate but can’t see the same warnings using v2.8 on Wp 5.4.12. Please, could you let us know what is the endpoint you are calling in the REST api so we can try replicating the issue?

    I know that disabling the plugin the error is gone, but please could you try disabling other plugins and leaving Future activated? That can help if Future is having compatibility with other plugins.

    Thanks

    Plugin Author andergmartins

    (@andergmartins)

    Actually, I’m sorry. I missed a detail and now I can replicate the bug with only Future activated. I’m debugging that one.

    Plugin Author andergmartins

    (@andergmartins)

    @mackensen Please, could you try the following beta package?

    https://www.dropbox.com/s/oz7nyfa237f5o41/publishpress-future-2.8.1-beta.1.zip?dl=0

    It packs a fix for this and will be available on the next stable release.

    @andergmartins Thank you for your prompt response. We tested 2.8.1-beta.1 and are continuing to receive warnings and notices in the WP-JSON feed:

    <br />
    <b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Notice</b>: Undefined index: properties in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />
    <br />
    <b>Warning</b>: Invalid argument supplied for foreach() in <b>/var/www/html/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php</b> on line <b>578</b><br />

    Plugin Author andergmartins

    (@andergmartins)

    Hi, thanks,

    Please could you confirm you are still using WP 5.4? The line numbers changed a little.

    Please, try this new package:

    https://www.dropbox.com/s/kujayfn9o0drho1/publishpress-future-2.8.1-beta.2.zip?dl=0

    Thanks,

    Anderson

    Thank you, Anderson. 2.8.1-beta.2 seems to have resolved the issue.

    We are now running WordPress 5.5 and updating incrementally, but we also tested 2.8.1-beta.1 on a previous 5.4 instance that was initially displaying the errors. We had upgraded from 2.4.2 to 2.8.0 of the plugin and that is when the notices began appearing in the JSON feed.

    One thing we found that was upgrading to 2.8.1-beta.1 on an instance that displayed the notices did not resolve the issue even with all other plugins disabled. However, a fresh WordPress installation with 2.8.1-beta.1 did not display the errors. We tried clearing out plugin data manually and via the option to remove plugin data during deactivation, but the notices always displayed in the feed on instances wherein 2.8.0 was activated previously. 2.8.1-beta.2 seems to have resolved the issue.

    Thank you kindly for your support on this.

    • This reply was modified 1 year, 4 months ago by nicnickj.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Notices in the wp-json endpoint’ is closed to new replies.