First time here? Check out the FAQ!
3

question.html vs question.summary

  • retag add tags

We are migrating an old askbot website: the answers and comments disapeared and the questions are shortened.

The problem seems to be the following: instead of using the html column of the (new) askbot_post table, the website looks for the summary column of the same field, and since answers and comments have an empty summary, this explains both issues.

Indeed, if we replace:

  • {{ question.summary }} by {{ question.html }} in the askbot/templates/question/question_card.html file
  • {{ answer.summary }} by {{ answer.html }} in the askbot/templates/question/answer_card.html file
  • {{ comment.summary }} by {{ comment.html }} in the askbot/templates/macros.html file

Then we have a good website. It seems that the change that creates this problem is the following change (sorry, not enough karma to post a link : github.com/ASKBOT/askbot-devel/commit/0705ba63df2c3bf540109d52072c47317b3c105c

Moreover, the previous contents of the column summary of the askbot_post table are text, while the new settings, they are html.

Here are my questions.

  • Why is .summary replacing .html in the templates ?
  • In the current setting, is there a difference between the columns html and summary in the askbot_post table ?
  • If those columns are different, how to rebuild the old summary column according to the new convention (otherwise i can simply copy the html column over the summary column) ?
  • Is there a plan to support such a migration officially, so that we do not have to fork the code ?
  • What are the long term plans for those columns ?
tmonteil's avatar
63
tmonteil
asked 2014-03-30 06:33:21 -0500, updated 2014-03-30 10:26:56 -0500
edit flag offensive 0 remove flag close merge delete

Comments

I just encountered this problem myself. Thanks for offering up a solution here. I do agree that a migration fix is in order.

mcg's avatar mcg (2014-11-25 10:51:02 -0500) edit
add a comment see more comments

2 Answers

1

Run the command python manage.py generate_post_snippets, I'll make a follow up release to run this automatically.

Evgeny's avatar
13.2k
Evgeny
answered 2014-11-25 12:50:17 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
1

I know this isn't an answer but a comment alone doesn't seem to give it an activity bump. I'd like to acknowledge that this is problem recently occurred for me during a migration from 0.7.43 to 0.7.50. Instead of seeing answers disappearing, I'm only seeing the summary. The full answer cannot be revealed.

However, if I edit a question or answer, the full question now appears on the page.

If you want to see the difference, here is a question on my original site: http://ask.cvxr.com/question/3072/computing-or-bounding-a-modified-ky-fan-norm/

And here is the same question on my test site: http://ask2.cvxr.com/question/3072/computing-or-bounding-a-modified-ky-fan-norm/

(The theme on the new site is a work in progress, so ignore that, please.)

mcg's avatar
86
mcg
answered 2014-11-25 12:35:07 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments