time to upgrade...

Hi!

I´m trying to upgrade Spip from v.183 to v.192. First i did a mirror,
because it´s my first upgrade... :slight_smile: ... and thanks God, because it
didn't work.

After i overwrite the files with the new version, i go to ecrire, try
to login and, instead of the message "Technical Message: the upgrade
procedure should be ran to adapt the database to the new version of
SPIP. If you are a site administrator, please click on this link",
what i get is:

-------------------
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
    * This problem can sometimes be caused by disabling or refusing to accept
          cookies.
Try again
-------------------

I´ve done this procedure twice, with exactly the same result. Do
anyone know what´s going on?

Thank you!
tereza

Hi,

The problem is may come from the fact that you overwrote. Maybe you
didn't remove the old files before. This can disturb Spip that
searches its functions dynamically..

Here is what I always do for an upgrade :
- copy every templates to a separate directory
- update them (changing the <INCLUDE>, and adding #CACHE{} to
templates is generally sufficient)
- change the urls that link to custom templates
("spip.php?page=myCustomTemplate")
- backup IMG
- remove everything
- install a clean version (from SPIP-Contrib)
- add write access to IMG, local, config, tmp
- install properly the new version (just go to http://…/ecrire/), and
choose the database that was used in the elder version : this will
later automatically upgrade the database content
- overwrite IMG with your backup
- create a directory /squelettes/ and move your templates inside
- check that you have a template "sommaire.html" : this one is used
for the root page
- login to your private area : you have to create a custom file into
tmp/ in order to confirm your upgrade and change your database (note
that it's only at the moment that you create this file that the
upgrade of the database is done - this is a great security)

And normally it always work like a dreams
(except when Spip files where customized : it sometimes take a little
time to convert such customisation into plugin)

Hope it helps,

.Gilles
---

On 12/29/07, Tereza Loparic <telopa@gmail.com> wrote:

Hi!

I´m trying to upgrade Spip from v.183 to v.192. First i did a mirror,
because it´s my first upgrade... :slight_smile: ... and thanks God, because it
didn't work.

After i overwrite the files with the new version, i go to ecrire, try
to login and, instead of the message "Technical Message: the upgrade
procedure should be ran to adapt the database to the new version of
SPIP. If you are a site administrator, please click on this link",
what i get is:

-------------------
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.
    * This problem can sometimes be caused by disabling or refusing to accept
          cookies.
Try again
-------------------

I´ve done this procedure twice, with exactly the same result. Do
anyone know what´s going on?

Thank you!
tereza
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Yep, the same.

Indeed, to add some point to your success range, i'd first upgrade my 183
to a 191, then to a 192.

Because the changes between 18x and 19x were quite important, first, and
because I don't know how the script which upgrades the DB works exactly.
I'm not sure it is able to handle more than one version difference.

Good luck and happy new year to all :wink:

Etienne.

On Sat, December 29, 2007 3:32 pm, Gilles Vincent wrote:

Hi,

The problem is may come from the fact that you overwrote. Maybe you
didn't remove the old files before. This can disturb Spip that
searches its functions dynamically..

Here is what I always do for an upgrade :
- copy every templates to a separate directory
- update them (changing the <INCLUDE>, and adding #CACHE{} to
templates is generally sufficient)
- change the urls that link to custom templates
("spip.php?page=myCustomTemplate")
- backup IMG
- remove everything
- install a clean version (from SPIP-Contrib)
- add write access to IMG, local, config, tmp
- install properly the new version (just go to http://…/ecrire/), and
choose the database that was used in the elder version : this will
later automatically upgrade the database content
- overwrite IMG with your backup
- create a directory /squelettes/ and move your templates

Thank you both very much, and hapy new year, :slight_smile:

I´m still working on it because is not a simple site, it was done by
someone else and it has many languages (as far as I know, the many
languages are typed at the fields separated by the tag of the
languages).

Could you please tell me what does it mean to "changing the
<INCLUDE>", or where can I find more about it? What I have at the
squelettes is:

<INCLUDE(global.php3){lang}>

best wishes
tereza

On Dec 29, 2007 4:56 PM, L'oiseau2nuit (ex- Zzz.)
<loiseau2nuit@no-log.org> wrote:

Yep, the same.

Indeed, to add some point to your success range, i'd first upgrade my 183
to a 191, then to a 192.

Because the changes between 18x and 19x were quite important, first, and
because I don't know how the script which upgrades the DB works exactly.
I'm not sure it is able to handle more than one version difference.

Good luck and happy new year to all :wink:

Etienne.

On Sat, December 29, 2007 3:32 pm, Gilles Vincent wrote:
> Hi,
>
> The problem is may come from the fact that you overwrote. Maybe you
> didn't remove the old files before. This can disturb Spip that
> searches its functions dynamically..
>
> Here is what I always do for an upgrade :
> - copy every templates to a separate directory
> - update them (changing the <INCLUDE>, and adding #CACHE{} to
> templates is generally sufficient)
> - change the urls that link to custom templates
> ("spip.php?page=myCustomTemplate")
> - backup IMG
> - remove everything
> - install a clean version (from SPIP-Contrib)
> - add write access to IMG, local, config, tmp
> - install properly the new version (just go to http://…/ecrire/), and
> choose the database that was used in the elder version : this will
> later automatically upgrade the database content
> - overwrite IMG with your backup
> - create a directory /squelettes/ and move your templates

On Jan 4, 2008 3:42 PM, Tereza Loparic <telopa@gmail.com> wrote:
Hi,

Could you please tell me what does it mean to "changing the
<INCLUDE>", or where can I find more about it? What I have at the
squelettes is:

<INCLUDE(global.php3){lang}>

This means that you must replace it by <INCLUDE{fond=global}{lang}>
Simple, no ?
the template global.html (probably the old one, sometimes global.php3)
must be accessible by Spip : so you can put here inside the directory
"squelettes" (or the root too)

Here is a script to automatically upgrade your templates
(I don't remember where I found it, so I copy it -- with a very poor
translation, sorry)

Hope it helps,

.Gilles

-------------------- BEGIN OF THE SCRIPT ------------
#!/bin/bash

# Objet : Automatic upgrade from SPIP 1.7 and 1.8 to SPIP 1.9
# Requirements : Bash > 3.0
# Author : pvincent@erasme.org - 2007 -
# Licence : GPL

# NOTE : YOU MUST DO A BACKUP FIRST
# This script must be executed from the root directory.

# Working directory

  echo -en "\nName of the templates directory :"
  read repertoire

  if [ -d $repertoire ];
  then
    echo -en "\nBackup...\n\n"
  else
    echo -en "\nError : Directory not found.\n\n";
    exit;
  fi

# Backup

  if [ -d "backup_$repertoire" ];
  then
    echo -en "Confirmation required : the backup directory already
exists. \nPress a key to continue and erase old datas\n" && read temp
  else
    mkdir "backup_ $repertoire";
  fi
  
  cp -aRf $repertoire/ backup_ $repertoire/

# Initialisation

  # ---> INCLURE

  rec[0]='< *INCLURE *(\(.\+\)[.]php3 *)>'
  rep[0]='[(#INCLURE{fond=\1})]'

  rec[1]='< *INCLURE *(\(.\+\)[.]php3 *) *\({.\+}\) *>'
  rep[1]='[(#INCLURE{fond=\1}\2)]'

  # Customisation : indicates bellow what is specific to your templates

  rec[2]='&'
  rep[2]='&'
  
  rec[3]='&'
  rep[3]='&'

  #sq-sssc
  #rec[2]='<link.\+DOSSIER_SQUELETTE.\+>'
  #rep[2]='<link rel="stylesheet" href="#DOSSIER_SQUELETTE\/style.css"
type="text\/css">'

  # basic elements

  rec[4]='article.php3?id_article=#ID_ARTICLE'
  rep[4]='#URL_ARTICLE'

  rec[5]='rubrique.php3?id_rubrique=#ID_RUBRIQUE'
  rep[5]='#URL_RUBRIQUE'

  rec[6]='breve.php3?id_breve=#ID_BREVE'
  rep[6]='#URL_BREVE'

  rec[7]='auteur.php3?id_auteur=#ID_AUTEUR'
  rep[7]='#URL_AUTEUR'

  rec[8]='mot.php3?id_mot=#ID_MOT'
  rep[8]='#URL_MOT'

  # Standard url mode : remplace .php3 urls with spip.php?page=

  rec[9]='\([0-9a-zA-Z_-]\+\).php3?'
  rep[9]='spip.php?page=\1\&'

  rec[10]='\([0-9a-zA-Z_-]\+\).php3'
  rep[10]='spip.php?page=\1'

  # Seach

  rec[11]='\(<input.\+recherche\)'
  rep[11]='<input name="page" value="recherche" type="hidden" \/>\1'

  # XHTML - W3C

  rec[12]='< *\([hb]r\) *>'
  rep[12]='<\1 \/>'

  rec[13]='\(<link.*\?[^-?\/]\)>'
  rep[13]='\1 \/>'

  rec[14]='\(<input.*\?[^-?\/]\)>'
  rep[14]='\1 \/>'

  rec[15]='\(<img.*\?[^-?\/]\)>'
  rep[15]='\1 \/>'

  rec[16]='\(<meta.*\?[^-?\/]\)>'
  rep[16]='\1 \/>'

  #rec[15]='\(<img \)\([^a][^l][^t]\).\+\(>\)'
  #rep[15]='\1\2 alt=\"\" \3'

# Processing ...

  for ((a=0 ; a<=${#rec[*]}-1 ; a++))
  do
      echo
      echo "$a : remplace ${rec[a]} with ${rep[a]}";
    echo
    #echo "confirm"; read temp;
    for i in `ls $repertoire/*.html`;
    do
      sed -e "s/${rec[a]}/${rep[a]}/gi" "$i" > "$i".new 2>/dev/null ;
      mv "$i.new" "$i";
    done
  done

# cache
  echo -en "\nDo you want to keep the existing cache value, when
specified in the templates ? [Y\N]\n" && read cache1
  echo -en "\nDefault value in secondes (0 for no cache) ?\n" && read cache2

# CACHE

    for i in `ls $repertoire/*.html`;
    do
      if grep "#CACHE" "$i";
      then
        if [ "$cache1" = "N" ] ;
           then
            sed -e s/"#CACHE{.*}"/"#CACHE{$cache2}"/gi "$i" > "$i".new 2>/dev/null ;
          else
            cat "$i" > "$i".new
        fi
      else
        echo "#CACHE{$cache2}" > "$i".new
        cat "$i" >> "$i".new
      fi
      
      mv "$i".new "$i";
    done

echo "Replacements done"

------------------------ END OF THE SCRIPT -----------------------

best wishes
tereza

On Dec 29, 2007 4:56 PM, L'oiseau2nuit (ex- Zzz.)
<loiseau2nuit@no-log.org> wrote:

> Yep, the same.
>
> Indeed, to add some point to your success range, i'd first upgrade my 183
> to a 191, then to a 192.
>
> Because the changes between 18x and 19x were quite important, first, and
> because I don't know how the script which upgrades the DB works exactly.
> I'm not sure it is able to handle more than one version difference.
>
> Good luck and happy new year to all :wink:
>
> Etienne.
>
>
>
> On Sat, December 29, 2007 3:32 pm, Gilles Vincent wrote:
> > Hi,
> >
> > The problem is may come from the fact that you overwrote. Maybe you
> > didn't remove the old files before. This can disturb Spip that
> > searches its functions dynamically..
> >
> > Here is what I always do for an upgrade :
> > - copy every templates to a separate directory
> > - update them (changing the <INCLUDE>, and adding #CACHE{} to
> > templates is generally sufficient)
> > - change the urls that link to custom templates
> > ("spip.php?page=myCustomTemplate")
> > - backup IMG
> > - remove everything
> > - install a clean version (from SPIP-Contrib)
> > - add write access to IMG, local, config, tmp
> > - install properly the new version (just go to http://…/ecrire/), and
> > choose the database that was used in the elder version : this will
> > later automatically upgrade the database content
> > - overwrite IMG with your backup
> > - create a directory /squelettes/ and move your templates
>

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

It is <INCLURE{fond=global}{lang}> surely.

George

Gilles Vincent wrote:

On Jan 4, 2008 3:42 PM, Tereza Loparic <telopa@gmail.com> wrote:
Hi,

Could you please tell me what does it mean to "changing the
<INCLUDE>", or where can I find more about it? What I have at the
squelettes is:

<INCLUDE(global.php3){lang}>

This means that you must replace it by <INCLUDE{fond=global}{lang}>
Simple, no ?
the template global.html (probably the old one, sometimes global.php3)
must be accessible by Spip : so you can put here inside the directory
"squelettes" (or the root too)

Here is a script to automatically upgrade your templates
(I don't remember where I found it, so I copy it -- with a very poor
translation, sorry)

Hope it helps,

.Gilles
  

George Kandalaft ha scritto:

It is <INCLURE{fond=global}{lang}> surely.

{lang} is not necessary because it is automatically injected in the context by SPIP. Using it does no harm anyway. However, if you need it, you can override the context language with {lang=it}.

Renato