Ask Your Question
1

problem of title is to long

asked 2012-02-19 03:36:41 -0600

yangshuo gravatar image

updated 2012-02-19 03:39:16 -0600

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.

edit retag flag offensive close merge delete

Comments

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

Evgeny gravatar imageEvgeny ( 2012-02-19 11:31:27 -0600 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2012-02-19 11:51:08 -0600

Evgeny gravatar image

updated 2012-02-19 14:30:42 -0600

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.

edit flag offensive delete link more

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 gravatar imageBasel 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 gravatar imageBasel Shishani ( 2012-02-27 03:35:42 -0600 )edit
2

answered 2012-03-15 12:53:40 -0600

Miguel gravatar image

changing forms.py:127 from:

elif encoded_value > self.max_length:

to:

elif len(encoded_value) > self.max_length:

solves the issue!

edit flag offensive delete link more

Comments

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

Evgeny gravatar imageEvgeny ( 2012-03-15 15:10:28 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-02-19 03:36:41 -0600

Seen: 213 times

Last updated: Mar 15 '12