Problem

Deleting a content tag from the vocabulary will not change the filters that are available on the overview and search pages. A cache clear is required for this to be resolved.

The suspicion is that this is caused by the SocialTaggingOverride which is responsible for the fields added but provides an empty CacheableMetadata object causing it to be cached endlessly.

The view on a node seems to go well by accident because a term is deleted from a node when the term itself is removed. This invalidates the cache for the node and the SocialTagsBlock has cache tags for a specific node. The same seems to be the case for a group at quick glance.

Proposed solution

Ensure that for the configs that the class overrides the correct cache contexts and tags are applied so that the configuration override invalidates when the taxonomy terms change.

Note

It was not yet tested but it's also possible that the issue is in social_tagging_form_views_exposed_form_alter which lacks similar cacheability metadata.

Follow-up

It should be checked if social_tagging_form_alter suffers from similar problems.

Comments

Kingdutch created an issue. See original summary.

kingdutch’s picture

This could've also caused the related issue. Alternatively the related issue may possibly be closed because we no longer have features.

kingdutch’s picture

Status: Active » Needs work

Draft PR is here: https://github.com/goalgorilla/open_social/pull/1875

This still needs a test that demonstrates the bug and shows that the changes fix it. This helps avoid regression in the future.

The form that's altered in social_tagging_form_alter also needs testing to see if caching metadata is needed on a form.

kingdutch’s picture

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

Unfortunately we can not yet control caching well enough in our current tests to reliably test this. Setting up PHPUnit also does not fit in the time constraints we have for getting this bug out of the door so we've decided to accept this bugfix without test for now.

ronaldtebrake’s picture

Status: Needs review » Fixed

  • Kingdutch committed 82b61c9 on 8.x-9.x
    Issue #3150640 by Kingdutch: Content tagging filters on search and...
  • ronaldtebrake authored 99dcfaf on 8.x-9.x
    Merge pull request #1875 from goalgorilla/bugfix/3150640-content-tagging...

Status: Fixed » Closed (fixed)

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