Exclusive eBooks, Software Solutions, Quality Guaranteed
 
Web NukeBiz
Welcome to NukeBiz · Members
Amazon
show cart or checkout0 items
Cart Value: 0.00

Forums » DragonflyCMS Projects » BlogsPlus » Lost comments
Lost comments
An update of BlogsPlus which is an update of Blogs.
Topic initiation via Bugger.

Post new topic    Reply to topic    Printer Friendly Page     Forum Index »  Community » BlogsPlus

View previous topic :: View next topic  
Author Message
BadCO
Director
Director

Offline Offline
Joined: Mar 20, 2007
Posts: 144

PostPosted: Fri Jun 01, 2007 5:15 am
Post subject: Lost comments

Phoenix,
I've just upgraded ARRSE and RumRation and too late have realised that all the comments for the blogs have been lost! Fortunately I've got the old database back ups - any thoughts?

_________________
There can be only one

BadCO's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.4/5.0.37/5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Fri Jun 01, 2007 5:36 am
Post subject: Re: Lost comments

hmm, I presume you mean they didn't get converted.

That will be the result of the earlier blogs having privcomm=0 - I mention it in the released version of the ReadMe. This would have occurred to blogs pre-dating your original 9.1.3 update - my fault entirely, though I didn't anticipate Discuss It at the time Laughing

First I would check if you appear to have any recent blogs that genuinely have privcomm set to 0 and make a note of those.

Then I would run,
Code::
UPDATE cms_blogs SET privcomm='1';
and then restore privcomm to 0 for any that you feel were genuinely no comments.

Unfortunately, you would also have to remove all the topics generated from that Blogs forum before re-running the converter - sorry to have mucked you about like that.

In fact, I've changed the upgrader and set privcomm to 1, and take the risk that it affects the odd blog that deliberately disabled comments, so that others won't be affected.

In the worst case scenario, I could build an extra converter option to fix privcomm and missing comments, but would prefer not to complicate things by doing that.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Sat Jun 02, 2007 2:18 am
Post subject: Re: Lost comments

Having viewed the arrse blogs/forum topics, resetting privcomm would require
Code::
UPDATE cms_blogs SET privcomm='1' WHERE id<'355';
UPDATE cms_blogs SET topic_id='0' WHERE id<'355';
UPDATE cms_blogs SET post_id='0' WHERE id<'355';
Then you need to remove the affected topics through the moderator panel - painfully slow given that you have 11 pages of them.

Re-running the converter will then successfully restore comments for the old blogs.

I've also detected a bug in the comments link for the "user" section of blogs where it is using a topic number that is far removed from reality.
A very stupid error on line 97 of user.php,
$blog['id'] ==> $blog['topic_id']


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
BadCO
Director
Director

Offline Offline
Joined: Mar 20, 2007
Posts: 144

PostPosted: Sat Jun 02, 2007 5:37 am
Post subject: Re: Lost comments

Thanks a lot for that - I've now managed to get all the comments up and running again which is great.

Just a few notes though:

a. The converter didn't restore comments but created a new thread. This was no great loss as I actually created a new board and deleted the old one.

b. The converter kept on crashing and I had to run it multiple times to get all the blogs across. Stupidly I've forgotten to record the error it gave. Perseverance was very effective though!

As always, thanks for your great support on this.

_________________
There can be only one

BadCO's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.4/5.0.37/5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Sat Jun 02, 2007 11:06 am
Post subject: Re: Lost comments

The converter must create a topic to add comments which is why you needed to remove the old ones, but it only creates a topic if 'topic_id' is zero.

Perhaps the error was from it running too fast and conflicting with server load.

_________________
DonationsPro for vBulletin, SMF, MyBB, DragonflyCMS


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
BadCO
Director
Director

Offline Offline
Joined: Mar 20, 2007
Posts: 144

PostPosted: Sun Jun 03, 2007 3:09 am
Post subject: Re: Lost comments

Well after quite a bit of trial and error I've discovered one of the problems. The converter crashes if you have a comment from a user who either no longer exists or has changed their user name. By repeatedly rerunning it I eventually caused the covertor skip all of these meaning that they didn't get transferred to the forum.

I've managed to get round this now by removing all the comments from those who fitted into this category and it appears to have installed properly now.

_________________
There can be only one

BadCO's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.4/5.0.37/5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Sun Jun 03, 2007 3:36 am
Post subject: Re: Lost comments

Damn it - that aspect of the original blogs setup has been a concern to me from the start. I almost added that extra field this time around but decided to skip it to avoid creating an extra issue with everything else happening. I should have gone with my gut feel and done it Sad

The very problem with name changes is why DF was changed ages ago, though the odd relic does still exist.

I'll simply bite the bullet and add the true id to the blogs table in the next release. It will actually save some queries where blogs has to lookup the users table just to get that id.

The problem where the user no longer exists is just plain failure on my part to allow for that in the coding - another matter for repair in the next release.

I'm not particularly happy with the way the original code determines a valid username, so I'll have to change that along the lines of my recent changes to the Members List module.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
BadCO
Director
Director

Offline Offline
Joined: Mar 20, 2007
Posts: 144

PostPosted: Sun Jun 03, 2007 4:04 am
Post subject: Re: Lost comments

Actually it hasn't! The majority of it seems to be ok but the links from the list of users' blogs is broken. As an example check HERE.

As always, grateful for your thoughts?

Afternote: Doh!!!

Quote::
A very stupid error on line 97 of user.php,
$blog['id'] ==> $blog['topic_id']

This makes the link work but incorrectly displays the number of responses ....

_________________
There can be only one

BadCO's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.4/5.0.37/5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Sun Jun 03, 2007 10:49 pm
Post subject: Re: Lost comments

Double Doh

It's worse than a simple fix - I left a whole section that tries to link with the original Discuss_this database table. I simply failed to look at that file at all, other than spotting the single dud link. That is really bad form.

My humble apologies Embarassed

Thankfully my weekend is over for another week, and I actually feel more rested after that than I did at any stage of last week when I wasn't working Laughing


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Mon Jun 04, 2007 9:22 pm
Post subject: Re: Lost comments

Fixed that and found some more aberrations in the original coding - geez, thought I had them all.

Probably too late for your now, but I've added an error trap in the converter that avoids the error when username for the blog or comment doesn't match the users database. It also keeps track of these and provides a list of names and blog ids at the end of conversion so that admin can remedy them if desired.

Version 9.1.5


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
BadCO
Director
Director

Offline Offline
Joined: Mar 20, 2007
Posts: 144

PostPosted: Wed Jun 06, 2007 1:45 pm
Post subject: Re: Lost comments

Installed and working on all 3 of our sites!

Just one further thought - when you delete a blog it would probably be best to return to the main blogs page?

_________________
There can be only one

BadCO's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.4/5.0.37/5.2/9.1.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 17, 2004
Posts: 1543
Location: Netizen
PostPosted: Wed Jun 06, 2007 3:51 pm
Post subject: Re: Lost comments

hmm, actually it should return to that particular users' blogs, which is pretty pointless if that user only had one blog.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index »  Community » BlogsPlus
Page 1 of 1
All times are GMT + 9.5 Hours



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum