Skip to content

fix(endpoint-posts): use correct template variable for syndicate form source_url - #876

Merged
paulrobertlloyd merged 1 commit into
mainfrom
fix/syndicator-button-url
Aug 16, 2026
Merged

paulrobertlloyd merged 1 commit into
mainfrom
fix/syndicator-button-url

Conversation

@paulrobertlloyd

Copy link
Copy Markdown
Collaborator

Re-submitting an original fix by @rmdes included as part of #828.

The syndicate form button was using data.url for the source_url value, but data is never set in the template context. The post controller and middleware set properties (via response.locals.properties), not data.

This caused the syndicate form to submit with an undefined source_url, which made the syndicate endpoint fall back to finding "the most recently published post awaiting syndication" instead of syndicating the post the user was actually viewing.

The fix changes data.url to properties.url to correctly reference the post URL from the template context.

… source_url

The syndicate form button was using `data.url` for the source_url value,
but `data` is never set in the template context. The post controller and
middleware set `properties` (via response.locals.properties), not `data`.

This caused the syndicate form to submit with an undefined source_url,
which made the syndicate endpoint fall back to finding "the most recently
published post awaiting syndication" instead of syndicating the post
the user was actually viewing.

The fix changes `data.url` to `properties.url` to correctly reference
the post URL from the template context.
@paulrobertlloyd paulrobertlloyd added the plugin-endpoint Endpoint plug-in label Aug 16, 2026
@paulrobertlloyd
paulrobertlloyd merged commit afea6f0 into main Aug 16, 2026
1 check failed
@paulrobertlloyd
paulrobertlloyd deleted the fix/syndicator-button-url branch August 16, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin-endpoint Endpoint plug-in

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant