SAP-samples/cloud-cap-samples

Wrong resource paths, no creation of new "Products"

alteraugem opened this issue · 11 comments

cloud-cap-samples/packages/officesupplies/db/csv/sap.capire.officesupplies-Products.csv (Branch openSAP-week3-unit2

1.) The paths to the images in officesupplies/db/csv/sap.capire.officesupplies-Products.csv point to an SAP internal location. They can't be reached from external.
2.) The Fiori "Create" doesn't work. A create of a new product results in an empty line and a subsequent error, that the task can not be completed due to backend problems.

chgeo commented

@harinigunabalan can you check the image URLs?

For the second question it would be good to know what the error on the server side was. Check the console where you started the application.

@chgeo Nothing in the backend, only the frontend says "Navigation is currently not possible because there are still entries that are not yet synchronized to the backend"

Are you running with cds run? Try using cds watch

(the message "Navigation is currently not possible because there are still entries that are not yet synchronized to the backend" seems caused by the missing database connection, running with --inmemory solves)

@harinigunabalan can you check the image URLs? - Fixed the images with external URLs.

chgeo commented

@harinigunabalan is this fixed?

I checked this once more but still the app doesn't display the images correctly due to CORB (Chrome v81)

@alteraugem and @chgeo - I fixed the image paths to reuse them from the app folder. Can you check it out now?

okay, it works. Thank you.

Pictures now do display correctly. However, just recognized that the "odata.draft.enabled" annotation is missing. This is why creation of new products fails!

chgeo commented

@harinigunabalan can you check on the draft annotation?

@alteraugem - Thanks for the feedback. This is a snapshot of the code at the beginning of the unit and the idea is that the participants learn about the odata.draft.enabled annotation in the unit and add it by themselves. Hope this clarifies things for you.