Advertisement:

Author Topic: [4730]Remove "Topics and Posts" doesn't work?  (Read 4745 times)

Offline Felix J

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • Depressed most of the times.
[4730]Remove "Topics and Posts" doesn't work?
« on: May 24, 2011, 12:19:51 PM »
Here is information about it - http://www.simplemachines.org/community/index.php?topic=434970.0

If any support specialist wanna take a look I can give you login info via pm.
« Last Edit: July 12, 2011, 04:07:28 AM by Norv »

Offline mashby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,394
  • Gender: Male
  • badass beer hound
    • Choppix
Re: Remove "Topics and Posts" doesn't work?
« Reply #1 on: May 24, 2011, 05:27:14 PM »
I'm game (as in curious). I'll await your PM and hope I can assist you.
Always be a little kinder than necessary.
- James M. Barrie

Offline Felix J

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • Depressed most of the times.
Re: Remove "Topics and Posts" doesn't work?
« Reply #2 on: May 26, 2011, 06:12:46 AM »
I was feeling really sick yesterday so I had to sleep almost the whole day, but now it's better.

I've sent you the login information.

Thanks!

Offline Felix J

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • Depressed most of the times.
Re: Remove "Topics and Posts" doesn't work?
« Reply #3 on: May 26, 2011, 08:16:16 AM »
I don't know if this functon works when not connecting the posts to a new user and just deleting the topics and posts from the original user. Since I haven't tried this. Only tried it after connecting the topics and posts to a new user.

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Remove "Topics and Posts" doesn't work?
« Reply #4 on: May 26, 2011, 11:29:02 AM »
As far as I can see it's a bug.

SMF doesn't delete the topics reassigned to another used.

Reproduced in a freshly installed SMF 2.0 RC5.
The problem should be that the topics are not "reassigned" to the new user (id_member_started) and then when it's time delete them SMF fails because the id of the reassigned member is not the same as the id of the id_member_started now 0.

Edit
This query:
Code: [Select]
$smcFunc['db_query']('', '
UPDATE {db_prefix}topics as t, {db_prefix}messages as m
SET t.id_member_started = {int:memID}
WHERE m.id_member = {int:memID}
AND t.id_first_msg = m.id_msg',
array(
'memID' => $memID,
));

at the end of the function reattributePosts, just before the return should fix it. :) (don't have any idea how it works on big databases! ;))
« Last Edit: May 26, 2011, 11:44:29 AM by emanuele »


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Felix J

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • Depressed most of the times.
Re: Remove "Topics and Posts" doesn't work?
« Reply #5 on: May 26, 2011, 11:44:12 AM »
As far as I can see it's a bug.

SMF doesn't delete the topics reassigned to another used.

Reproduced in a freshly installed SMF 2.0 RC5.
The problem should be that the topics are not "reassigned" to the new user (id_member_started) and then when it's time delete them SMF fails because the id of the reassigned member is not the same as the id of the id_member_started now 0.

OK!

Good to know. Thanks

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: Remove "Topics and Posts" doesn't work?
« Reply #6 on: May 26, 2011, 11:53:26 AM »
In case you missed it Felix, emanuele updated his last post with a fix. Looks like you guys posted almost at the same time. :)
IchBin™        TinyPortal
Coding Guidelines       

Offline Felix J

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • Depressed most of the times.
Re: Remove "Topics and Posts" doesn't work?
« Reply #7 on: May 26, 2011, 12:07:52 PM »
In case you missed it Felix, emanuele updated his last post with a fix. Looks like you guys posted almost at the same time. :)

Yes I saw it, but thanks anyway.



emanuele, so your fix covers both the options "All Posts" and "Topics and Posts" as well when topics or/and posts gets removed from the poster in which made the threads and posts?

(I don't know if the same issue comes after deleting threads and/or posts from the original poster...) so this would be good to know aswell..

Will it also be possible to just remove posts but not threads with this fix choosing the option "All Posts"?


Last but not least... lets say a user spam with just making threads... and you choose the option "All Posts". What will be happen then? Should the admin choosing the option get an message saying it isn't possible or something like that? Since that option should only remove posts and not threads?

« Last Edit: May 26, 2011, 12:57:30 PM by Felix J »

Offline Felix J

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • Depressed most of the times.
Re: [4730]Remove "Topics and Posts" doesn't work?
« Reply #8 on: May 26, 2011, 12:40:18 PM »
Anyone that can say for sure if the feature option "All Posts" works? and if both the options would work for the original poster aswell. This is a little offtopic I know, but it's very close to this one.

Yes all posts works for the user connected to posts... I will check the other one.


Forget my earlier message.

OK everything else in this area seems to be working after testing. Great! Then only this one.
« Last Edit: May 26, 2011, 12:58:34 PM by Felix J »

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: [4730]Remove "Topics and Posts" doesn't work?
« Reply #9 on: May 29, 2011, 04:05:41 AM »
BTW, it's related to [4000] reattributePosts function does not update topic counts.

Issue marked (and closed) as duplicate.


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Illori

  • Project Manager
  • SMF Master
  • *
  • Posts: 49,581
Re: [4730]Remove "Topics and Posts" doesn't work?
« Reply #10 on: November 18, 2011, 09:08:43 AM »
moving to bogus board as duplicate of the other thread