Opened 21 months ago
Closed 20 months ago
#3749 closed Defect (worksforme)
Upgrading DB from 1.7 to 1.8 corrupts Discussions
| Reported by: | Tim_Bender | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Needs Review |
| Component: | Forums | Version: | 1.8 Beta |
| Severity: | minor | Keywords: | discussion |
| Cc: | brett@…, bender10@…, mcloughlin3@… | Difficulty: |
Description
A Discussion is comprised of an initial post (Title, Body, Tags) followed by a set of replies. After upgrading from 1.7 to 1.8 (beta) all of the Discussions had the Body removed from the initial post. The original post's Body was now shown as the content of the first reply.
Example:
In 1.7:
Initial post:
Title - Cats
Body - My cat puts his head in my sweaty shoe when I come home. Does your cat do funny things?
Tags - Pets, Cats, lols
Reply #1:
Body - lol, cats
After 1.8 upgrade:
Initial post:
Title - Cats
Body -
Tags - Pets, Cats, lols
Reply #1:
Body - My cat puts his head in my sweaty shoe when I come home. Does your cat do funny things?
Reply #2:
Body - lol, cats
Change History (5)
comment:1 Changed 21 months ago by cash
comment:2 Changed 21 months ago by brettp
Urm...no? I didn't write the discussion migration and haven't looked into the problem but can at some point.
comment:3 Changed 21 months ago by cash
I just thought since you released 1.8.0 you would have looked at this
comment:4 Changed 21 months ago by brettp
There are a lot of outstanding tickets that would have been nice to have looked at by someone, but none of us had the chance.
comment:5 Changed 20 months ago by cash
- Resolution set to worksforme
- Status changed from new to closed
Here's where we are on this:
- I wrote the upgrade script and tested it on a mirror of a reasonably large site (thousands of topics). It has also been tested on a mirror of the community site. Everything checked out and has been a part of the beta releases.
- We have had no other reports on this - from either the betas or the 1.8.0 release
- I just tested on a clean 1.7.11 to 1.8.0 upgrade and it did not create this problem
This could occur if you did not update the groups plugin when upgrading the site or had the groups plugin turned off. If you had it turned off, you should be able to turn it on, hit upgrade again, and have the groups upgrade run.
For more details see https://github.com/Elgg/Elgg/blob/master/mod/groups/upgrades/2011030101.php
The script tries to determine if the forum topics have already been upgrade. If not, it runs the upgrade. If this is on a production site, you'd need to rewrite the upgrade script since some topics have been created with the topic text on the object and some with have the topic text as an annotation.

Brett - any comments on this?