-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
image.field_image is not needed anymore - and no images #3
Comments
@ehausen Thanks for the issue! I'm not sure what the issue is, I haven't worked in Ionic or Contenta in a long time. I'm looking at the closest project to this, contenta_angular, and it looks like they also reference Maybe something in Contenta changed really recently? |
Well the comment mentions when JSON API bug is fixed, so I guess that is that for the field_image. I was just wondering did image.imageFile have the url sometime before, because now it's not there. But I guess that is the case and contenta default demo install possibly changed their data structure? |
Maybe I could tag in @e0ipso for help here - are you aware of anything that's changed in the demo that would cause recipe images to stop working in the Ionic (and possibly Angular) demos? I was using the |
Yes some changes happened since then. I'm fuzzy about whether or not the deployed version (frozen in the past) had those changes pushed or not. |
I'm able to get the file url with a separate request, but doesn't seem right I would need to query tha api once per image. Or am I supposed to do somekind of aggregates request to get the image URLs.. Just trying to learn the Contenta / Drupal-as-API-backend best practices. Would also be good to get demos working because they represent the state of the project for newcomers. :) |
in home.html So I was able to dig out the file url from imageFile.uri.url Feels a bit awkward. How this should be done? |
If that's the only nesting level in the JSON API response that lets you get to the URL, I guess that's the right way to do it. It does look weird though. |
Would @e0ipso know if this looks correct, or is the right way to use Contenta? Of course putting site base URL in a variable would be more elegant |
It looks correct to me. |
I just installed new local Contenta install and this repo and run both. Got error when loading the app.
Checking the network tab I found out that apparently
image.field_image
is not correct.in home.ts I saw the comment
// @todo Remove image.field_image when JSON API bug is fixed.
and removed
image.field_image
from the line below so that it now is:include: 'image,category,tags,image.imageFile'
The error went away, but now there is no images.
looking at the home.html image URL should come from
{{ recipe.image.imageFile.url }}
but no url field is returned, in my recent Contenta install.How to fix this? Not familiar with Drupal as a api backend yet, even if Drupal is quite familiar.
The text was updated successfully, but these errors were encountered: