Last updated date

Hi all

I am using spip 1.8.2 d .

Few of my rubriques is showing the last updated date as the current date.

How to correct this problem?

I have enclosed the table structure and two records .

The first rubrique, « Practical Information » (first sql statement below) is showing the correct updated date, whereas « L’Institut » (the second sql statement below) is showing the last updated date as the current date.

Thanks.


INSERT INTO spip_rubriques (id_rubrique, id_parent, titre, descriptif, texte, id_secteur, maj, export, id_import, statut, date, lang, langue_choisie, idx, extra, url_propre, statut_tmp, date_tmp) VALUES (7, 1, ‹ 5. Practical Information ›, ‹ IFP ›, 0x7b7b7b5265616368696e6720746865204946507c616262727d7d7d0d0a0d0a3c70207374796c653d226865696768743a3230307078223e0d0a3c61626c653e, 1, ‹ 2008-02-04 17:12:16 ›, ‹ oui ›, 0, ‹ prive ›, ‹ 0000-00-00 00:00:00 ›, ‹ en ›, ‹ non ›, ‹  ›, ‹  ›, ‹ Practical-Information ›, ‹ prive ›, ‹ 0000-00-00 00:00:00 ›);

INSERT INTO spip_rubriques (id_rubrique, id_parent, titre, descriptif, texte, id_secteur, maj, export, id_import, statut, date, lang, langue_choisie, idx, extra, url_propre, statut_tmp, date_tmp) VALUES (8, 2, ‹ 1. L ›‹ Institut ›, ‹ Présentation ›, 0x7b7b7b446972656374696f6e7d7d7d0d0a446972656374657572203a204a65616e2d506965727265204d756c6c657220283c6120687265663d222e22028646f6e7420332076c3a9686963756c657320e2809c746f75732d7465727261696e73e2809d292e0d0a, 2, ‹ 2008-03-17 09:50:19 ›, ‹ oui ›, 0, ‹ publie ›, ‹ 2006-12-21 00:00:00 ›, ‹ fr ›, ‹ non ›, ‹ oui ›, ‹  ›, ‹ L-Institut ›, ‹ publie ›, ‹ 2006-12-21 00:00:00 ›);

CREATE TABLE spip_rubriques (
id_rubrique bigint(21) NOT NULL auto_increment,
id_parent bigint(21) NOT NULL default ‹ 0 ›,
titre text NOT NULL,
descriptif text NOT NULL,
texte longblob NOT NULL,
id_secteur bigint(21) NOT NULL default ‹ 0 ›,
maj timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
export varchar(10) default ‹ oui ›,
id_import bigint(20) default ‹ 0 ›,
statut varchar(10) NOT NULL default ‹  ›,
date datetime NOT NULL default ‹ 0000-00-00 00:00:00 ›,
lang varchar(10) NOT NULL default ‹  ›,
langue_choisie char(3) default ‹ non ›,
idx enum(’’,‹ 1 ›,‹ non ›,‹ oui ›,‹ idx ›) NOT NULL default ‹  ›,
extra longblob,
url_propre varchar(255) NOT NULL default ‹  ›,
statut_tmp varchar(10) NOT NULL default ‹  ›,
date_tmp datetime NOT NULL default ‹ 0000-00-00 00:00:00 ›,
PRIMARY KEY (id_rubrique),
KEY lang (lang),
KEY idx (idx),
KEY id_parent (id_parent),
KEY url_propre (url_propre)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=59 ;


Iswaria wrote:

    Few of my rubriques is showing the last updated date as the current date.

Can you give rather the URLs of the page where this is happening, and also the URL of the template which is producing the page?

Paolo

Iswaria wrote:
> The url of the template is http://www.ifpindia.org/ifp2005blue/rubrique.html
> Rubriques showing the latest update date: (see at the end of the page
> for date)
>
> http://www.ifpindia.org/-The-Institute-.html
>
> Correct date:
> http://www.ifpindia.org/-Practical-Information-.html

Iswaria,
*Please* :

- always correspond through the list and do not send private emails (other people may be interested, and this does not put any one particular person under pressure to help).

- use plain text rather than HTML messages.

The date at the end of the page, for example,
"Latest addition : 29 January 2008"
appears to be displayed by line 168 in your template:
[<:dernier_ajout:> : (#MAJ|affdate)]

#MAJ (not mentioned in SPIP's documentation) in this context will give you the timestamp of the last change to the text of the *section* and not of the the last change to the articles contained in the section.

As mentioned in the documentation (http://www.spip.net/en_article2429.html), "The date of a section is that of the most recent item contained in the section." So you could use
[<:dernier_ajout:> : (#DATE|affdate)]

However, if what you want is the last *change* to the articles in the section and not just the date of the last published article, then you will need to use a loop and do something like this:

<BOUCLE_lastchange(ARTICLES){id_rubrique}{par date_modif}{inverse}{0,1}>
[<:dernier_ajout:> : (#DATE_MODIF|affdate)]
</BOUCLE_lastchange>

(not tested).

Or else, of course, simply change the main date of an article manually whenever you make a significant change to the text and you wish to advertise the change as an "update" -- this is what we do on our site.

I hope this helps.

Paolo