IPB

Welcome Guest ( Log In | Register )

Movable Type

We're moving to movabletype.org!

At long last, we're moving to forums powered by, well, Movable Type itself. You'll want to bookmark http://forums.movabletype.org/ for future reference, and in the meantime you can view these old forums as a read-only archive of past posts. Thanks for being part of the community!

 
Reply to this topicStart new topic
> How Does Comment Importing Work?
John Wiegley
post Jan 20 2009, 02:43 PM
Post #1





Group: Members
Posts: 1
Joined: 20-January 09
Member No.: 55,927



Hello, I'm looking at the code for ImportExport.pm, and it sets authored_on when it sees DATE:

CODE
                        } elsif ($key eq 'DATE') {
                            my $date = __PACKAGE__->_convert_date($val) or return;
                            $entry->authored_on($date);


However, the code specifically loads the entry it's looking for based on created_on, not authored_on:

CODE
                        my $ts = $entry->created_on;
                        $entry = MT::Entry->load({ created_on => $ts,
                            blog_id => $blog_id });


How could this ever work? It certainly doesn't for me (4.23-en), because it rightfully complains for every entry that it couldn't find any entry with timestamp '' -- since created_on is not set for a newly allocated entry.

Wondering, John
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 11.24.09 - 09:50 PM