What happened?
Description
If you open preview mode on an entry that has no changes, the token is not in the URLs of links in the preview mode, but the x-craft-live-preview token is.
If you use {% cache %} in your templates, this part will be cached with the x-craft-live-preview added to all links in the cached part of code.
The reason that it's cached, is probably because there is no token:
|
if ($request->getHadToken()) { |
This way, you will end up with x-craft-live-preview tokens in the Google index (and that's precisely what is happened now)
Steps to reproduce
- See above
Expected behavior
No x-craft-live-preview-URLs on a production website
Actual behavior
Craft CMS version
5.3.4
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
What happened?
Description
If you open preview mode on an entry that has no changes, the token is not in the URLs of links in the preview mode, but the x-craft-live-preview token is.
If you use
{% cache %}in your templates, this part will be cached with thex-craft-live-previewadded to all links in the cached part of code.The reason that it's cached, is probably because there is no token:
cms/src/services/TemplateCaches.php
Line 371 in 4439082
This way, you will end up with
x-craft-live-previewtokens in the Google index (and that's precisely what is happened now)Steps to reproduce
Expected behavior
No x-craft-live-preview-URLs on a production website
Actual behavior
Craft CMS version
5.3.4
PHP version
8.3
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions