Skip to content

fix(endpoint-micropub): reject unconfigured post type on update, delete and undelete - #929

Merged
paulrobertlloyd merged 1 commit into
mainfrom
fix/endpoint-micropub-post-path-guard
Sep 13, 2026
Merged

paulrobertlloyd merged 1 commit into
mainfrom
fix/endpoint-micropub-post-path-guard

Conversation

@rmdes

@rmdes rmdes commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Fixes #928.

  • getTypeConfig(postTypes, type) throws notImplemented when the type has no post.path; create(), update(), delete() and undelete() all use it, so the four actions answer 501 consistently.
  • Unit tests for the three previously unguarded actions; before the fix each fails with TypeError: Cannot read properties of undefined (reading 'post').

Touches the same file as #905 but different hunks.

Verified locally: node --test packages/endpoint-micropub/test/**/*.js 149/149, eslint and prettier clean.

…te and undelete

Only create() checked that the post type still has a configured path;
the other three actions crashed with a TypeError. Share the guard.

Fixes #928
@paulrobertlloyd
paulrobertlloyd merged commit 057a0ac into main Sep 13, 2026
1 check passed
@paulrobertlloyd paulrobertlloyd added the plugin-endpoint Endpoint plug-in label Sep 13, 2026
@paulrobertlloyd
paulrobertlloyd deleted the fix/endpoint-micropub-post-path-guard branch September 13, 2026 23:46
@paulrobertlloyd paulrobertlloyd added this to the v1.0 milestone Sep 13, 2026
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.

Updating, deleting or undeleting a post whose post type is no longer configured throws a TypeError

2 participants