Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
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
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
Re: Articles no longer appearing in latest commit (Expires = NULL)
Should be fixed now (pull request sent)
Offline
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
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
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