Ask Your Question
0

question reedit bug

asked 2016-07-21 02:04:57 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

I found some unusual when re-editting a question. After clicking the re-edit button, a new page with a <select> will show, and in this <select> list, it contains all the revisions, assuming I have only one history version,the <select> list will have only one version. but I want edit the second version. and when I edit the question, this question have 2 versions and when I edit it for the third time, the second history revision's title and tags shows the first revision's title and tags. In the database table askbot_postrevison, the question's title and tags is really the last one's tags and title. If it is a bug? and how to fix it?


after debug the source code. I found something wrong.

in the post.py source file, about 2085 lines, a function named apply_edit(self, *args, **kwargs) is the main code of question revision. it annotation says "the question apply edit function is backwards:" and the __apply_edit() use the thread title and tagnames but the new text.


in order to everyone can checking this 'bug', I have made this question community wiki, you can change this revision and reedit it

edit retag flag offensive close merge delete

Comments

in the post.py source file, about 2085 lines, a function named `apply_edit(self, *args, **kwargs)` is the main code of question revision. it annotation says "the question apply edit function is backwards:" and the ` __apply_edit()` use the thread title and tagnames but the new text.

luckystar1992 gravatar imageluckystar1992 ( 2016-07-21 08:44:35 -0600 )edit

Can you edit your question and - fix the formatting (don't write in boldface) - uncheck the "community-wiki" checkbox Thanks!

slelievre gravatar imageslelievre ( 2016-07-22 06:59:11 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-07-23 01:06:21 -0600

luckystar1992 gravatar image

it seems not a bug, but I don't know the reason. If you review the askbot.models.post.py about 2132 lines, the function _question__add_revision(), it returns a PostRevision instance, and the parameters title and tagnames from self.thread. so the new edit version's title and

edit flag offensive delete link more

Comments

It seems you didn't finish your last sentence. Also, don't write in bold face.

slelievre gravatar imageslelievre ( 2016-08-11 08:23:56 -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: 2016-07-21 02:04:57 -0600

Seen: 788 times

Last updated: Jul 23 '16