Dave Reid pointed out that the work that's being done in the ampNodeViewController can be done in amp_entity_view_alter instead. This allows us to remove this class as well as the route definition. That's good, because all nodes were being passed through that controller instead of the default node controller, which feels weird.

Yay for hooks!

Comments

mdrummond created an issue. See original summary.

rainbowarray’s picture

StatusFileSize
new8.47 KB

For posterity, here is the first version of this patch, which does not work because you cannot change cache keys in an alter hook.

Filed #2688585: Create cache context service for AMP library warnings config as a follow-up to address this.

dave reid’s picture

Does that seem like a limitation that we cannot alter caching keys in an alter hook? *say Wim Leers three times while spinning around*

rainbowarray’s picture

StatusFileSize
new9.27 KB
new3.45 KB

On the good side, no longer getting horrid errors about not being able to change cache keys. (You can change cache contexts I think, but not cache keys.)

On the bad side, the preRenderAmpText seems to no longer work for ampProcessedText, which means only the full html pass of the library is working, and I have no idea why. So I guess the part about the module fundamentally no longer working is kind of not great.

rainbowarray’s picture

StatusFileSize
new9.74 KB
new1.91 KB

Turns out, need to use entity_view_mode_alter not entity_view_alter to change the view mode. I misread Dave's notes on this.

The bad side is that the cache context for warnfix does not seem to be working. If warnfix is in the query parameter and warnings show up, that gets cached, and shows up even when warnfix is not in the query parameter. Or vice versa if it's not present initially, then if you add it later no warning show up. No idea why. The cache context for the amp query parameter seems to work okay.

rainbowarray’s picture

Assigned: rainbowarray » Unassigned
Status: Active » Needs review
StatusFileSize
new9.97 KB
new1.94 KB

This sets a cache tag for the config of the library warnings.

However, none of the cache tags or contexts seems to result in proper variations of the cache, even though I can verify they bubble up properly. Definitely could use help debugging this. Otherwise, we can't get this in, and this would be a nice improvement.

dsayswhat’s picture

Issue tags: +1.0 blocker
mtift’s picture

It seems like this issue should be blocked on #2688585: Create cache context service for AMP library warnings config. If we can't figure out that one, it makes me wonder if this should go in.

mtift’s picture

Status: Needs review » Needs work
berdir’s picture

  1. +++ b/amp.module
    @@ -34,17 +37,46 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +
    +    if ($build['#view_mode'] == 'amp') {
    +      // Otherwise adding 'amp' query parameter in URL will have no effect.
    +      $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.query_args:amp']);
    +      // Otherwise adding 'warnfix' query parameter in URL will have no effect.
    +      $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.query_args:warnfix']);
    +      // Otherwise changing 'amp_library_warnings_display' will have no effect.
    +      $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], ['config:amp.settings.amp_library_warnings_display']);
    +    }
    

    You should move at least the amp context out of this check. Then it applies all the time and should solve your problems.

  2. +++ b/src/Element/AmpAnalytics.php
    @@ -36,6 +36,9 @@ class AmpAnalytics extends RenderElement {
           ),
           '#theme' => 'amp_analytics',
    +      '#cache' => [
    +        'contexts' => ['url.query_args:amp']
    +      ]
    

    The used theme is a default cache context, so not sure what this would do additionally?

  3. +++ b/src/Element/AmpAnalytics.php
    @@ -36,6 +36,9 @@ class AmpAnalytics extends RenderElement {
    diff --git a/src/Element/AmpIframe.php b/src/Element/AmpIframe.php
    
    diff --git a/src/Element/AmpIframe.php b/src/Element/AmpIframe.php
    index 8838d66..3aa704f 100644
    
    index 8838d66..3aa704f 100644
    --- a/src/Element/AmpIframe.php
    
    --- a/src/Element/AmpIframe.php
    +++ b/src/Element/AmpIframe.php
    
    +++ b/src/Element/AmpIframe.php
    +++ b/src/Element/AmpIframe.php
    @@ -43,6 +43,10 @@ class AmpIframe extends ProcessedText {
    
    @@ -43,6 +43,10 @@ class AmpIframe extends ProcessedText {
             array($class, 'preRenderAmpIframe'),
           ),
           '#theme' => 'amp_iframe',
    +      '#cache' => [
    +        'contexts' => ['url.query_args:amp', 'url.query_args:warnfix'],
    
    +++ b/src/Element/AmpProcessedText.php
    @@ -33,10 +35,8 @@ class AmpProcessedText extends ProcessedText {
    +        'tags' => ['amp.settings.amp_library_warnings_display']
    

    I assume you mean the config? Should be config:amp.settings.

berdir’s picture

Priority: Normal » Major
tduong’s picture

Status: Needs work » Needs review
StatusFileSize
new3.16 KB
new9.56 KB

Fixed points 1. and 3. mentioned in comment #10 and removed unused import files.

berdir’s picture

+++ b/amp.module
@@ -64,19 +58,18 @@
     if ($build['#view_mode'] == 'amp') {
-      // Otherwise adding 'amp' query parameter in URL will have no effect.
-      $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.query_args:amp']);
       // Otherwise adding 'warnfix' query parameter in URL will have no effect.
       $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.query_args:warnfix']);
       // Otherwise changing 'amp_library_warnings_display' will have no effect.
-      $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], ['config:amp.settings.amp_library_warnings_display']);
+      $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], ['config:amp.settings']);
     }

Lets move both cache contexts out, then you can also put them in the same line/array. That will result in fewer cache redirect writes once amp is accessed and the cost of another query args context is pretty small.

tduong’s picture

StatusFileSize
new1.05 KB
new9.4 KB

Merged these cache contexts. Left that #10.2 there, will be discussed later.

berdir’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/amp.module
@@ -34,14 +31,40 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
+    // Otherwise adding 'amp' and 'warnfix' query parameters in URL will have no effect.
+    $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.query_args:amp', 'url.query_args:warnfix']);
+    if ($build['#view_mode'] == 'amp') {
+      // Otherwise changing 'amp_library_warnings_display' will have no effect.
+      $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], ['config:amp.settings']);
+    }

We weren't able to reproduce any caching problems here, likely because theme is an enforced cache context, so the different theme enforces that every cache is different for amp pages anyway.

If you do have a way to reproduce a problem, pleas provide steps to do so.

As mentioned above, I don't really understand how the added cache tags and contexts are related to this issue, but other than that, this looks good to me.

rainbowarray’s picture

Status: Reviewed & tested by the community » Needs work

Still having issues with caching.

To duplicate.

  • Go to a page with an amp-enabled content type, placing ?amp at the end of the URL to see the AMP version of the page. All should look well. Yay!
  • Now change the query string to ?amp&warnfix and reload. This should show a bunch of warning messages at the bottom of the page, but that does not happen because the body content has been cached, presumably.
  • drush cr
  • Try the reverse. Make sure the query string is ?amp&warnfix and reload. Voila! Warning messages at the bottom of the page.
  • Now switch the query string to ?amp and reload. Warning messages still appear at the bottom of the screen, when they should not. Boo.

On the config page if you check the box for Debugging: Show AMP Library warnings in all AMP text formatters for all users that does vary properly. If you turn that setting on and off, warnings appear and disappear properly without getting stuck in cache. The same should be true for the warnfix query string, but that is not happening.

rainbowarray’s picture

StatusFileSize
new9.42 KB
new2.61 KB

Tweaked this a bit, but still having trouble with caching.

Since the cache already varies by theme, we do not need to vary by url.query_args:amp.

I switched the config context to config:amp_settings.amp_library_warnings_display. Otherwise we end up varying the context every time any setting gets changed, when all we really care about is that library warnings display.

I have verified url.query_args:warnfix is bubbling up to the browser cache contexts. But clearly the cache isn't actually varying by that. Not sure why that isn't working.

berdir’s picture

  1. +++ b/amp.module
    @@ -59,10 +59,10 @@ function amp_entity_view_alter(array &$build, EntityInterface $entity, EntityVie
         // Otherwise adding 'amp' and 'warnfix' query parameters in URL will have no effect.
    -    $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.query_args:amp', 'url.query_args:warnfix']);
    +    $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.query_args:warnfix']);
         if ($build['#view_mode'] == 'amp') {
    

    Despite it being covered by the theme, I think it might still be useful to keep the amp cache context.

  2. +++ b/amp.module
    @@ -59,10 +59,10 @@ function amp_entity_view_alter(array &$build, EntityInterface $entity, EntityVie
    -      $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], ['config:amp.settings']);
    +      $build['#cache']['tags'] = Cache::mergeTags($build['#cache']['tags'], ['config:amp.settings.amp_library_warnings_display']);
    

    This is a cache *tag*, not a context.

    It doesn't vary, it invalidates. There is only one version, but when you save the config, it invalidates the relevant caches.

    Yes, it possibly invalidates too often, but your cache tag is made up. There are no per-setting cache tags, only per config. This doesn't work. You'd need your own custom cache tag invalidation for this and I think that's overkill.

    You don't change those settings on a daily basis. Once you're site is up, they're not going to change anymore.

As you said yourself, the warn thing seems to be something else. Maybe some part that actually adds those messages is not varied by the cache. I need to look into that more but I doubt it worked before and is broken by this conversion?

I tried to reach you a few times in IRC, please ping me so we can discuss this issue and the module in general.

rainbowarray’s picture

New wrinkle in the warnfix issue:

  • Go to a page with an amp-enabled content type, placing ?amp at the end of the URL to see the AMP version of the page. All should look well. Yay!
  • Now change the query string to ?amp&warnfix and reload. This should show a bunch of warning messages at the bottom of the page, but that does not happen because the body content has been cached, presumably.
  • Now paste that same url with ?amp&warnfix into a new browser. Warnings show up!!!
  • In that new browser, change the url to ?amp... warnings do not show up.

I do not understand what is going on. It seems like maybe browsers are caching regardless of the URL query parameters??? But if so then why does a drush cr get rid of the cache?

rainbowarray’s picture

StatusFileSize
new9.42 KB
new2.48 KB

This unwinds the changes in #17. I can no longer replicate the browser switching thing I saw in #19. If browser switching helped to solve this, then presumably clearing browser cache would allow this to work properly, but it does not. Using incognito windows also does not help. I am truly baffled by this bug.

berdir’s picture

The problem is simple enough. The query_args cache context doesn't support empty arguments, because it uses the value of it as the context. It varies by its value, not by its existence.

So the easiest way to make this works is to document to use &warnfix=1 or so and check on actually having a value. Otherwise you need your own cache context that checks on the existence of the query argument.

Also

* \Drupal\amp\Element\AmpProcessedText::getInfo() already specifies warnfix and that's where it is actually used. So there's no need to add it in the entity_view_alter()
* Also shows that the current amp cache context is equally meaningless, it just works because of the theme switch.

rainbowarray’s picture

Status: Needs work » Needs review
StatusFileSize
new15.47 KB
new6.55 KB

Got this working!

In a discussion earlier today, Sidharth pointed out that relying upon warnfix=1 could mean a new cache variation being created if warnfix=2, warnfix=3, or warnfix=30000 were also used. So as an extra precaution I went ahead and created a cache context service for both the warnfix and amp query parameters. I'm uncomfortable relying solely upon the implicit theme cache context. If that were to ever change in some way, it could break our caching. An explicit amp cache context seems like a safer way to cover that.

In my opinion, this is probably ready to go. Would not mind another pair of eyes on this before committing though.

Thanks for all the help, berdir and tduong. Feeling much better about this now.

berdir’s picture

+++ b/src/Cache/AmpUrlAmpCacheContext.php
@@ -0,0 +1,65 @@
+    if (isset($show_amp)) {
+      return 'url.amp:true';
+    }
+    else {
+      return 'url.amp:false';
+    }

you don't have to include the name of the context, that's done automatically (the cid looks something like [url.amp]=thevalue).

wim leers’s picture

Title: Remove ampNodeViewController in favor of amp_entity_view_alter » Remove ampNodeViewController in favor of amp_entity_view_alter()
Issue tags: +D8 cacheability
Related issues: +#2729439: QueryArgsCacheContext should return a special value for ?arg (without value)

Does that seem like a limitation that we cannot alter caching keys in an alter hook? *say Wim Leers three times while spinning around*

LOL :)


  1. +++ b/amp.module
    @@ -34,14 +31,36 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +function amp_entity_view_mode_alter(&$view_mode, EntityInterface $entity, $context) {
    +
    +  // Get the AMP Context service.
    

    Nit: unnecessary new line, and pointless comment.

  2. +++ b/amp.module
    @@ -34,14 +31,36 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +  if ($amp_context->isAmpRoute() && $view_mode == 'full') {
    

    Nit: use strict equality to avoid pain.

  3. +++ b/amp.module
    @@ -34,14 +31,36 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +  // Get the AMP Context service.
    

    Again pointless comment.

  4. +++ b/amp.module
    @@ -34,14 +31,36 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +  // Check if entity is a node with an enabled amp view mode.
    

    Nit: s/amp/AMP/

  5. +++ b/amp.module
    @@ -34,14 +31,36 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +    $build['#cache']['contexts'] = Cache::mergeContexts($build['#cache']['contexts'], ['url.amp']);
    

    Just do

    $build['#cache']['contexts'][] = 'url.amp';
    

    Deduplication is handled for you.

  6. +++ b/src/Cache/AmpUrlAmpCacheContext.php
    @@ -0,0 +1,65 @@
    +class AmpUrlAmpCacheContext extends ContainerAware implements CacheContextInterface {
    
    +++ b/src/Cache/AmpUrlWarnfixCacheContext.php
    @@ -0,0 +1,65 @@
    +class AmpUrlWarnfixCacheContext extends ContainerAware implements CacheContextInterface {
    

    Let's not do either of these, and wait for #2729439: QueryArgsCacheContext should return a special value for ?arg (without value) to land. It can land very soon. You can then make the AMP module require Drupal 8.1.2, and then you don't need to maintain any of this! :)

  7. +++ b/src/EntityTypeInfo.php
    @@ -54,20 +52,19 @@ class EntityTypeInfo {
    +      $configure = t('/admin/structure/types/manage/:bundle/display/amp?destination=/admin/config/content/amp', array(':bundle' => $bundle));
    +      $enable_disable = t('/admin/structure/types/manage/:bundle/display?destination=/admin/config/content/amp', array(':bundle' => $bundle));
    

    This looks … very very very very wrong.

  8. +++ b/src/EntityTypeInfo.php
    @@ -54,20 +52,19 @@ class EntityTypeInfo {
    +        $node_status_list[] = t(':label is <em>disabled</em>: <a href=":enable_disable">Enable AMP in Custom Display Settings</a>', array(
    

    This should use $this->t(), not t(). Do use StringTranslationTrait; and you're set.

rainbowarray’s picture

StatusFileSize
new13.47 KB
new5.61 KB

1. Fine.
2. Sure.
3. Service call not needed there as well. Removed.
4. Okay.
5. Changed. Thanks.
6. We can't wait until 8.2 lands, and we can't set up a dependency on a 8.1 patch version. These cache contexts also cover if somebody puts a value behind amp or warnfix, so I think they're fine for now. If and when the fix lands in 8.2, we can revisit this.
7. Glitch in making my patch. Reverted.
8. Fair point, but not really part of this issue. Could file a separate issue for that.

New patch with these fixes, as well as addressing #23.

Thanks much for the feedback!

rainbowarray’s picture

StatusFileSize
new13.47 KB
new681 bytes

Removal of unused use statements.

rainbowarray’s picture

StatusFileSize
new681 bytes
new13.41 KB

This actually does what #26 was supposed to do but didn't.

mtift’s picture

Nice work, @mdrummund. This looks good to me. Code makes sense. My local still works correctly on routes such as ?amp as well as ?amp&warnfix. +1 from me.

berdir’s picture

I agree with Wim that we should just let #272943: buddylist2 5.x-1.0-beta1 the bug with empty query args. Should be possible to get it into 8.1.2. That's quite some code that you can avoid then.

dave reid’s picture

  1. +++ b/amp.module
    @@ -34,22 +30,38 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +  // Get a list of available view modes for the current entity.
    +  $view_modes = \Drupal::service('entity_display.repository')->getViewModeOptionsByBundle('node', $entity->bundle());
     
    -  // Git a list of available view modes for the current entity.
    -  $view_modes = \Drupal::entityManager()->getViewModeOptionsByBundle('node', $entity->bundle());
    -
    +  // Check if entity is a node with an enabled AMP view mode.
       if ($entity->getEntityType()->id() == 'node' && isset($view_modes['amp'])) {
    

    This code should really be wrapped inside the if() statement, so that getViewModeOptionsByBundle() is not called for *every rendered entity*. Might want to take a look at the updated version of this hook in D7, I believe it checks if entity type == node and $build['#view_mode'] == full before doing any more logic.

    Arguably, this could be done in a separate issue.

  2. +++ b/amp.module
    @@ -34,22 +30,38 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    +    // Catches any variations based on 'amp' query parameter in URL.
    +    $build['#cache']['contexts'][] = 'url.amp';
    

    The new cache context should only be added if the view mode is full or amp only. Not for other view modes.

  3. +++ b/amp.module
    @@ -34,22 +30,38 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
    -        else if ($build['#view_mode'] == 'full') {
    +        else if ($build['#view_mode'] === 'full') {
    

    Coding standards should be "elseif"

  4. +++ b/src/Cache/AmpUrlAmpCacheContext.php
    @@ -0,0 +1,60 @@
    +    $show_amp = $this->requestStack->getCurrentRequest()->get('amp');
    +    return isset($show_amp);
    

    Could be simplified just by doing return (bool) $this->requestStack->getCurrentRequest()->get('amp') instead of having to assign a local variable just to return.

  5. +++ b/src/Cache/AmpUrlWarnfixCacheContext.php
    @@ -0,0 +1,60 @@
    +    $show_amp_library_warnings = $this->requestStack->getCurrentRequest()->get('warnfix');
    +    return isset($show_amp_library_warnings);
    

    Same here.

rainbowarray’s picture

I'm glad that #2729439: QueryArgsCacheContext should return a special value for ?arg (without value) would help fix this upstream in core. Maybe that gets into the next 8.1.x release, maybe not. Predictions that things will or will not get into core seem shaky to me.

Yes, we could wait until #2729439: QueryArgsCacheContext should return a special value for ?arg (without value) gets in and the 8.1.x version that contains it is released. In the meantime, the bugs this patch fixes (such as having double node titles on the page due the override of NodeViewController) are still a problem and need to be addressed.

We could commit this issue without the cache context services, but that introduces a caching bug with warnfix, and I'm not a fan of that either.

What I'd recommend is that we commit the patch in #27 now. After #2729439: QueryArgsCacheContext should return a special value for ?arg (without value) lands, we can consider removing the cache context services, which may no longer be necessary.

rainbowarray’s picture

StatusFileSize
new14.83 KB
new4.44 KB

This addresses all the points in #30.

wim leers’s picture

Status: Needs review » Needs work

I agree with Wim that we should just let #272943: buddylist2 5.x-1.0-beta1 the bug with empty query args. Should be possible to get it into 8.1.2. That's quite some code that you can avoid then.

Glad to hear I'm not alone.

If and when the fix lands in 8.2, we can revisit this.

Then let's at least have a follow-up issue and a @todo pointing to it, so this is not forgotten?


+++ b/amp.module
@@ -45,39 +45,40 @@ function amp_entity_view_mode_alter(&$view_mode, EntityInterface $entity, $conte
+    // Double-check that the AMP view mode is enabled for this content type.
+    if (isset($view_modes['amp'])) {

How can one enable AMP for a content type? Is this in the entity bundle's configuration's third-party settings? Or is it in some AMP configuration?

If it's the latter, you'll need to add a cache tag.

If it's the former, then this is fine.

wim leers’s picture

Oh, and mark these cache contexts as @deprecated, to prevent 3rd party code from using them, so they're safe to remove at any time.

tduong’s picture

+++ b/amp.module
@@ -34,38 +30,55 @@ function amp_help($route_name, RouteMatchInterface $route_match) {
+              $build['#attached']['html_head_link'][] = array(
+                array(
+                  'rel' => 'amphtml',
+                  'href' => $amp_href,
+                ),
+                TRUE,
+              );

And try to use the shortened array syntax according to the array standard coding whenever you provide a patch :)

rainbowarray’s picture

StatusFileSize
new16.79 KB
new7.46 KB

Updated patch with deprecation notices and array shortform.

#33: AMP is enabled for a content type by turning on the AMP view mode. So I don't think there's anything special that should require a cache tag.

rainbowarray’s picture

Status: Needs work » Needs review
mtift’s picture

Hmmm. Now I'm feeling a bit uncertain about this one. A patch that adds 4 @todo and 11 @deprecated makes me wonder if this is the correct approach.

rainbowarray’s picture

The todo notices and deprecation notices are there because of a gap in how cache contexts work with query strings that have empty arguments.

#2729439: QueryArgsCacheContext should return a special value for ?arg (without value) may end up fixing that gap. It just got knocked down from RTBC. So maybe it gets in now, maybe it gets in later. I think it's hard to plan anything around when a a particular patch might get into core.

We could:

A) Wait until #2729439: QueryArgsCacheContext should return a special value for ?arg (without value) goes in, whenever that might be, in order to make the overall fix in this patch. I don't particularly want to do that because the NodeViewController override is causing bugs right now, and I'd like us to fix that sooner rather than later.

B) Remove the caching fixes in this patch. When #2729439: QueryArgsCacheContext should return a special value for ?arg (without value) gets in (and is available in a 8.x.x release) then there will no longer be a caching bug. But until then, using &warnfix with caching turned on will seem very broken, and it won't be apparent as to why. We could recommend using &warnfix=1 instead, I suppose, but then change that recommendation after #2729439: QueryArgsCacheContext should return a special value for ?arg (without value) lands? That doesn't seem great either.

We have limited time, and there are other priorities that need attention as well. I'd like us to commit this so I can move on and focus on other matters.

wim leers’s picture

It's back to RTBC. :)

Hmmm. Now I'm feeling a bit uncertain about this one. A patch that adds 4 @todo and 11 @deprecated makes me wonder if this is the correct approach.

Well, it's not like any of that is major re-architecting. It's just @todos for removing code! :) Those are the best @todos! The @deprecated is just there to prevent anybody from relying on it. Alternatively, label it @internal, it has the same desired effect.

mtift’s picture

OK, I discussed this with @mdrummond, and given Wim's comment above, I'm feeling good about this (again). I say +1

rainbowarray’s picture

Yes, RTBC again. Yay!

So with that looking on track, I think we should commit the patch in #37 with the plan to address the deprecated code and todos in issue #2730295: Remove custom cache context services after QueryArgsCacheContext can handle arguments without values, require Drupal 8.1.2 after the core issue is fixed, and we feel confident about people being on an 8.x.x branch that includes that patch.

The reasons to fix this now rather than later:

  • We are currently overriding the NodeViewController. This has had unintended side effects like sometimes causing double node titles to appears, and preventing the edit tabs for showing up in amp view mode.
  • Thus, using entity_view_mode_alter for the view mode switching and entity_view_alter for a cache context addition, provides a better solution less likely to cause unintended consequences.
  • Putting in temporary caching fixes feels a little awkward, true, but that allows us to keep warnfix working until the core patch can handle this instead. Otherwise visiting ?amp on a site with caching on, and then later visiting ?amp&warnfix would not show any warnings. That could be pretty confusing.
  • While we could change the guidelines to use &warnfix=1 until the core patch lands, changing guidelines around several times could also be confusing.

Committing this now with the caching fix (which we will no longer need at some point) will allow us to address the underlying problems with our current method of switching view modes while also continuing to keep caching working well without needing to change guidance on how to use warnfix.

  • mdrummond committed 03a2bf8 on 8.x-1.x
    Issue #2688545 by mdrummond, tduong, Berdir, mtift, Wim Leers, Dave Reid...
dave reid’s picture

+1 for committing now.

rainbowarray’s picture

Status: Needs review » Fixed
wim leers’s picture

Great job here!

Community++

Status: Fixed » Closed (fixed)

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

mtift’s picture