@trevor Looks like @baris fixed this up in the latest version.
Incorrect title for guest users
-
Hi,
Since the latest update, guest users will get an incorrect tab title on the 1st load of a page.
The tab title doesn't reflect the page content. (Not terrible since it corrects itself at the 1st navigation, but still strange).
This seems to be connected to this pull request.@baris was this an intentional side effect?
-
Can you reproduce on this forum? The PR could be related since we started caching the header for guests but each page's header is cached separately so it shouldn't be a problem.
-
@baris said in Incorrect title for guest users:
Can you reproduce on this forum?
Yes. (Just right click any link to a post and open in incognito)
but each page's header is cached separately
The code doesn't seem to agree with that statement...
It would seem that the cache key is based only on {template, language, method}. -
Yeah you are right, cache is for each template so in this case topic.tpl is cached for each language but since each topic has a different title the first one that gets cached is being displayed for other topic pages. Looks like might have to remove this cache, topic title isn't the only wrong value. bodyClass and meta tags are wrong as well.
-
Made some fixes in https://github.com/NodeBB/NodeBB/commit/2e446392109458523f7580d3d63dc0d9b4402c31.
Change the cache key to use the path instead of the template name.
-
Thanks @baris, that seems to have fixed it on this forum.
(Is this forum always running on master?) -
@yzahn Usually we keep it on master to test everything before it gets released.