DragonflyCMS Projects > BlogsPlus > Lost comments > Community Forums > Phoenix Netology
Forum Index > Community > BlogsPlus

Lost comments Reply to topic


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

Please enter your server specs in your user profile! 😢


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,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.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Having viewed the arrse blogs/forum topics, resetting privcomm would requireUPDATE 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']

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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

Please enter your server specs in your user profile! 😢


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.

Donations & Audit for DragonflyCMS

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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

Please enter your server specs in your user profile! 😢


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.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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!!!

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

Please enter your server specs in your user profile! 😢


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

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


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

Please enter your server specs in your user profile! 😢


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

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are Australia/Adelaide


Jump to: