Advertisement:

Author Topic: [SMF Converter] UBB.threads 7.5  (Read 43173 times)

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #20 on: November 11, 2013, 07:32:22 AM »
error:
Quote
Converting members... Successful.
Converting categories... Successful.
Converting boards... Successful.
Converting topics... Unsuccessful!
This query:
SELECT
t.TOPIC_ID AS id_topic, t.TOPIC_IS_STICKY AS is_sticky, t.FORUM_ID AS id_board,
t.POST_ID AS id_first_msg, t.TOPIC_LAST_POST_ID AS id_last_msg,
t.USER_ID AS id_member_started, t.TOPIC_LAST_POSTER_ID AS id_member_updated,
$row['id_member_updated'] = (int) $row['id_member_updated']
LIMIT 0, 500;
Caused the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '['id_member_updated'] = (int) $row['id_member_updated']
LIMIT 0, 500' at line 5

edited xxx.sql:
Code: [Select]
/******************************************************************************/
--- Converting topics...
/******************************************************************************/

TRUNCATE {$to_prefix}topics;
TRUNCATE {$to_prefix}log_topics;
TRUNCATE {$to_prefix}log_boards;
TRUNCATE {$to_prefix}log_mark_read;

---* {$to_prefix}topics
---{
$row['id_last_msg'] = (int) $row['id_last_msg'];
$ignore = true;
---}
SELECT
t.TOPIC_ID AS id_topic, t.TOPIC_IS_STICKY AS is_sticky, t.FORUM_ID AS id_board,
t.POST_ID AS id_first_msg, t.TOPIC_LAST_POST_ID AS id_last_msg,
t.USER_ID AS id_member_started, t.TOPIC_LAST_POSTER_ID AS id_member_updated,
$row['id_member_updated'] = (int) $row['id_member_updated'];
IFNULL(ps.POLL_ID, 0) AS id_poll,
t.TOPIC_REPLIES AS num_replies, t.TOPIC_VIEWS AS num_views,
t.TOPIC_STATUS = 'C' AS locked, t.TOPIC_IS_APPROVED as approved
FROM {$from_prefix}TOPICS AS t
LEFT JOIN {$from_prefix}POLL_DATA as ps ON (ps.POST_ID = t.POST_ID);
---*

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #21 on: November 11, 2013, 07:45:56 AM »
Not like that :P
Code: [Select]
---* {$to_prefix}topics
---{
$row['id_last_msg'] = (int) $row['id_last_msg'];
$row['id_member_updated'] = (int) $row['id_member_updated'];

$ignore = true;
---}
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #22 on: November 11, 2013, 07:47:39 AM »
I moved the last entry to the line under tha last one like you show, and now things are happening :D... I think

GEt one msg:
Quote
Converting...
Converting posts (this may take some time)...
Duplicate entry '143276' for key 1

but it looks like it's working with something.
A progress bar or icon would be usefull.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #23 on: November 11, 2013, 08:13:50 AM »
Yes, you've past topics conversion ;)

That error can also be bypassed with:
Code: [Select]
/******************************************************************************/
--- Converting posts (this may take some time)...
/******************************************************************************/

TRUNCATE {$to_prefix}messages;

---* {$to_prefix}messages 200
---{
$row['subject'] = str_replace(array("'", '"'), array("'", """), $row['subject']);
$row['body'] = strtr(str_replace(array("'", '"'), array("'", "&quot;"), $row['body']), array("\n" => '<br />'));
$ignore = true;
---}
(note the new "$ignore=true" line ;) )
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #24 on: November 11, 2013, 08:24:28 AM »
It looks like it's stuck.
I'll add this last line and run again.

EDIT: I see the count rising in the URL adress bar! 288200 and counting... 585000 all together :D
Thanks a lot for your help so far
« Last Edit: November 11, 2013, 09:07:06 AM by forumfjott »

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #25 on: November 11, 2013, 10:00:25 AM »
will the converter continue working if I take my PC offline? I have to leave to take the train home and PC will be offline for 45 minutes... and it still have to count 140.000 posts + all the next processes

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #26 on: November 11, 2013, 10:02:51 AM »
No, it won't :( The only way to do that is via CLI (server side) but:
- not sure if it works (probably no one uses that for a long time)
- you need to have SSH access to do do that (and you probably don't)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #27 on: November 11, 2013, 10:05:56 AM »
hope it picks up from where it left then ;)
If I leave it here, it will go to sleep mode anyway.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #28 on: November 11, 2013, 10:11:37 AM »
You can disable sleep mode in power options ;)

I will restart. You see that every database operation starts with "TRUNCATE" to the destination table, which means empty it.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #29 on: November 11, 2013, 01:08:24 PM »
cannot change properties for sleep mode on my company computer ;)
had to restart, but the first 200.000 post went quick. Now it counts 600 post pr. cycle, but ony 120.000 to go before next step of the convertion

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #30 on: November 11, 2013, 02:28:19 PM »
Quote
Converting posts (this may take some time)...
Successful.
Recounting post counts...Wrong value type sent to the database. Integer expected. (date_registered)

:D
Nothing is straight forward with this convert

EDIT: tried to insert a line like those above, and it started counting posts again...cr@p
« Last Edit: November 11, 2013, 02:44:13 PM by forumfjott »

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #31 on: November 11, 2013, 02:37:23 PM »
Following same logics:
Code: [Select]
/******************************************************************************/
--- Recounting post counts...
/******************************************************************************/

---* {$to_prefix}members 20
---{
$type = 'replace';
---}
Replace with:
Code: [Select]
/******************************************************************************/
--- Recounting post counts...
/******************************************************************************/

---* {$to_prefix}members 20
---{
$type = 'replace';
$row['date_registered'] = (int) $row['date_registered'];
---}

Nothing is straight forward with this convert
Eeeeexactly! :P
Converters are really complicated pieces of software, dealing with *very* different server setups, databases, etc etc... Unfortunately it is, most of the times, difficult...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #32 on: November 11, 2013, 02:48:43 PM »
hehehe... I see the light in the end of the tunnel, so I bear with it.

I did see the similarity in the script, so I inserted that line, but over the $type line. does it matter? hope not.
I also want to increse the amount of posts since it will be a lot of counting i presume.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #33 on: November 11, 2013, 02:52:13 PM »
It shouldn't matter, no.

Yes, you should be able to do that, yes. Maybe that "200" in "---* {$to_prefix}messages 200"
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #34 on: November 11, 2013, 02:58:47 PM »
i set 600 and forum still seems quick and OK.
I also raised the members counting to 35. It has about 5500 members.

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #35 on: November 11, 2013, 03:01:11 PM »
Please note that you can increase that as much as you want. It will only stop when you hit some limit (memory, timeout, max connections, etc) or if your MySQL "dies" due to excessive connections and the converter hangs.
In any case, just decrease and retry ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #36 on: November 11, 2013, 03:57:32 PM »
Quote
Converting posts (this may take some time)...
Successful.
Recounting post counts...Wrong value type sent to the database. Integer expected. (id_group)

This is just the second of the list for the current process:
Code: [Select]
SELECT m.id_member, mem.member_name, mem.date_registered, COUNT(*) as posts, mem.id_group, mem.lngfile, mem.last_login, mem.real_name, mem.instant_messages, mem.unread_messages,

mem.new_pm, mem.buddy_list, mem.pm_ignore_list, mem.pm_prefs, mem.mod_prefs, mem.message_labels, mem.passwd, mem.openid_uri, mem.email_address, mem.personal_text, mem.gender,

mem.birthdate, mem.website_title, mem.website_url, mem.location, mem.icq, mem.aim, mem.yim, mem.msn, mem.hide_email, mem.show_online, mem.time_format, mem.signature,

mem.time_offset, mem.avatar, mem.pm_email_notify, mem.karma_bad, mem.karma_good, mem.usertitle, mem.notify_announcements, mem.notify_regularity, mem.notify_send_body,

mem.notify_types, mem.member_ip, mem.member_ip2, mem.secret_question, mem.secret_answer, mem.id_theme, mem.is_activated, mem.validation_code, mem.id_msg_last_visit,

mem.additional_groups, mem.smiley_set, mem.id_post_group, mem.total_time_logged_in, mem.password_salt, mem.ignore_boards, mem.warning, mem.passwd_flood, mem.pm_receive_from
FROM {$to_prefix}messages as m

Could just as well make new lines for every item?
I cannot run through all posts so many times as there is values :'(

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #37 on: November 11, 2013, 04:03:01 PM »
Well, we're still to find out why is it triggering that error! Because the origin fields are, for sure, integers... And, surprisingly enough, it is now in SMF tables already...

Anyway, you can do that for the integer fields only.

I would advise you to skip that part and have, later, SMF itself to recount totals.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Offline forumfjott

  • Semi-Newbie
  • *
  • Posts: 81
Re: [SMF Converter] UBB.threads 7.5
« Reply #38 on: November 11, 2013, 04:12:17 PM »
aaaand how to set a skip command?

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: [SMF Converter] UBB.threads 7.5
« Reply #39 on: November 11, 2013, 05:27:14 PM »
Now isn't that the 1.000.000$ question? :P

I'm not sure, TBH, but I *think* that you just need to remove all of this (DO BACKUP your .sql file as you have already some changes to the one from here):
Code: [Select]
/******************************************************************************/
--- Recounting post counts...
/******************************************************************************/

---* {$to_prefix}members 20
---{
$type = 'replace';
---}

SELECT m.id_member, mem.member_name, mem.date_registered, COUNT(*) as posts, mem.id_group, mem.lngfile, mem.last_login, mem.real_name, mem.instant_messages, mem.unread_messages, mem.new_pm, mem.buddy_list, mem.pm_ignore_list, mem.pm_prefs, mem.mod_prefs, mem.message_labels, mem.passwd, mem.openid_uri, mem.email_address, mem.personal_text, mem.gender, mem.birthdate, mem.website_title, mem.website_url, mem.location, mem.icq, mem.aim, mem.yim, mem.msn, mem.hide_email, mem.show_online, mem.time_format, mem.signature, mem.time_offset, mem.avatar, mem.pm_email_notify, mem.karma_bad, mem.karma_good, mem.usertitle, mem.notify_announcements, mem.notify_regularity, mem.notify_send_body, mem.notify_types, mem.member_ip, mem.member_ip2, mem.secret_question, mem.secret_answer, mem.id_theme, mem.is_activated, mem.validation_code, mem.id_msg_last_visit, mem.additional_groups, mem.smiley_set, mem.id_post_group, mem.total_time_logged_in, mem.password_salt, mem.ignore_boards, mem.warning, mem.passwd_flood, mem.pm_receive_from
FROM {$to_prefix}messages as m
LEFT JOIN {$to_prefix}members as mem ON (m.id_member = mem.id_member)
WHERE m.id_member != 0
GROUP BY m.id_member;
---*'

emanuele? :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

Quote
Over 90% of all computer problems can be traced back to the interface between the keyboard and the chair