Welcome to Geeklog Thursday, October 21 2021 @ 11:23 pm EDT

Geeklog Forums

Cannot delete comments


Status: offline

Creator

Forum User
Full Member
Registered: 11/07/02
Posts: 181
Location:Austin, TX
groggy
Hi. My first forum post in here and it's about a problem. I just upgraded justrage.com to 1.3.9sr1 from 1.3.8sr3 and suddenly, I'm unable to delete comments. I don't know why but the option just doesn't show up for me anymore in any of my admin accounts, and I even tried setting up a new admin group.

The variable is there in the theme, yes. I took the XSilver that came in the 1.3.9sr1 package and converted it to XFlame2, so all the new stuff should be in there and the comments area has the {delete option} where it should be. I've made extra sure that fresh copies of comment.php and lib-common.php were uploaded. So I'm at the end of my rope here, and deleting comments via phpMyAdmin is getting to be rather annoying. Can anyone help me out here? Thanks!


L. Whitworth
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 12/08/02
Posts: 300
I ran across the problem that the delete button was only avialable on root comments or when you view the comments in flat mode sometime back. If this is your problem, I submitted a bug report about it and they said that it was working like intended.

Tom
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by tomw: I submitted a bug report about it and they said that it was working like intended.

The point being that you only really want to delete comments that you can see (not the ones that are reduced to only their headline).

Creator: Are you logged in as the Admin user or as some story admin? In the latter case, it may be a permission problem.

bye, Dirk
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 11/07/02
Posts: 181
Location:Austin, TX
Quote by tomw: I submitted a bug report about it and they said that it was working like intended.


Cool, thanks Tom. However, I don't see the option in flat, threaded, nested, and naturally no comments mode. :-(

Quote by Dirk: Creator: Are you logged in as the Admin user or as some story admin? In the latter case, it may be a permission problem.


Dirk, there are no other gods before me on that website. I am always logged in as admin with full rights. I've tried other admin accounts in newly created admin groups. No luck. :-(
L. Whitworth
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 12/08/02
Posts: 300
The point being that you only really want to delete comments that you can see (not the ones that are reduced to only their headline).


But even when they are open and you can see them, the button is not there.

 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 11/07/02
Posts: 181
Location:Austin, TX
Quote by tomw:
But even when they are open and you can see them, the button is not there.


Exactomundo, Tom!
L. Whitworth
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by tomw: But even when they are open and you can see them, the button is not there.

Hmm, works just fine here on geeklog.net:
  • Nested and Flat: delete option on every comment
  • Threaded: delete option on the top-level comments (the ones that are fully visible)

That's how it's supposed to be.

Are you two sure you've updated all the comment templates?

bye, Dirk
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 11/07/02
Posts: 181
Location:Austin, TX
Quote by Dirk:
Are you two sure you've updated all the comment templates?


Like I said I took the current XSilver from 1.3.9sr1 and converted it, so the theme is current. I was thinking it could be because Tom and I are sort of GL old-timers? Maybe there's a piece of anicent data floating around in the SQL database that's conflicting with the new code? As I understand it, there were some major changes to the comments code in 1.3.9? Maybe it's plugin related? I know that I still have the old menu plugin, and the old filemgmt plugin...
L. Whitworth
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Creator: I was thinking it could be because Tom and I are sort of GL old-timers? Maybe there's a piece of anicent data floating around in the SQL database that's conflicting with the new code?

The geeklog.net database is the grandmother of all databases It even has stuff in it like layout blocks. So if there was anything like that involved, it would surely show up here, too.

Quote by Creator: As I understand it, there were some major changes to the comments code in 1.3.9?

There were a few changes involved to make them all template based. Another change was to make the delete option available to story admins if they have edit permissions for the story above that comment. In 1.3.8 and earlier, only Admin users could delete comments.

Quote by Creator: Maybe it's plugin related? I know that I still have the old menu plugin, and the old filemgmt plugin...

Ah, okay - I thought we were talking about comments to stories?

There is one thing: There was a change in the plugin API for comments, so comments in the file management plugin 1.2 can not be deleted any more. I think Blaine fixed that in the latest 1.3 release candidate. And that API change was in 1.3.8, actually, not 1.3.9.

That shouldn't affect comments to stories, though ...

bye, Dirk
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 11/07/02
Posts: 181
Location:Austin, TX
OK I'm doing a bit of code sleuthing here, but I may be barking up a lot of wrong trees, so please bear with me.

In my lib-common, at the start of the comment display code here's what I have:

PHP Formatted Code
function COM_getComment( $A, $mode, $type, $order, $delete_option = false, $preview = false )
 

The $delete_option = false??? Is that normal? And furthermore, here is the actualy delete_option display code block:
PHP Formatted Code
// If deletion is allowed, displays delete link
    if( $delete_option )
    {
        $template->set_var( 'delete_option', '| <a href="' . $_CONF['site_url']
                . '/comment.php?mode=' . $LANG01[28] . '&cid=' . $A['cid']
                . '&sid=' . $A['sid'] . '&type=' . $type . '">'
                . $LANG01[28] . '</a> ' );
    }
    else
    {
        $template->set_var( 'delete_option', '' );
    }
 

Does that look right to you? I fear that this may have been taken out of context but I'm desperate to resolve this issue for some weird reason that's beyond even me. Oh and one more thing; I did have fliemgmt 1.2. Disabled it, still have the same problem. Re-enabled it, back to square one. And another thing, I'm still able to delete Poll comments. So this issue has to do with only story comments.

And finally, this is what I have in my comment.thtml file:

PHP Formatted Code
<div class="comment" style="padding-left: {indent}px">
  <table width="100%" cellspacing="0">
    <tr><td class="commenttitle">{title}</td></tr>
    <tr><td><font size="1"><i>{lang_authoredby} {start_author_anchortag}{author}{end_author_anchortag} {lang_on} {date}</i></font><br><br></td></tr>
    <tr><td valign="top">{comments}</td></tr>
    <tr><td><br><span {hide_if_preview}>[ <a href="{site_url}/comment.php?sid={sid}&pid={pid}&title={title}&type={type}">{lang_replytothis}</a> {parent_link} {delete_option}]</span><br><br></td></tr>
  </table>
</div>
 

Do y'all see anything amiss in that?
L. Whitworth
 Quote

Status: offline

adydas

Forum User
Junior
Registered: 26/02/04
Posts: 33
Has anyone found a fix for this, my site just got hacked and I can't delete the hacked comments! Help?!
 Quote

Status: offline

Creator

Forum User
Full Member
Registered: 11/07/02
Posts: 181
Location:Austin, TX
Quote by adydas: Has anyone found a fix for this, my site just got hacked and I can't delete the hacked comments! Help?!


What I did to fix this problem was that I removed those hacked comments via phpMyAdmin, backed up the GL database and my theme, then deleted everything and did a fresh clean install. Worked wonders.
L. Whitworth
 Quote

All times are EDT. The time is now 11:23 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content