First time here? Check out the FAQ!
1

problem of title is to long

If i input title to long,page display "Internal server error system error log is recorded, error will be fixed as soon as possible please report the error to the site administrators if you wish "

log dispaly "pagesize.py TIME: 2012-02-19 17:22:52,437 MSG: pagesize.py:process_exception:45 錯誤: 值對型別 character varying(300) 而言太長"

I advise tiltle do checking,if title to long ,page don't permit input.

yangshuo's avatar
35
yangshuo
asked 2012-02-19 03:36:41 -0600, updated 2012-02-19 03:39:16 -0600
edit flag offensive 0 remove flag close merge delete

Comments

Could you post the title here, please, I'll test it.

Evgeny's avatar Evgeny (2012-02-19 11:31:27 -0600) edit
add a comment see more comments

2 Answers

2

changing forms.py:127 from:

elif encoded_value > self.max_length:

to:

elif len(encoded_value) > self.max_length:

solves the issue!

Miguel's avatar
115
Miguel
answered 2012-03-15 12:53:40 -0600
edit flag offensive 0 remove flag delete link

Comments

Oh, man, thanks. That was a silly bug! Pushed this fix to the repo.

Evgeny's avatar Evgeny (2012-03-15 15:10:28 -0600) edit
add a comment see more comments
2

edit: fixed in the repository, will be in version 0.7.40.

In encoded unicode characters byte length and the character count are not the same.

In your case the unicode string is below the character count limit and the byte length is above, so the first check passes, but on the level of database it fails and you get an internal server error.

Now adjusted the input length validator.

Evgeny's avatar
13.2k
Evgeny
answered 2012-02-19 11:51:08 -0600, updated 2012-02-19 14:30:42 -0600
edit flag offensive 0 remove flag delete link

Comments

Evgeny, I got the latest master off Github today, I'm getting the error message 'The title is too long, maximum allowed size is 255 bytes' for even very short messages. If I try an all-Latin title I get an error page with: "__init__() got an unexpected keyword argument 'parser'". Do I post a separate bug or is it something you're working on.

Basel Shishani's avatar Basel Shishani (2012-02-27 01:10:20 -0600) edit

Sorry this seems to have been related to the html5lib issue - it went away after I downgraded to v0.90

Basel Shishani's avatar Basel Shishani (2012-02-27 03:35:42 -0600) edit
add a comment see more comments