I had to separate this from the long attachment issue because it has grown.

I tried latest git release. I compared phpbb posts table and drupal comment table.

Things are not working. There are issues at different levels:

_________________________________________________________

IMPORTING EVERYTHING EXCEPT ATTACHMENTS:

- dates are PERFECT. Spot on.

_________________________________________________________

IMPORTING ATTACHMENTS TOO:

1) creation date ("created" on d7, "post_time" on phpbb)
- on threads/posts without attachments is OK,
- on threads/posts with attachments is using the date/time of migration

2) last modified date ("changed" on d7, "post_edit_time" on phpbb):
- is always wrong.
a) All the migrated comments have the same "changed" time in the table. It's not the time of migration now (as previous versions did) but it's 1227214434, a date around 2008. All comments have that date under "changed".
b) All the migrated nodes have same modified time, all as above except on the node table this number is 1224326256. This date is written to all nodes in the table.
_____
I searched the original phpbb3 table for those dates, and I got zero results searching for modified date, but the first one it's the creation date of one post, not the first in the forum, it's just a random post in between the thousands.

Now I don't understand why the module is picking a date from a somewhat random post creation date and it writes to ALL posts as modified date, same goes for topics/nodes

Comments

JeremyFrench’s picture

Could you retest this. I couldn't reproduce, but I have refactored the code a bit so it should be better now.

Be aware that there are configuration options for the module now and it may not behave as it has previously in the 3 branch straight away with regards to admin users and deleted users.

challenge’s picture

I tried the latest dev release.
I started from clean db and I see this issue even with this new release.

All is still exactly as I wrote above. Even those timestamps it puts in the db to those columns are the same of your previous release, so I bet they are not random.

- front end side: what I see is that every post with attachment shows date of migration instead of the date it has in phpbb forum. So let say I ran migration one minute ago, on main forum page I see a lot of "Last post: 1 min ago". Opening the topic I see, if it has attachments, date of migration; if it hasn't attachments the post has the correct date, the same on phpbb forum.

- db side: all I wrote in the post above:

"CREATED" column, it overwrites the correct timestamps with timestamp of migration only on the rows of posts and topics with attachments. it doesn't edit the rows of the posts and topics without attachments.

"CHANGED" column, it overwrites the correct timestamps with one taken somewhat from phpbb3 db, this to the "changed" row of ALL posts and topics. so all the column has the same value. This means that all the posts/topics in the forum (with and without attachments) have all the same last modified date after attachment import.

___________________________-
BEFORE IMPORTING ATTACHMENTS TABLES NODE AND COMMENT ARE PERFECT, AFTER ATTACHMENT IMPORT IT HAPPENS WHAT I DESCRIBED.

so it's somehow writing created and changed columns of node and comment tables when importing attachments, it shouldn't touch those columns.

I can reproduce this every time I want even without starting from scratch:
after I get the wrong dates (after attachment import), I can rollback attachment import, then "rollback and import" topics and posts to rewrite the correct dates in the database.

JeremyFrench’s picture

Status: Active » Fixed

I used conditions rather than condition. So every row was being changed.

Fixed now.

challenge’s picture

Status: Fixed » Active

issue was partially solved.
You solved the issue I numbered as #2 on the first post. (modified date always wrong)

Issue number 1 is still there:

1) creation date ("created" on d7, "post_time" on phpbb)
- on threads/posts without attachments is OK,
- on threads/posts with attachments is using the date/time of migration
I can see this on DB.

This means posts/threads with attachments are out of order and they show the wrong date on frontend.

JeremyFrench’s picture

Status: Active » Fixed

Ah yes. I see. Yes I had only fixed number 2. Number 1 should now be fixed as well.

challenge’s picture

Great, now it's working fine.
Thanks!

But there is a new issue with attachments, see #1851072: Lost post text after importing attachments.

Status: Fixed » Closed (fixed)

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

challenge’s picture

Version: 7.x-3.x-dev » 7.x-3.0
Status: Closed (fixed) » Active

THis is happening with 7.x-3.0 release.

Migration imports avatars, forums, users, topics, posts and attachments, in order.

Until "posts" everything is OK (I'm speaking about comments dates/time).
When I import attachments the nodes and comments with attachments are edited and they get the timestamp of the migration, instead of keeping the original phpbb3 date. (they show "edited by admin at xx-xx-xxxx h--:--, time of migration)

If I rollback and reimport posts after having already imported attachments it gets fixed, but then some attachments are missing.

Need to give a check at what's really happening on database.
Or maybe check .git logs to understand when this reappeared...

IGNORE, problem is described at this link. (which I forgot about :D )
clicking import posts after full migration solved the issue. that link says it was a migrate bug, I see it has been fixed but still there.
don't know if I should close this for now as there is the workaround.
If everything in the migration will work as I want I'll write a step by step wiki.