Problem/Motivation
Per Access checking must be explicitly specified on content entity queries, ::accessCheck() needs to be explicitly called on content entity queries in Drupal 10. There are two places in metatag_open_graph_update_8101() where it is missing. (Granted, it seems very unlikely that many users will not have run this update hook before updating to Drupal 10 in order to hit this error.)
Steps to reproduce
Proposed resolution
Add access checks so queries look like:
// We found a metatag field, so query for all the entities of this
// type that have "article_tags" in the serialized array.
$q = \Drupal::entityQuery($entity_type);
$q->accessCheck(FALSE);
$q->condition($field_name, "article_tags", "CONTAINS");
$count = $q->count()->execute();
and
$q = \Drupal::entityQuery($entity_type);
$q->accessCheck(FALSE);
$q->condition($field_name, "article_tags", "CONTAINS");
$q->condition($id_col, $last, ">");
$q->sort($id_col);
$q->pager(20);
$res = $q->execute();
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork metatag-3351181
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
Comment #3
godotislateComment #4
godotislateComment #5
damienmckennaThanks for spotting that and for providing the merge request.
Comment #7
damienmckennaCommitted. Thank you.