Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-09-15 18:23:10

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,200
GitHub

Re: prev & next navigation weirdness

wet wrote:

Is there a chance that the web server and the mysql server are in different timezones?

Hi Robert.
Web server is Apache and on the same physical machine & IP as the MySQL server.

Timezone on server (via date) is PDT. Timezone in PHP (via phpinfo date.timezone) is UTC. Timezone in MySQL is not explicitly set in my.cnf.

Textpattern is set to Europe/London in the admin panel. Timestamps are being recorded as PDT time in the database. The most recent post was published at 0921 today, and has a Posted value of 2012-09-15 01:21:15 in the database, which is the PDT equivalent, so that’s what I would expect to see.

Offline

#14 2012-09-15 18:24:45

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,328
Website Mastodon

Re: prev & next navigation weirdness

Try this SQL statement:

SELECT @@global.time_zone, @@session.time_zone;

Offline

#15 2012-09-15 18:27:23

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,200
GitHub

Re: prev & next navigation weirdness

wet wrote:

SELECT @@global.time_zone, @@session.time_zone;

gaekwad replied with:

Reporting both as SYSTEM.

Last edited by gaekwad (2012-09-15 18:28:32)

Offline

#16 2012-09-15 18:31:49

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,328
Website Mastodon

Re: prev & next navigation weirdness

Please verify that SELECT now(); in SQL and date on the server shell prompt give the same time readout.

Offline

#17 2012-09-15 18:36:27

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,200
GitHub

Re: prev & next navigation weirdness

wet wrote:

Please verify that SELECT now(); in SQL and date on the server shell prompt give the same time readout.

date gives Sat Sep 15 11:35:14 PDT 2012
SELECT now() gives 2012-09-15 11:35:16

The two second gap is down to my switching windows.

Last edited by gaekwad (2012-09-15 18:36:44)

Offline

#18 2012-09-15 18:54:57

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,328
Website Mastodon

Re: prev & next navigation weirdness

Could you try to install a new Txp 4.5.1 site with the default site template on this server and add a few posts?

Offline

#19 2012-09-15 19:09:44

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,200
GitHub

Re: prev & next navigation weirdness

wet wrote:

Could you try to install a new Txp 4.5.1 site with the default site template on this server and add a few posts?

Step ahead of you. Installing 4.4.0, 4.4.1, 4.5.0 and 4.5.1 side by side. Will report back.

Offline

#20 2012-09-15 19:12:03

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,328
Website Mastodon

Re: prev & next navigation weirdness

We have touched the logic behind link_to_next / link_to_prev from 4.4.1 to 4.5.0 so you may have hit something.

Offline

#21 2012-09-15 19:17:16

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,328
Website Mastodon

Re: prev & next navigation weirdness

In diagnostics there’s a few related lines for additional clues:

Server TZ: ...
Server local time: ...
DST enabled?: ...
Automatically adjust DST setting?: ...
Time zone: ...

Last edited by wet (2012-09-15 19:17:34)

Offline

#22 2012-09-15 19:26:53

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,200
GitHub

Re: prev & next navigation weirdness

Firstly – I have replicated the issue on a fresh install of 4.5.1 — I have some more investigation to do, and the findings will follow.

Second, a low-detail diagnostic dump (removed some .htaccess whitespace lines for formatting):

Textpattern version: 4.5.1 (r4105)
Last update: 2012-09-15 18:12:14/2012-09-15 15:48:43
Document root: /var/www/vhosts/petecooper.org/httpdocs
$path_to_site: /var/www/vhosts/petecooper.org/httpdocs
Textpattern path: /var/www/vhosts/petecooper.org/httpdocs/textpattern
Permanent link mode: section_title
Temporary directory path: /var/www/vhosts/petecooper.org/httpdocs/.tmp
Site URL: petecooper.org
PHP version: 5.3.5
GD Image Library: bundled (2.0.34 compatible); supported formats: GIF, JPG, PNG.
Server TZ: UTC
Server local time: 2012-09-15 19:24:53
DST enabled?: 1
Automatically adjust DST setting?: 1
Time zone: Europe/London (0)
MySQL: 5.1.54-log
Locale: en_GB.UTF-8
Server: Apache
Apache version: Apache
PHP server API: apache2handler
RFC 2616 headers: 
Server OS: Linux 2.6.18-028stab101.1
Active plugins: soo_modified-0.1.0, rss_admin_db_manager-4.3m, rah_sitemap-1.2m
Admin-side theme: classic 4.5.1
.htaccess file contents: 
------------------------
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default
<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/
	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]
	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php
	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
# SVG
AddType image/svg+xml  svg svgz
AddEncoding gzip       svgz

————————————

Offline

#23 2012-09-15 19:59:02

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,200
GitHub

Re: prev & next navigation weirdness

OK, a test case.

Background
I set up a clean install of each of the following versions of Textpattern: 4.4.0, 4.4.1, 4.5.0 and 4.5.1. They are installed on the same server with the same IP address, same PHP, same MySQL and on the hosting account of the same domain. Each install has the same 5 articles created, each with an ID of 1 to 5 inclusive. Article content comprises a paragraph of lorem ipsum text The articles are from the same day, posted 1 minute apart from one another. Article ID 1 is posted at 2012-09-01 12:01:00, article ID 2 is posted at 2012-09-01 12:02:00, article ID 3 is posted at 2012-09-01 12:03:00, article ID 4 is posted at 2012-09-01 12:04:00 and article ID 5 is posted at 2012-09-01 12:05:00.

Each install has default pages, forms and styles aside from an addition to each default form (type: article). The following was appended to each:

<!-- if this is an individual article then add prev/next navigation buttons -->
<txp:if_individual_article>
  Prev: <txp:link_to_prev><txp:prev_title /></txp:link_to_prev><br />Next: <txp:link_to_next><txp:next_title /></txp:link_to_next>
</txp:if_individual_article>
Theory
  • visiting each individual article page should display a paragraph of lorem ipsum text, along with a link to the previous and next chronological article where it exists.
    • Article #1 in each instance was posted first (is the oldest article), has no older sibling and should not display a link to an older article.
    • Articles #2 to #4 in each instance have older and newer sibling articles should display a link to each.
      • Article #2 should link to #1 and #3
      • Article #3 should link to #2 and #4
      • Article #4 should link to #3 and #5
    • Article #5 in each instance was posted last (is the newest article), has no newer sibling and should not display a link to an newer article.
Findings
  • Textpattern 4.4.0 successfully passes all tests.
  • Textpattern 4.4.1 successfully passes all tests.
  • Textpattern 4.5.0 fails all tests.
    • Article #1 links to article #5
    • Article #2 links to article #5
    • Article #3 links to article #5
    • Article #4 links to article #5
    • Article #5 links to article #5
  • Textpattern 4.5.0 fails all tests.
    • Article #1 links to article #5
    • Article #2 links to article #5
    • Article #3 links to article #5
    • Article #4 links to article #5
    • Article #5 links to article #5

I have each of the test Textpattern installations set up with access URLs and credentials for anyone (responsible) who wants to access them.

Offline

#24 2012-09-15 20:04:22

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,200
GitHub

Re: prev & next navigation weirdness

Additional findings
  • The “Older” and “Newer” nav buttons on individual article pages (Textpattern 4.5.0 and 4.5.1 new install, Phil’s new theme) don’t work as expected. With each of the tests on 4.5.0 and 4.5.1, articles all link to article #5 as the previous article, with no link to a newer article.

Last edited by gaekwad (2012-09-15 20:08:03)

Offline

Board footer

Powered by FluxBB