Hello,

I made a first attempt to convert my phpBB3 forum but I just have a problem with attachments.
The attachments are not imported.
I checked the box "Import files attached.

My forum is in the folder of Drupal: drupal/phpBB3

Can you tell me what is wrong or what am I doing wrong? Thank you very much

CommentFileSizeAuthor
#5 881124-5.patch1.09 KBroderik

Comments

naheemsays’s picture

if you look in the relevant database table (file/files table I think), are the attachments correctly listed there?

(Secondly, are your attachments in the place where drupal is looking for them?)

Clément’s picture

Thank you for your quick help!

I go and actually see files in the test file is listed:
uid: 1
fid: 272
filepath: files/2_c7704af88882e3be492b6985ef0431db

Normally files are stored here: sites/site-1.tld/files / and not files /

Now if I see the attachments of the subject, there is none.

What should I do? Or should I place the file 2_c7704af88882e3be492b6985ef0431db?

Thank you in advance ;)

Clément’s picture

I redo a test. What I found as a result in the database :
In files :

  • fid : 272
  • uid : 1
  • filepath : files/2_8073644f9ce2598d6dada3375c9cf979

In upload :

  • fid : 272
  • nid : 88
  • vid : 88

I did a test but it does not work:

I renamed my file: sites/site-1.tld/files/forum/2_8073644f9ce2598d6dada3375c9cf979.jpg

And I put the file in this directory: sites/site-1.tld/files/forum/2_8073644f9ce2598d6dada3375c9cf979.jpg

---- EDIT ----
I just found the problem.
By inserting a file, I found the error in upload.

I changed in the upload and walk with the first test:
In upload :

  • fid : 272
  • nid : 88
  • vid : 298

Now I have over 200 files so I will not be able to do it manually. Do you have a solution to this problem? Thank you very much.

Clément’s picture

I just solve part of the problem:

A line 664 of phpbb2drupal.module:

          db_query("INSERT INTO {upload} (fid, nid, vid, description, list, weight) VALUES (%d, %d, %d, '%s', %d, %d)", $fid, $node->nid, $node->nid, substr($file->real_filename, 0, 255), 1, $file->attach_id);

Replaced by:

          db_query("INSERT INTO {upload} (fid, nid, vid, description, list, weight) VALUES (%d, %d, %d, '%s', %d, %d)", $fid, $node->nid, $node->vid, substr($file->real_filename, 0, 255), 1, $file->attach_id);

Now the picture is listed in the node. I'll still make some small changes. I'm really happy!

roderik’s picture

Version: 6.x-1.5 » 6.x-2.1
Status: Active » Reviewed & tested by the community
StatusFileSize
new1.09 KB

Obvious little mistake. I hope you don't mind me treating #4 as like it was "needs review", which I'm now setting to "reviewed".

naheemsays’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.