SPIP 2.1: My articles have all disappeared!

If you installed SPIP in its 2.1 version, a bug [1] introduced 10 months ago [2] made all your articles “disappear” on your website. No panic, only their display is being broken, a simple upgrade to SPIP 2.1.2 will solve the issue.

The bug appears in the file ecrire/public/quete.php

In this file, at the line 82, you just need to replace the value 10000 by 365*2:

                     : (time()+(3600*24*10000))) ;
                     : (time()+(3600*24*365*2))) ;

All usual upgrade methods are possible:

— editing the file ecrire/public/quete.php on your site (cf. former code)

— using spip_loader.php to download and install SPIP 2.1.2

— downloading SPIP 2.1.2 and upgrade the whole site by FTP.

— downloading the patch: http://trac.rezo.net/trac/spip/changeset/16014

— pulling from SVN by svn up ecrire/public/quete.php if your website is on SVN with 2.1 branch

— using the unix command: This command, executed as root, allows you to fix the problem globally for all instances of SPIP on your server:

# for i in $(locate ecrire/public/quete.php); do grep -l 10000 $i &&
perl -pi -e 's/3600\*24\*10000/3600*24*365*2/g;' $i; done

(This command displays files fixed).

Then EMPTY THE CACHE of your website, and you’ll be good to go again.

With our deepest apologies for this (great) mistake!


[1This bug is happening on 32 bits machines, a date too far in the future is set back to January 1901.

Author an.archi Published : Updated : 06/08/22

Translations : عربي, català, English, Español