Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2019-03-29 14:40:06

keukenkikker
Member
From: Netherlands
Registered: 2006-08-08
Posts: 79
Website

Re: Outdated page after article publication

In the meantime I’ve been disabling plugins and it seems that this solved the last bit. Thanks for having a look, I’ll cleanup the <script /> *.js sources as well! (a lot of cleanup with different websites to do here …)

Last edited by keukenkikker (2019-03-29 14:40:34)

Offline

#38 2022-05-25 15:24:34

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 38

Re: Outdated page after article publication

Hi. The situation I mentioned here in 2018 is now recurring. After upgrading to TXP 4.8.8, all my sites have the wrong date in the last-modified header.

For example the information from redbot.org :

HTTP/1.1 200 OK
Date: Wed, 25 May 2022 15:04:40 GMT
Server: Apache/2.4.41 (IUS) OpenSSL/1.0.1e-fips
Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
ETag: "1h7fnha"
Cache-Control: max-age=0
Expires: Wed, 25 May 2022 15:04:40 GMT
Vary: Accept-Encoding,User-Agent
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

Can you help me?

Offline

#39 2022-05-25 16:24:32

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,099
Website Mastodon

Re: Outdated page after article publication

same for my site:

Vary: Accept-Encoding
Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT
ETag: "1gn71d9"

PS tried testing my EE site which is on the same server and i get this output:

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 25 May 2022 16:25:17 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Pragma: no-cache
Permissions-Policy: interest-cohort=()
Set-Cookie: exp_tracker=%7B%220%22%3A%22index%22%2C%22token%22%3A%228aff7011
        e1c301c991a384096ae09d7930e675e40430edd1ea278f886b3abb32e
        6a178467a655bb35bf5569276550cc9%22%7D; path=/; HttpOnly;
        SameSite=Lax
Set-Cookie: exp_csrf_token=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT;
        Max-Age=0; path=/; HttpOnly; SameSite=Lax
Set-Cookie: exp_csrf_token=eeae825d0c53adc4278c2a4a13a3ddd4dcae075e;
        expires=Wed, 25-May-2022 18:25:16 GMT; Max-Age=7200;
        path=/; HttpOnly; SameSite=Lax
Last-Modified: Wed, 25 May 2022 16:25:17 GMT

What’s it all about, Alfie?

Last edited by bici (2022-05-25 16:28:39)


…. texted postive

Online

#40 2022-05-25 17:18:43

etc
Developer
Registered: 2010-11-11
Posts: 5,257
Website GitHub

Re: Outdated page after article publication

My oh my.. could you run this code and post the result please:

<txp:php>
$constants = (new ReflectionClass("DateTimeInterface"))->getConstants();
foreach($constants as $name => $format) {
    dmp("{$name}: " . date($format));
}
</txp:php>

Offline

#41 2022-05-25 18:08:46

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 38

Re: Outdated page after article publication

could you run this code and post the result please:

Hm, the code result is empty:

*    28,59 |     0,06 | <txp:php>
*    28,65 |          | </txp:php>
     28,66 |          | [ ~~~ end of pass 1 ~~~ ]

- debugging mode

Offline

#42 2022-05-25 19:51:02

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,754
Website

Re: Outdated page after article publication

That’s strange. Where did you insert it? When I put that in my page template above the txp:body tag I get:

ATOM: 2022-05-25T19:49:21+00:00
COOKIE: Wednesday, 25-May-2022 19:49:21 UTC
ISO8601: 2022-05-25T19:49:21+0000
RFC822: Wed, 25 May 22 19:49:21 +0000
RFC850: Wednesday, 25-May-22 19:49:21 UTC
RFC1036: Wed, 25 May 22 19:49:21 +0000
RFC1123: Wed, 25 May 2022 19:49:21 +0000
RFC7231: Wed, 25 May 2022 19:49:21 GMT
RFC2822: Wed, 25 May 2022 19:49:21 +0000
RFC3339: 2022-05-25T19:49:21+00:00
RFC3339_EXTENDED: 2022-05-25T19:49:21.000+00:00
RSS: Wed, 25 May 2022 19:49:21 +0000
W3C: 2022-05-25T19:49:21+00:00

(but I’m also not seeing your problem)


TXP Builders – finely-crafted code, design and txp

Offline

#43 2022-05-25 20:09:40

etc
Developer
Registered: 2010-11-11
Posts: 5,257
Website GitHub

Re: Outdated page after article publication

A bit more legacy and straightforward:

<txp:php>
$constants= array(
        'atom' => DATE_ATOM, 'w3cdtf' => DATE_ATOM, 'rss' => DATE_RSS, 'cookie' => DATE_COOKIE, 'w3c' => DATE_W3C, 'iso8601' => DATE_ISO8601, 'rfc822' => DATE_RFC822,
    );
foreach($constants as $name => $format){
    dmp("{$name}: " . gmdate($format));
}
</txp:php>

I get this even on php 4.5.8:

atom: 2022-05-25T20:28:09+00:00

w3cdtf: 2022-05-25T20:28:09+00:00

rss: Wed, 25 May 2022 20:28:09 +0000

cookie: Wednesday, 25-May-22 20:28:09 GMT

w3c: 2022-05-25T20:28:09+00:00

iso8601: 2022-05-25T20:28:09+0000

rfc822: Wed, 25 May 22 20:28:09 +0000

Offline

#44 2022-05-26 00:59:04

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,248
Website

Re: Outdated page after article publication

etc wrote #333431:

My oh my.. could you run this code and post the result please:

<txp:php>...

I add this in the body of an article, on a live server located in Singapore, (Apache + PHP 8.1)

output:

ATOM: 2022-05-26T09:50:56+09:00
COOKIE: Thursday, 26-May-2022 09:50:56 JST
ISO8601: 2022-05-26T09:50:56+0900
RFC822: Thu, 26 May 22 09:50:56 +0900
RFC850: Thursday, 26-May-22 09:50:56 JST
RFC1036: Thu, 26 May 22 09:50:56 +0900
RFC1123: Thu, 26 May 2022 09:50:56 +0900
RFC7231: Thu, 26 May 2022 09:50:56 GMT
RFC2822: Thu, 26 May 2022 09:50:56 +0900
RFC3339: 2022-05-26T09:50:56+09:00
RFC3339_EXTENDED: 2022-05-26T09:50:56.000+09:00
RSS: Thu, 26 May 2022 09:50:56 +0900
W3C: 2022-05-26T09:50:56+09:00

and also in the HTTP Headers :

Last-Modified: Thu, 01 Jan 1970 00:00:00 GMT

The <txp:modified /> tag output is correct for that article

I see the same on localhost, both with TXP 4.8.8 and TXP dev.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#45 2022-05-26 08:29:17

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 38

Re: Outdated page after article publication

A bit more legacy and straightforward:

Output is:

atom: 2022-05-26T08:19:41+00:00
w3cdtf: 2022-05-26T08:19:41+00:00
rss: Thu, 26 May 2022 08:19:41 +0000
cookie: Thursday, 26-May-2022 08:19:41 GMT
w3c: 2022-05-26T08:19:41+00:00
iso8601: 2022-05-26T08:19:41+0000
rfc822: Thu, 26 May 22 08:19:41 +0000

Offline

#46 2022-05-26 08:36:05

mikulas
Member
From: Czech republic
Registered: 2012-03-15
Posts: 38

Re: Outdated page after article publication

And from diagnostic panel:

PHP version: 7.1.33
GD Graphics Library: 2.3.0; Supported formats: GIF, JPEG, PNG, WebP.
Intl extension: 1.1.0
Multibyte String extension: 7.1.33
Server time zone: Europe/Prague
Server local time: 2022-05-26 10:32:03
Daylight Saving Time enabled?: 1
Automatically adjust Daylight Saving Time setting?: 1
Time zone (GMT offset in seconds): Europe/Prague (3600)
MySQL: 5.6.48-88.0 (Percona Server (GPL), Release 88.0, Revision 66735bc) 
Database server time: 2022-05-26 10:32:03
Database server time offset: 0 s
Database server time zone: SYSTEM
Database session time zone: SYSTEM
Locale: cs_CZ.UTF-8
Site / Admin language: cs / cs
Web server: Apache/2.4.41 (IUS) OpenSSL/1.0.1e-fips
PHP server API: fpm-fcgi
PHP SSL version: OpenSSL 1.0.1e 11 Feb 2013
RFC 2616 headers: 0
Server OS: Linux 2.6.32-754.35.1.el6.x86_64

Offline

#47 2022-05-26 09:34:57

etc
Developer
Registered: 2010-11-11
Posts: 5,257
Website GitHub

Re: Outdated page after article publication

Thank you. Then it comes from somewhere else. Could you run

<txp:php>
dmp(get_pref('lastmod'));
dmp(get_lastmod());
</txp:php>

Offline

#48 2022-05-26 10:00:06

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,248
Website

Re: Outdated page after article publication

etc wrote #333438:

Thank you. Then it comes from somewhere else. Could you run

<txp:php>...

On localhost:

2022-05-26 18:54:30
1653558870

The live server gives something odd:

2022-04-20 11:28:02
1650421682

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB