News:

Wondering if this will always be free?  See why free is better.

Main Menu

Converting from YaBB 2.2.3

Started by trepanne, October 04, 2008, 12:05:13 AM

Previous topic - Next topic

trepanne

OK, following sleepy's suggestion in this post, I first upgraded my YaBB2 RC forum to the current version (YaBB 2.2.3).  The upgrade seems to have gone fairly successfully.

Then I tried to convert the YaBB 2.2.3 forum to SMF.  This is not working.  It's failing with this error message:
Successful.
Converting membergroups... Unsuccessful!
This query:
DELETE FROM `forum`.permissions
WHERE id_group > 4;
Caused the error:

Table 'forum.permissions' doesn't exist


I'm using the convert.php file from this sticky post, and i'm using the yab22_to_smf.php file from this sticky post.

Thanks for helping!

AzJose

I used this one tonight on yabb 2.2.2 and worked barring a couple of minor issues.

This Message

Hopes this helps and hope the SMF guys don't mind me trying to help another user  :)

trepanne

Well thanks a lot AzJose; I certainly appreciate all the help I can get.

As it turns out, though, my problem was careless user error... I had blown away the DB & recreated it empty, so of course the code wasn't able to find the table it was looking for.

But I did use the file you pointed me to, and it successfully converted my forum.  Hooray!

However, the conversion process did not succeed in maintaining the attachments from the old site.  Anybody got a suggestion for how to fix that?

TIA

trepanne

It looks like the conversion process didn't copy over the attachment files, so I did that manually.  Still not working though.

As well, for posts that had been edited... both the original text and the edited text are deleted in the converted version.

SMF looks pretty jazzy; I'd like to get it up & running.  However, preserving fidelity of the post text and the attachments is about the highest priority I've got.

Any help would be much appreciated.

SleePy

Was there data in the attachments table?

Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

QuoteWas there data in the attachments table?
nope, a complete blank:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7306909
Server version: 5.0.33-log FreeBSD port: mysql-server-5.0.33

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use forum
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> select * from attachments;
Empty set (0.00 sec)



SleePy

Looks like that is our issue. It didn't even convert any attachments.

In your yabb files. In either Paths.pl or Variables/Paths.pl

Is there a line in there that has a "uploaddir" variable?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

QuoteIn your yabb files. In either Paths.pl or Variables/Paths.pl
Is there a line in there that has a "uploaddir" variable?

Yes, it's set to ~/web/public/forum/Attachments (but actually an absolute path that is correct, not a relative path).

SleePy

I am guessing that SMF is using the same path for attachments?

That would be the only explanation here.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

QuoteI am guessing that SMF is using the same path for attachments?
How would I verify?

Pretend that you're talking to a very slow child, and you won't be too far wrong...

SleePy

In the SMF database go to the smf_settings table.
Search for the variable "attachmentUploadDir".

Is that the same path as your yabb one?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

In the SMF database go to the smf_settings table.
Search for the variable "attachmentUploadDir".

Is that the same path as your yabb one?

No, it isn't. The path is set to ~/web/public/smf/attachments (i.e. the correct path).

SleePy

#12
I am at a lost here then. There should of been data converted then.

If you go to your SMF database.
There is a smf_convert table.

Search by type and see if there is any one that exists with "msg_attach".
I wonder if they didn't even get transferred over from the original conversion.

Edit, I think I possibly see the bug now. Give me a second to make the changes.

Edit2, Try the attached one.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

OK, I think we're getting somewhere.

Now the conversion process copies over a bunch of files into smf/attachments/ as you'd expect.  However, each file copied over is only 7.0K in size, and the original filename has been rewritten as something like
"1_d41d8cd98f00b204e9800998ecf8427e" (i.e. an incrementing index, then an underscore, then a hex hash, with no file extension).

I tried using diff on some of these files, and the ones I checked all were identical.  Examining the contents with cat, I see the desired filenames (along with some other metadata from PDF attachments) listed as data inside the files.

Does that help?

Thanks for the support, Sleepy.  Am I the only one using this converter?


SleePy

Well that is the encoded file name. SMF encodes the file name for protection and security. It shouldn't be putting any data into the files. It keeps that stored in the database.

I don't think you are the only one using this converter. Although the 2.2 converter for Yabb is fairly new so keep that in mind. I rewrote it totally and I did make a few mistakes it looks like with attachments. I didn't have any attachments or didn't see any attachments in the test board I had :P

Try this file if you don't mind. I hopefully found that bug that made them all the same file size. I wasn't getting the correct file name copied over so it was bugging out.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

All right sleepy, this is working, thanks.

Now I've got the actual files stored inside smf/attachments/, and browsing the forum, they are properly linked to their posts.  They can be downloaded & viewed correctly.  So far as I can tell, this functionality is now working.  Thanks!

There's another bug I can see, though.  In posts which have been modified after initial posting, the modifications aren't getting converted over to SMF; instead the posts are truncated where they were modified.  As well, it looks like posts which contain certain kinds of whitespace characters are getting truncated there too.

I've got posts where text has been cut&pasted from HTML documents; looks like SMF truncates right at the newline.

Any idea what might be causing this?  Thanks again.  I really do appreciate the help; what I've seen of SMF really makes me want to convert.

SleePy

Well that is odd.

In that sample text you sent me. One of those posts was edited right? I believe it was the 2nd or 3rd reply that was edited?

That seems odd though :|
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

QuoteIn that sample text you sent me. One of those posts was edited right? I believe it was the 2nd or 3rd reply that was edited?

I'm afraid you must have me confused with somebody else, because I haven't sent you any sample text.  Would it be helpful if I did so?

In addition to this "edited post" bug, I was also trying to figure out why the conversion process is truncating posts that contain newline characters cut&pasted from rendered web pages.

I tried cutting & pasting the offending text into a new post on SMF, and that was no problem.  It was just the conversion process that choked on this.

SleePy

Oh sorry that was. To many people :P

It would help to see a regular post then an edited post. I don't get what could of changed that caused this, but we could try and fix it.

As well the sample text for the site thing. The converter isn't touching any line endings, so I wonder if its just an issue how SMF is able to handle it since it didn't go through its cleanup functions that posts normally go through.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

trepanne

Sleepy,

I sent you a PM with some sample text that's getting mangled in conversion.

Thanks for the help!

Advertisement: