Closed sam452 closed 4 months ago
Since my Drupal install is different than the public cms-dev.contentacms.io I'm attempting to contrast the jsonapi output of one of its recipes and one from my local contenta to see what difference in its data.relationship.image and mine. I don't see anything substantively different between the two. Of course, my contenta seems to have a different set of recipe entities, but the structure should be the same. I've cloned this project to check its config files for the field.storage.media.field_image.yml in the GitHub project which seems to be the closest config available and it seems to match my equivalent. I gather from viewing the api/recipe in jsonapi_extras that "image" is an alias for field_image. If that's so the include params are working from image, category, tags and then image.field_image which my Angular reports as broken. As well as image.imageFile is reporting broken in my Contenta install. What should I do in my Contenta install for these relationships?
I have installed contenta onto my local and cloned the contentaangular project. The Angular project points to https://cms.contentacms.io/api and the recipes page lists all content including images. However, when I point the local Angular app to my local install of contenta I get no CMS content and the console in Chrome says
image.field_image
is not a valid include path.field_image
is not a valid relationship field name._ That suggests that there is something broken in my Drupal install. Since I do not have credentials to the Drupal app at cms.contentacms.io I have to probe my local install and determine what might be breaking without any other successful app to contrast my install. Using these requests I find that these return results, though they may not be what is needed in the Angular app.ttp://contenta0.biz/api/recipes?page%5Blimit%5D=6&include=image%2Ccategory%2Ctags%2Cimage.field_image%2Cimage.imageFile returns error above.
ttp://contenta0.biz/api/recipes?page%5Blimit%5D=6&include=image%2Ccategory%2Ctags%2Cimage.imageFile returns Argument 3 passed to Drupal\jsonapi\JsonApiResource\Link::__construct() must be of the type string, array given
Removing both returns the expected six recipes and an include for the images. http://contenta0.biz/api/recipes?page[limit]=6&include=image,category,tags
The Drupal app has these modules enabled. jsonapi_boot 2.01 jsonapi_defaults 8.x-3.17 jsonapi 9.1.4 jsonapi_extras 8.x.3.17
Please point me to info that can help me remove this block, thx, sam