1

Topic: Errors in ADMIN ...

When I valide modifications, instead returning of the page where I have done modifications, I have a message :

Erreur. Le lien que vous avez suivi est incorrect ou périmé

Re: Errors in ADMIN ...

In what part of admin do you get this error?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: Errors in ADMIN ...

When I change Style, for example, or  when I want to update infos from user when I'm on "Administration"

Re: Errors in ADMIN ...

I doubt it's related, but there were several errors in the french language pack. It has since been updated. Download it again and see if that helps.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: Errors in ADMIN ...

I have changed the french pack from now : errors are still here : but it's a minor bugs : infos are updated in database ....

6 (edited by cgo2 2005-01-08 23:03)

Re: Errors in ADMIN ...

I've got the same bug in almost every form of the forum : admin or user profile (for exemple when a user want to upload a new avatar)

"Bad request. The link you followed is incorrect or outdated."

But except this error, everything work fine (avatar is uploaded correctly)

imho it's the same bug in this topic : http://punbb.org/forums/viewtopic.php?id=5662

7 (edited by cgo2 2005-01-08 23:09)

Re: Errors in ADMIN ...

I've found the bug for avatar section :

in profile.php line 379 change :
redirect('profile.php?section=personality&id='.$id, $lang_profile['Avatar upload redirect']);
by :
redirect('profile.php?section=personality&id='.$id, $lang_profile['Avatar upload redirect']);

& is an html encoded char, but redirect() doesn't take html

I think you should change all :
$ grep -n -i "&" -r * | grep redirect
profile.php:131:                redirect('profile.php?section=essentials&id='.$id, $lang_profile['Pass updated redirect']);
profile.php:427:        redirect('profile.php?section=personality&id='.$id, $lang_profile['Avatar deleted redirect']);
profile.php:462:        redirect('profile.php?section=admin&id='.$id, $lang_profile['Group membership redirect']);
profile.php:503:        redirect('profile.php?section=admin&id='.$id, $lang_profile['Update forums redirect']);
profile.php:860:        redirect('profile.php?section='.$section.'&id='.$id, $lang_profile['Profile redirect']);

Re: Errors in ADMIN ...

Don't do that. It took my a while to figure out, but now I think I know why this happens. You've all set your redirect time to 0, right? If you do, PunBB attempts to redirect via a HTTP header instead and ampersands in that URL should not be in the form of HTML entities. Try the following. Open up include/functions.php and look for:

        header('Location: '.$destination_url);

and replace it with

        header('Location: '.str_replace('&', '&', $destination_url));

Does that help?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

9

Re: Errors in ADMIN ...

Does that help?

Yes, it does the same thing in a better way smile

Re: Errors in ADMIN ...

Rod wrote:

When I valide modifications, instead returning of the page where I have done modifications, I have a message :

Erreur. Le lien que vous avez suivi est incorrect ou périmé

Go to Admin panel, section "Options" and check your "Base URL". Maybe error there.

[no signature]

11

Re: Errors in ADMIN ...

No no, my url admin is perfect : and the error would be "http bad referer" smile

Re: Errors in ADMIN ...

Rod: Did the solution I posted above help you as well? It's a variant of cgo2's fix.

"Programming is like sex: one mistake and you have to support it for the rest of your life."