When using REST services (in core), if you populate the metatags with specific values these will get served by Drupal (serialized). However, if you leave the default ones, Drupal won't serve them at all, so the API output is not accurate.

CommentFileSizeAuthor
#2 metatag-n2857544-2.patch742 bytesfjgarlin

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

StatusFileSize
new742 bytes

This patch solves the problem as it adds a case for the rest route pattern and therefore it can compute the metatags correctly.

fjgarlin’s picture

Status: Active » Needs review
damienmckenna’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Thanks for the patch, that's a particularly interesting bug. I'll see if I can get some time to write some tests for this, to confirm the expected output.

damienmckenna’s picture

I'm also inclined to start with #2853515: Add default handling to metatag manager and see what's needed after that.

  • DamienMcKenna committed 686f362 on 8.x-1.x authored by fjgarlin
    Issue #2857544 by fjgarlin: Default values not returned on REST default...
damienmckenna’s picture

I've committed this as-is with a placeholder tests file, we'll do tests later.

damienmckenna’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.