Generic message import

Converting from other board software? Good decision! Need help? Have a question about a convertor? Wish to offer a convertor package? Post here.
Scam Warning
SiJ
Registered User
Posts: 26
Joined: Fri Aug 28, 2009 8:05 am

Re: Generic message import

Post by SiJ »

URGENT Problem
Ok, I got the problem.. Here's the situation:
I got phpbb3 forum with all the topics and posts and a fresh install of phpbb3 forum. The fresh install has all the same forums as the old one (I created them) and now I want to transfer all messages from old forum to new one. So I got two questions:
  • How do I export posts & topics from old forum to XML file? Should I do it from phpmyadmin > Export > XML? If yes, then how can I export topics and posts if they are on different tables (phpbb_posts & phpbb_topics)?
  • Does it check for forum IDs to match? I mean my old forum has the same forums (exactly same names of those forums) as the fresh install but the forum_id doesn't match the old forum's IDs.. :s
orangeredman
Registered User
Posts: 1
Joined: Sun Aug 07, 2011 7:11 pm

Re: Generic message import

Post by orangeredman »

When I press preview or submit - it goes to a blank page. I have even tried the "working sample" from one of the previous posts so don't think it's the file. Any suggestions?
erikesq777
Registered User
Posts: 4
Joined: Thu Jul 14, 2011 2:09 pm

Re: Generic message import

Post by erikesq777 »

Is there an easy way to get Generic Message Import to work with a CSV file versus XML file?


Thanks
erikesq777
Registered User
Posts: 4
Joined: Thu Jul 14, 2011 2:09 pm

Re: Generic message import

Post by erikesq777 »

Is the Generic Message Import Mod still being updated /supported?
gahs
Registered User
Posts: 1
Joined: Tue Feb 21, 2012 2:54 pm

Re: Generic message import

Post by gahs »

This seems like it would be a good thing. Unfortunately, I get a segmentation fault whenever I try to preview or submit the XML file with messages to import, with messages of this sort in the server log:

Code: Select all

[notice] child pid 10024 exit signal Segmentation fault (11)
There are no other php messages in the log corresponding with attempting the import.

This happens even with a trivial generic import XML file such as this:

Code: Select all

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<forum-message-list><topic forum-name="Production" title="Test"><message by="kazu" posted="1326152366">Dear all,

This is a test.

Best regards,
Kazu
</message></topic></forum-message-list>
I am using phpBB-3.0.10 on a Linux system (SLF57, based on RHEL57) with Apache 2.2.3, PHP 5.1.6, and MySQL 5.0.77-log.

Has anyone else experienced this? Is there anything I can do to diagnose it short of running gdb on Apache?

I am also wondering at the answer to erikesq777's question:
Is the Generic Message Import Mod still being updated /supported?
manoet
Registered User
Posts: 3
Joined: Thu Feb 23, 2012 5:46 pm

Re: Generic message import

Post by manoet »

I'm trying to use this tool to import my messages, but I've some problems.
I have converted all &, &agrave; and so in my posts via a php function (I did not use XML Spy cause I didn't find a quick way to do it) and I obtained a clean XML.
But, when I try to import my post, it says it is all right, but in fact it just created the topic and the post, but the text is blank.
I suppose that happens because there are some HTML tags inside the post (Possible?). I've already read rborsheim post in which he says to replace all < and > with [ and ] but i'd like to mantaint that in order to mantains working links, bold, italic, underline text etc.
What do you suggest?

EDIT: ok, solved
I made the following substitutions to every post (apply in this order or there may be some errors)

Code: Select all

$text = str_replace("<br>", "\n", $text);
$text = str_replace("&", "&", $text);
$text = str_replace("'", "&apos;", $text);
$text = str_replace("\"", """, $text);
$text = str_replace("<", "<", $text);
$text = str_replace(">", ">", $text);
User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: Generic message import

Post by Mess »

Anyone made it parse the bbcodes? Its can't get images turn up what ever i try. :(
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Generic message import

Post by D¡cky »

Mess wrote:Anyone made it parse the bbcodes? Its can't get images turn up what ever i try. :(
Is images the only bbcode that is not working?
If you edit a post, does the image show up?
If you are unable to get the images to show up, show me a sample post so I can see what the problem is.
Have you hugged someone today?
User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: Generic message import

Post by Mess »

D¡cky wrote:Is images the only bbcode that is not working?
If you edit a post, does the image show up?
If you are unable to get the images to show up, show me a sample post so I can see what the problem is.
  • There are no other bbcodes used in the imported messages. Smilies work.
  • If I only edit and save, no. If I edit, insert a line break and save, yes.
  • Sample post: http://gjeep.net/viewtopic.php?f=12&t=482
    Sample import data:

Code: Select all

<topic forum-name="Tutorials" title="KIF_1980">
	<message posted="2009-08-18 22:58:44" by="KimJ" ip="127.0.0.1">[img]http://www.hb-eu.com/OLDwar2/modules/coppermine/albums/userpics/10133/KIF_1980.JPG[/img] </message>
	<message posted="2004-09-05 22:40:52" by="KimJ" ip="130.228.152.55">�Green, Alox, Doewen and Freew :-o</message>
</topic>
The picture doesn't exist. But it still shouldn't show up as bbcode.
User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Generic message import

Post by D¡cky »

Mess wrote: The picture doesn't exist. But it still shouldn't show up as bbcode.
You are correct. The alt text should be displayed.

To correct the bbcodes, get the Support Toolkit and run the Reparse BBCodes tool.
Have you hugged someone today?
User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: Generic message import

Post by Mess »

D¡cky wrote:
Mess wrote: The picture doesn't exist. But it still shouldn't show up as bbcode.
You are correct. The alt text should be displayed.

To correct the bbcodes, get the Support Toolkit and run the Reparse BBCodes tool.
urg, I was afraid you where gonna suggest that. :P
STK is not an option for me, it is conflicting with a mod I'm using.

Code: Select all

General Error
SQL ERROR [ mysqli ]

Column 'support_form_one' cannot be null [1048]

SQL

UPDATE phpbb_topics SET forum_id = '2', icon_id = '0', topic_approved = '1', support_form_one = NULL, support_form_two = NULL, support_form_three = NULL, support_form_four = NULL, support_form_five = NULL, topic_title = 'Welcome to phpBB3', topic_first_poster_name = 'KimJ', topic_type = '0', topic_time_limit = 0, poll_title = '', poll_start = 0, poll_max_options = 1, poll_length = 0, poll_vote_change = 0, topic_last_view_time = 1335291300, topic_attachment = 0 WHERE topic_id = 1

BACKTRACE

FILE: [ROOT]/includes/db/mysqli.php
LINE: 182
CALL: dbal->sql_error()

FILE: [ROOT]/includes/functions_posting.php
LINE: 2086
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/stk/tools/admin/reparse_bbcode.php
LINE: 382
CALL: submit_post()

FILE: [ROOT]/stk/index.php
LINE: 296
CALL: reparse_bbcode->run_tool()
Guess the only way i to hand edit then... :(

Edit:
Got help with the mod in question. After reparsing the bbcodes everything was fine and dandy! :D
jtaubman
Registered User
Posts: 17
Joined: Thu Aug 09, 2012 3:16 pm

Re: Generic message import

Post by jtaubman »

I have managed to create the XML file and it validates fine.

How ever when I import if falls over with the message below.
I have a couple of missing users (some of the message are 10 years old), which it reports during the preview stage and it fails when it tries to process the first message from one of them.

Any suggestions appreciated. I have the latest version of phpbb (downloaded and installed yesterday) and I believe the latest version of the mod.

Code: Select all

SQL ERROR [ mysqli ]

Incorrect integer value: 'e' for column 'topic_poster' at row 1 [1366]

SQL

INSERT INTO phpbb_topics (topic_poster, topic_time, topic_last_view_time, topic_last_post_time, forum_id, topic_title, topic_first_poster_name, topic_first_poster_colour, topic_type) VALUES ('e', 1331917207, 1331917207, 1331917207, '3', 'Unhandled Exception', 'Eddie Thomas', 'e', 0)

BACKTRACE

FILE: [ROOT]/includes/db/mysqli.php
LINE: 182
CALL: dbal->sql_error()

FILE: [ROOT]/includes/acp/acp_import_messages.php
LINE: 730
CALL: dbal_mysqli->sql_query()

FILE: [ROOT]/includes/acp/acp_import_messages.php
LINE: 406
CALL: acp_import_messages->add_cur_topic()

FILE: [ROOT]/includes/functions_module.php
LINE: 507
CALL: acp_import_messages->main()

FILE: [ROOT]/adm/index.php
LINE: 74
CALL: p_master->load_active()

User avatar
pieterhuizinga
Registered User
Posts: 48
Joined: Tue Jan 08, 2013 5:28 pm
Name: Pieter Huizinga

Re: Generic message import

Post by pieterhuizinga »

Hi folks,

I am running 3.0.11 and am looking at having to import tons of messages from an obscure board. I think I am able to create the xml files needed (I am an IT guy). But I'm baffled by the MOD installation.

- Tried to install with Automod, gives 2 errors. It escapes me why, all the install does is copy 6 files?.
- Copied manually and added the module manually, enabled it. No cigar.
- The mod now shows as installed in the list on the ACP Automod tab. But not in the .MOD tab.
- Under the Posting tab where there should be a new option "import messages", that also isn't there.

Is this MOD at all compatible with 3.0.11? If so, how do I run it?
I will appreciate any pointer. Thanks much from Rotterdam, Holland.
User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: Generic message import

Post by prototech »

Did you follow the DIY instructions in install.xml?
Navigate to:
Administration Control Panel > System > Module Management > Administration Control Panel > Posting > Messages
Select “Import Messages” from the Add Module drop-down menu and click “Add module”.
Then click “Enable” on the Module.
Browse to ACP > Posting > Messages > Import Messages and confirm install!
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Generic message import

Post by Oyabun1 »

There are a few errors in the install.xml file. If you are not seeing the new menu item on the POSTING tab then you probably haven't installed the module, as explained in the DIY instructions.

To install the module you have 2 options
  1. Delete includes/acp/info/acp_import_users.php and replace it with root/includes/acp/info/acp_import_messages.php. The file was misnamed in the install file so AutoMOD will have renamed it. Then
    import_messages_readme.txt wrote:Go to: Administration Control Panel > System > Module Management > Administration Control Panel > Posting > Messages
    From the Add Module dropdown, select Import Messages
    Click Add Module
    Click Yes
    Click Back to previous page
    Enable the added module
  2. I've created a new install_mod.xml file with some updates and corrections in it as well as an install file that can be run to install the module. Uninstall the MOD using AutoMOD then replace the MOD files with the ones in the zip file. Install with AutoMOD and at the end there will be a link to the install file, click on the link then on a few more buttons and the module will be installed and the cache purged.
Attachments
import_messages_1_0_2.zip
(159.21 KiB) Downloaded 786 times
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
Locked

Return to “[3.0.x] Convertors”