bolt / ImportWXR

[Bolt Extension] An Import filter for WXR files, as created by Wordpress or PivotX
MIT License
14 stars 5 forks source link

Importing content and preserving old IDs fails. #5

Open hansfn opened 9 years ago

hansfn commented 9 years ago

Running Bolt 2.1.5 and PHP 5.5.8 and Apache 2.4.7 (on Windows - local development env.)

Trying to import content and preserving content ("post_id: id" in importwxr.bolt.yml) causes a fatal error:

Bolt \ Exception \ StorageException Attempted to update a non-existent record

The relevant code:

        // Test that the record exists in the database
        $oldContent = $this->findContent($tablename, $content['id']);
        if (empty($oldContent)) {
            throw new StorageException('Attempted to update a non-existent record');
        }

This probably worked with an older version of Bolt.

bobdenotter commented 9 years ago

I'll look into this! Hans, do you have a recent .wxr file for me, i can use to test with?

hansfn commented 9 years ago

I have some files for you - from a real Wordpress site and from a PivotX test site. See https://www.dropbox.com/sh/ox4nit4kfsxy1ne/AABebV-Wu_YrdQpIlW9zjaGGa

albertofem commented 8 years ago

:+1: to this issue!