New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid links to expired articles #508
Conversation
Great stuff, thanks. I like the optimisations in makss@96ded57. Much cleaner. Couple of things to note about makss@9c901bf:
But on the whole I think this patch is a step in the right direction, so if you could fix these issues and check the warning isn't thrown in places where it's not wanted, I'm happy to merge it in. Oh, and btw, PSR-2 prefers spaces around operators such as |
You are right, a warning is necessary only on Public side. Thank you for the hint of gTxt(). |
Avoid links to expired articles. Thanks, makss
I think we already had the proper solution regarding our reply to requests for expired articles. We sent a '410 Gone' response code in conformance with RFC7231. Switching from a real URL to the fake fragment marker |
Referring to expired articles - this is a mistake web developer. This patch provides a warning about such links and makes the lesser of all evils - refers to the root of the site with a marker It would be possible to add |
This is an assumption that only applies to analytics with client-side sensors (e.g. Google Analytics). The fragment identifier is not sent to the server. It is therefore not visible in the server's access logs, the Textpattern log panel, and the like. |
I will not object to the removal of the marker |
Discussion: http://forum.textpattern.com/viewtopic.php?id=46062
site_url/#expired_article
permlink_to_expired_article
ifproduction_status != 'live'
&&txpinterface == 'public'