- Issue created by @auth
- Status changed to Needs review
over 1 year ago 5:27am 5 June 2023 - last update
over 1 year ago 50 pass, 1 fail The last submitted patch, 3: google_tag-3364758-3-cachetags-improvements.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
over 1 year ago 54 pass - πΈπͺSweden auth
Added google_tag-config cachetag to expected tags in tests.
- Status changed to Needs work
over 1 year ago 4:07pm 29 June 2023 - πΊπΈUnited States mglaman WI, USA
So I see where this patch is going, by including the cacheable metadata of conditions. But I'm concerned with the overall approach. The first bug is the fact we don't ensure the
getListCacheTags
are always applied, so that saving config entities invalidates tags.The problem around cache contexts for conditions needs additional validation. I don't like adding the cacheable metadata onto the resolver service directly.
-
+++ b/google_tag.module @@ -98,11 +99,13 @@ function google_tag_page_attachments(array &$attachments) { - $cacheable_metadata = new CacheableMetadata(); - $cacheable_metadata->addCacheTags($config->getEntityType()->getListCacheTags());
The problem is that we don't apply the list cache tag. We should just always do this. That cache tag is invalidated whenever an entity of that type is saved.
-
- First commit to issue fork.
- Open on Drupal.org βCore: 10.1.x + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Not currently mergeable. - @japerry opened merge request.
- πΊπΈUnited States japerry KVUO
Per mglaman's suggestions above, opened a MR to approach the issue a little bit differently. Also changed the tests to hardcode the result, since the insertions weren't strict. (Basically you could make changes to cache tags and the tests would keep passing.. oops.)
- last update
over 1 year ago 54 pass - Status changed to Needs review
over 1 year ago 9:01pm 29 June 2023 - last update
over 1 year ago Patch Failed to Apply - last update
over 1 year ago 54 pass - last update
over 1 year ago 54 pass - πΊπΈUnited States mglaman WI, USA
Found a big gap in test coverage with \Drupal\Tests\google_tag\Kernel\PageAttachmentsHookTest::testNoEmbedOnNoConfig. It wasn't verifying cacheable metadata when there were no configs. Addressed that in https://git.drupalcode.org/project/google_tag/-/merge_requests/50/diffs?...
- last update
over 1 year ago 54 pass -
mglaman β
committed 46208256 on 2.0.x authored by
japerry β
Issue #3364758 by japerry, auth, mglaman: Cachetags improvements
-
mglaman β
committed 46208256 on 2.0.x authored by
japerry β
- Status changed to Fixed
over 1 year ago 4:16pm 5 July 2023 - πΊπΈUnited States mglaman WI, USA
Merged, we'll have a release this week.
Automatically closed - issue fixed for 2 weeks with no activity.