Closed (duplicate)
Project:
Comment closer
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Aug 2009 at 15:40 UTC
Updated:
19 Oct 2010 at 16:24 UTC
Tried with 6x 1.3 and Drupal 6.13
It closes all comments made previous to activation of the module without obeying the time limit set in "older than"
Cron ran etc done properly.
There is also no way to revert what was done like opening the comments. Deselecting all nodes or clicking to restore default did not help.
Comments
Comment #1
rmiddle commentedI added a Warning on the project page about that. The way it is done there is no way to revert the change other then to edit the nodes you want to reopen.
I added a task to add an option to make sure the cron doesn't run before you have had a change to make changes to the settings.
#537466: Use sensible defaults to prevent accidental closing of comments before admin has chance to set up module
Thanks
Robert
Comment #2
kaakuu commentedThanks Robert.
I am trying to understand the behavior, I may be wrong and I may need to spend more time just to have a basic grasp of what it does.
What happened that made me post initially was -
There were some comments on the test site, some 1 month old some 1 week old, some just 1 or 2 days old
I installed the module and set to close comments on those 1 month old
Ran cron so that the module can do irs work
It closed comments on 1 week old too
Trying to make a different setting or restoring default made no changes
Is that the module's expected behavior ?
Is there any "raw" way to directly play in the databse to open all closed comments or certain closed comments en masse ?
Comment #3
rmiddle commentedUnless I made a big mistake that I am not seeing in my site. I am guessing that cron job ran once with the default settings before you went in and set it. That is why I added in the new task to prevent that in the future. The cron job is ugly but if you look there is basically 1 line that does all the work.
UPDATE {node} SET comment = 1 WHERE (created < %d) ...
I tack on extra where clauses to limit what gets closed and what doesn't but it could just as easy open comments on them as well by changing comment = 1 to comment = 2. The problem is there is no state info about it's prior status that is why I can't revert. In order to revert the changes I would have to create a table and store the current station of comments on all nodes in my where command and then restore that state on uninstall.
Thanks
Robert
Comment #4
kaakuu commentedI am still confused. If no one else is having problem it means problem is with me and I need to work this thing afresh.
As far as "no state info about it's prior status", I think I wanted to revert to the default comment settings of the site which was "read/write" for all or certain content types.
Comment #5
kaakuu commented"That is why I added in the new task to prevent that in the future."
Thats great if that helps. Will you release a version with this shortly? Thanks in advance.
Comment #6
rmiddle commentedI suspect that your problem was that once you installed the module the 1st time cron got ran it used what every settings that were in place at the time. I think the issue was that the cron job got ran before you had a change to define what you wanted.
I still have to write the code and I have been crazy busy at the office I will try and get a new version out soon but have no eta at this time.
Thanks
Robert
Comment #7
nancydruI think this is a duplicate of #537466: Use sensible defaults to prevent accidental closing of comments before admin has chance to set up module.
Comment #8
nancydru