First time here? Check out the FAQ!
0

question reedit bug

  • retag add tags

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

updated 2016-07-21 02:04:57 -0600
This post is a wiki. Anyone with karma >100 is welcome to improve it.
edit flag offensive 0 remove flag 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's avatar luckystar1992 (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's avatar slelievre (2016-07-22 06:59:11 -0600) edit
add a comment see more comments

1 Answer

0

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

luckystar1992's avatar
71
luckystar1992
answered 2016-07-23 01:06:21 -0600
edit flag offensive 0 remove flag delete link

Comments

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

slelievre's avatar slelievre (2016-08-11 08:23:56 -0600) edit
add a comment see more comments