First time here? Check out the FAQ!
2

question id and unicode title slug changed after askbot migration

Hi all,

I updated askbot-devel from version34 to version 43, re-installed, and then run migration, everything worked fine, but the question id for each question got changed. Something like for 150 previous posts, the first one got 151, the 100th one got 250.

May be in my postgres database, there is some place I've to reset any sequence from where the question gets the id.

Any help much appreciated. All of my sites previous links posted in various places dont' work now :(

Edit: I'm using ALLOW_UNICODE_SLUGS = True. The unicode string for the question title is different(with the previous link) and wrong now. Before migration it was ok (e.g. similar with the question title)

str's avatar
91
str
asked 2012-07-28 23:26:34 -0500, updated 2012-07-29 21:58:53 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

Have you actually checked your site's previous links? They should be working by redirection to the new urls. Do you really have broken links?

edit: id numbers cannot be matched, but we provide proper redirects so that there are no broken links.

Evgeny's avatar
13.2k
Evgeny
answered 2012-07-28 23:55:07 -0500, updated 2012-08-25 20:41:23 -0500
edit flag offensive 0 remove flag delete link

Comments

1

I checked. But previous links dont work. Question ids are not same and no redirection takes place :( Anything to specify in settings.py? But isn't there any way to keep the original question ids as it was?

str's avatar str (2012-07-29 03:21:35 -0500) edit

@str there must be a way to fix old id's I will look into that and respond by Tuesday. The old id's are saved in the database, something must be wrong in the redirection code.

Evgeny's avatar Evgeny (2012-07-29 13:23:18 -0500) edit

Many thanks, Evgeny. More updates about the issue, 1. previous links do work, i.e. redirects to the new link with new question id; 2. the unicode string for the question title is different(with the previous link) and wrong now.

str's avatar str (2012-07-29 21:36:54 -0500) edit

Ok, the slugs are different, if I understand correctly, but redirects work, no? Do you get broken links?

Evgeny's avatar Evgeny (2012-07-29 22:13:51 -0500) edit

Yes, Evgeny. Redirects work. No broken link. (But is not there any way keeping the original id's? :-( ). 2. And yes, slugs are different (and wrong.)

str's avatar str (2012-07-29 22:19:47 -0500) edit

Re: wrong slugs - can you show me an example? Id's cannot be returned to old at the moment, I think me made mistake in the design decision, but it is what it is now. We might revert back to the "old id's" but that will perturb some other users.

Evgeny's avatar Evgeny (2012-07-29 22:22:59 -0500) edit
  1. I sent email in your gmail account with the examples. Many thanks for your investigation. 2. Least, could you please show me some pointers in the code (if not possible to create a new branch with the fix), where to change, just to fix the 'old id' issue for myself?
str's avatar str (2012-07-29 22:47:03 -0500) edit

Ok, well the slugs are different, I can't read the text easily unfortunately. Do the two versions belong to the same question if you judge by the meaning of the strings? Re: id's - it's in the function askbot.views.readers.questions. and to change you'll need to refer to question by thread ids instead of the question post ids. It's not an easy change and if you do it I'm afraid you won't be able to upgrade in the future.

Evgeny's avatar Evgeny (2012-07-29 23:05:31 -0500) edit

Yes its not possible for you to understand my language :). You mean, whether both links point to the same question? Yes. But the meaning of the news url-string doesn't make any sense, as lots of characters missing from the question title.

str's avatar str (2012-07-29 23:41:52 -0500) edit

Any update/suggestion/quick-fix regarding the slug? Eagerly waiting

str's avatar str (2012-07-31 22:51:14 -0500) edit
add a comment see more comments