[spip-dev] Bug in URL generation

Hi,

(Sorry to write in English, my native languaje is Spanish, I can’t write French)

I’ve a problem with site. It’s a TV show site, so it’s sections are the seasons: 2003, 2004, 2005 …, to 2013 and counting on…

I’ve selected Clean URLs so it is supposed to use mysite.com/2003 as URL

The first problem is that SPIP reads this as and article URL and tries

mysite.com/spip.php?page=article&id_article=2005

So I changed the URLs directly in spio_urls table in the data base using phpMyAdmin I wrote /Temporada-2003 for example, and so on…

When my costumer created a new section for this year season ----.–/2013 the problem came back. So I decided to update to SPIP 3.0.8

Now things go worse, the sections appeared with the Temporada-XXXX URL, but when I click in View on-line link SPIP generates automatically the only number URL and set it as primary URL, so I come back to problem one.

Is it a bug of SPIP? what can be done?

Thanks,

Germán

I think that you can disable that in the .htaccess file.
You need to comment the line 88 (after # ping http://site/1234 => article1234) witch is :

RewriteRule ^([1-9][0-9]*)$ spip.php?action=redirect&type=article&status=301&id=$1 [QSA,L]

MM.

I’m not sure the standard (“clean”) URLs of SPIP are likely to help you with the model you want. They are designed to accomodate several constraints that you don’t have (like: non-unicity of titles), and we’ve recently added this /1234 shortcut which breaks what you want to do.

For now I would suggest that you fork urls/propres.php and hack it your way.

For the future we will have to consider writing a proper URL model with lists of patterns that can be read and written from a simple file; we’re not there yet, alas, but we’ve talked about it several times with @rastapopoulos, so wat’s missing is a bit of time to apply to the problem :slight_smile:

El htacces está activo ? (tenés que utlizar el fichero htaccess.txt ponerle un punto adelante y sacarle el sufijo, te tiene que quedar .htaccess, o sea, un fichero invisible)