Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-01-10 11:54:21

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

Articles no longer appearing in latest commit (Expires = NULL)

I’m having a problem with the latest commit in txp 4.6 on php 7 and MySQL 5.5.42 on MAMP: All my articles no longer appear! I can only get them to appear if I reference them individually as a messy url of the kind /index.php?id=2.

I think I’ve tracked it down to this line in publish.php

if (!$expired) {
        $time .= " AND (".now('expires')." <= Expires OR Expires = ".NULLDATETIME.")";
    }

where NULLDATETIME is now defined here in lib/constants.php as NULL. The query does not seem to recognise OR EXPIRES = NULL.

if (!$expired) {
        $time .= " AND (".now('expires')." <= Expires OR Expires IS ".NULLDATETIME.")";
    }

(i.e. IS instead of =) does work.

Also, if I’m not mistaken, Expires in the Textpattern table is not handled the same way in /setup/txpsql.php (line 112) and in update/_to_4.6.0.php (line 222). Shouldn’t NOT NULL also be NULL DEFAULT NULL in the setup?


TXP Builders – finely-crafted code, design and txp

Offline

#2 2016-01-11 08:35:42

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

Re: Articles no longer appearing in latest commit (Expires = NULL)

Same issue here (I think!) — PHP/5.5.30 + MySQL 5.6.21, localhost on OS X. Going to the site returns basically a blank thing, recent articles returns nothing, search fails to find anything. Somehow, going to the write panel for an individual article and clicking the “view” link does work.


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

Offline

#3 2016-01-11 10:00:30

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Articles no longer appearing in latest commit (Expires = NULL)

I’ve noted this in the pull request and will await and answer from Ruud.

Offline

#4 2016-01-11 18:20:20

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Articles no longer appearing in latest commit (Expires = NULL)

I’m working on this.
_to_4.6.0 is correct, txpsql.php is not.

Offline

#5 2016-01-11 18:54:31

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Articles no longer appearing in latest commit (Expires = NULL)

Should be fixed now (pull request sent)

Offline

#6 2016-01-11 21:14:39

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

Re: Articles no longer appearing in latest commit (Expires = NULL)

Looks good! Had no idea there were so many ramifications, but looks thorough to me. Thanks ruud!


TXP Builders – finely-crafted code, design and txp

Offline

#7 2016-01-11 22:26:43

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Articles no longer appearing in latest commit (Expires = NULL)

Ruud’s patch has been merged now. Let us know how it works for you all. Cheers!

Offline

#8 2016-01-11 22:55:49

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

Re: Articles no longer appearing in latest commit (Expires = NULL)

@Ruud, your patch works fine now. All the issues I flagged above are gone. Thanks.


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