Problem/Motivation

Metatags reach a response two ways. The envelope of a page carries the tags of the request, collected from every service tagged as a provider; the contract those providers implement takes no entity, because there is exactly one page being answered. A fragment is different: a listing of thirty cards renders thirty entities, and the tags of the page they are listed on say nothing about any of them. Today the shape that renders metatags into a fragment can therefore only serve one source - a field of the bundle - and answers with no key for the rest.

Proposed resolution

  • An entity-oriented method on the provider contract, so a provider can be asked for the metatags of a given entity rather than of the current request.
  • A default that keeps every existing provider working: a provider that cannot answer about an arbitrary entity says so, and the fragment has no metatags key - the same answer as today.
  • The metatags shape asks the providers for the sources the conventions role names, once they can be asked.
  • A change record, because the contract is marked @api and is implemented outside this module.

Remaining tasks

Everything.

Issue fork myrest-3623253

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed 89439195 on 1.0.x
    Issue #3623253: Let a metatag provider answer about an entity, not only...
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)