Skip to content

v1.5.1 — node URL alias persistence (DEV-116)

Choose a tag to compare

@jmcerda jmcerda released this 29 Jun 20:32
4057e4f

Fix (DEV-116, High): node URL aliases set via the connector now actually persist.

drupal_update_node with fields.path = { alias, pathauto: 0 } returned success but silently reverted (causing nav 404s). Root cause: JSON:API deserialized the path field without the existing alias's pid, so Drupal created a duplicate path_alias (the older one stayed canonical) instead of updating in place.

  • The connector now reads the current alias's pid (new backend.getPathInfo) and round-trips it, so the alias is updated in place — one canonical alias, no duplicate. The DEV-114 path-omitted "preserve" had the same defect and is fixed too.
  • Honest responses: create/update re-read the node and return the persisted url.
  • Rename redirect: an explicit alias that replaces a different one also creates a 301 from the old path to entity:node/<id> (idempotent).

Verified end-to-end over JSON:API on Drupal 11. 397 tests pass; lint clean.

Connector-created nodes without an explicit path rely on Pathauto; a separate server-side Pathauto pattern misconfiguration (some bundles stored as a sequential array instead of the associative map the entity_bundle condition needs) blocks generation for some bundles and is fixed in the Drupal site (webcms), not the connector.

Published to npm as drupal-mcp-connector@1.5.1. Full notes in CHANGELOG.md.