contentful / ui-extensions-sdk

A JavaScript library to develop custom apps for Contentful
https://www.contentful.com/developers/docs/extensibility/app-framework/
MIT License
126 stars 31 forks source link

Unknown method "getEntries" #657

Closed nenadg closed 3 years ago

nenadg commented 3 years ago

Hi,

I'm currently facing an issue with custom Contentful UI component that consumes extension API. Simple query with getEntries returns error, test script is something like this:

cfExt.init(function (api) {
      // Whenever the size of this document changes we adjust the size of
      // the IFrame in the Contentful App.
      api.window.startAutoResizer();
      cfApi = api;

      const currentItemId = api.entry.getSys().id;

      api.space.getEntries({
          'links_to_entry': currentItemId
      })
      .then((entries) => {
        console.log('linked to:', entries)
      });
  });

Error returned, looks like this: Screenshot from 2021-04-20 15-28-14

Any help with this would be more than great :).

jelz commented 3 years ago

@nenadg - can you check now? We've just shipped a fix

nenadg commented 3 years ago

Yeah, it works :) Thanks, this was fast