unfulvio / wp-api-menus

:abcd: Menu routes for WordPress JSON REST API.
https://wordpress.org/plugins/wp-api-menus
GNU General Public License v2.0
140 stars 59 forks source link

Empty Items Array #19

Closed laustdeleuran closed 8 years ago

laustdeleuran commented 8 years ago

On WP 4.4.1 with WP API v2 and this plugin, I get an empty array in the items prop. The count still says 5, interestingly enough.

{
    ID: 10,
    name: "Footer",
    slug: "footer",
    description: "",
    count: 5,
    items: [ ],
    meta: {
        links: {
            collection: "http://localhost:8888/wp-json/wp/v2/menus/",
            self: "http://localhost:8888/wp-json/wp/v2/menus/10"
        }
    }
}

This issue has already been reported on Wordpress.org, but I'm reporting it here in hopes of support.

Help? :)

ericsvendsen commented 8 years ago

+1. Thanks for reposting this here - I was about to do the same thing. This issue didn't happen for me until I upgraded to Wordpress 4.4.1. Same thing though - the count is right but the items array is empty.

Dobbler commented 8 years ago

+1 Same here, 4.4.1. Count is right, empty items array..

Dobbler commented 8 years ago

I've submitted a pull request for this here: https://github.com/unfulvio/wp-api-menus/pull/20/files

unfulvio commented 8 years ago

merged, thank you, will push update on .org soon