Restapi: Search for full objects

I want to search for 'fullobjects' with Plone Restapi.
I tested this with

https://mysite.no/@search?portal_type=News%20Item

And it returns (correctly) 6 items.

If I change to

https://mysite.no//@search?portal_type=News%20Item&fullobjects=1

I get the following error:

    Traceback (innermost last):
 Module ZPublisher.WSGIPublisher, line 156, in transaction_pubevents
 Module ZPublisher.WSGIPublisher, line 338, in publish_module
 Module ZPublisher.WSGIPublisher, line 256, in publish
 Module ZPublisher.mapply, line 85, in mapply
 Module ZPublisher.WSGIPublisher, line 62, in call_object
 Module plone.rest.service, line 22, in __call__
 Module plone.restapi.services, line 21, in render
 Module plone.restapi.services.search.get, line 11, in reply
 Module plone.restapi.search.handler, line 86, in search
 Module plone.restapi.serializer.catalog, line 38, in __call__
 Module plone.restapi.serializer.dxcontent, line 83, in __call__
 Module plone.restapi.serializer.dxfields, line 86, in __call__
 Module plone.restapi.imaging, line 26, in get_scales
 Module plone.restapi.imaging, line 112, in get_scale_infos
 Module plone.restapi.imaging, line 108, in split_scale_info

ValueError: too many values to unpack

You're doing it the correct way. There is some error with the image scales, maybe because of the News Item configuration (behaviors). If you try the request with some other content types it should work.

Also check the version of plone.restapi. There are always updates and bugfixes.

It looks like the image cropping behaviour is causing this ( plone.app.imagecropping) . (plone.app.imagecropping was a requirement in the theme's setup.py )

Please file an issue with some details at the plone.app.imagecropping tracker.

OK, I will when I am sure ( I am doing this from a Flutter app, so I need to check that it is not 'something in the app').

Ok. Now I am sure it is image cropping: Imagecropping breaks resapi search (full objects) · Issue #104 · collective/plone.app.imagecropping · GitHub

I have not managed to test much more, since I need to set up a certificate for some test site first

UPDATE: It turns out that installing image cropping breaks 'the item itself' also:

The following code works:

final http.Response myItem = await http.get(
  '${mID}',
  headers: <String, String>{
    'Authorization': 'Bearer ${mToken}',
    'Accept': 'application/json,',
    'Content-Type': 'application/json'
  },
);

But if the content item has an image, you get the 'too many values to unpack' error