Skip to content

Conversation

@AiraNadih
Copy link
Contributor

@AiraNadih AiraNadih commented Apr 15, 2025

Have you followed these guidelines?


Problem

I noticed a behavioral inconsistency between the UI and API when working with entries:

When fetching content via the API endpoint, the response was returning raw entry content without:

  1. Updating the entry title and content (which happens in the UI flow)
  2. Rewriting document URLs with relative proxy URLs

This inconsistency creates different behaviors depending on whether users interact through the UI or API.

Solution

This PR aligns the API behavior with the UI by:

  • Adding a call to UpdateEntryTitleAndContent() when fetching content via API
  • Using mediaproxy.RewriteDocumentWithRelativeProxyURL() to ensure consistent URL handling

These changes ensure that both the API and UI provide the same functionality and data format when fetching entry content.

Related Behavior

This fix is similar to an issue I noticed previously: when modifying a feed through the web form (e.g., disabling it), the parsing error count and error message are reset. However, this reset doesn't occur when modifying via API. This PR addresses a similar type of UI/API inconsistency.

Copy link
Member

@fguillot fguillot left a comment

Choose a reason for hiding this comment

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

Updating the entry title and content is considered a breaking change, as it alters the API contract. Previously, this endpoint was read-only, so users will experience different behavior after upgrading Miniflux.

I recommend gating this change behind a feature flag (query-string parameter) or introducing a new endpoint to preserve backward compatibility.

@fguillot fguillot merged commit 6b70a7d into miniflux:main Apr 17, 2025
9 checks passed
@AiraNadih AiraNadih deleted the fix_consistency branch May 11, 2025 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants