-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Not compatible with the Umbraco Content Delivery API #96
Comments
I have not used the delivery API yet. Did the code you provided work? Would you be able to provide a PR and I'll test when I get a chance, I'm currently in the process of moving house so I'm not sure when that will be. |
Hi Aaron,
The code I provided is working for us, yes. I would be willing to provide a
PR. Thank you for asking me to do so!
Warmly,
Jessica
|
@AaronSadlerUK Apologies that it's taken me so long to get around to working on this. I just started working on this today and I am bumping into numerous issues. I'm not sure how to handle the fact that the Content Delivery API only exists on v12 and up. Do you have any guidance or would you ever want to get on a video chat to work this out together? Update: I'm going to try some preprocessor directives to target .NET8 for different code and see what happens. |
Which exact Umbraco version are you using? For example: 8.7.0 - don't just write v8 or v9
13.5.2
Bug summary
Your implementation of PropertyValueConverterBase doesn't also implement IDeliveryApiPropertyValueConverter. I had to deregister yours in a composer and register a custom one.
Therefore UmbNav out of the box is incompatible with the Umbraco Content Delivery API.
Specifics
The value converter I used after I deregistered yours (I could have just extended yours if we used Serilogger but we don't so this made more sense for us):
Steps to reproduce
Set up the umbraco content delivery api
Create a Doc Type that uses navigation
Create content using that doc type
Try to return that content via the content delivery api
Expected result / actual result
I expected to receive usable content
What I got instead was an alternating experience between a 500 error and content stuck in a recursive loop (the json ignore attribute on content in class UmbNavItem is not recognized by the content delivery api because your class,
UmbNavValueConverter
only extendsPropertyValueConverterBase
but does not also implementIDeliveryApiPropertyValueConverter
)I do not know why sometimes I got the 500 error and sometimes I got the content stuck in a recursive loop but here's an example of one of the times I got content:
There's no end to this because it was stuck in a recursive loop
The text was updated successfully, but these errors were encountered: