Skip to content

V13: Incorrectly parsing item id by DeliveryApiContentIndex caused incorrect information when deleting a content item#15848

Merged
kjac merged 1 commit intov13/devfrom
v13/bugfix/parse-item-id-correctly
Mar 8, 2024
Merged

V13: Incorrectly parsing item id by DeliveryApiContentIndex caused incorrect information when deleting a content item#15848
kjac merged 1 commit intov13/devfrom
v13/bugfix/parse-item-id-correctly

Conversation

@elit0451
Copy link
Contributor

@elit0451 elit0451 commented Mar 6, 2024

Details

Fixes #15792

  • As a result of the new V13: Delivery API composite id handler #15305, we didn't parse a noncomposite id correctly, so we returned an empty string instead of null, resulting in Lucene error (seen in the logs):
    Err
    • Which on its hand caused incorrect data in DeliveryApiContentIndex when a content item has been deleted.
  • This PR fixes that and makes sure we follow the practice: int.ToString(CultureInfo.InvariantCulture) when converting ints to strings.

Test

  • Follow the Steps to reproduce in the original issue
    • Make sure that the total amount of items and the number of items in the items collection is correct after deleting a content item (both variant and invariant) and making a GET request to
      /umbraco/delivery/api/v2/content

Copy link
Contributor

@kjac kjac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff ❤️

@biapar
Copy link

biapar commented Aug 16, 2024

Hi. Which Umbraco version contain this fix?

@kjac
Copy link
Contributor

kjac commented Aug 19, 2024

Hi @biapar ... this is in 13.3 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants