Import_export patches for user errors (and extensions)

Since this is the second time this week someone had problems with the
import_export extension, I will post my patches.

Use them at your own risk, they have been tested only by Andrea F.,
Will G. and me. I won’t post them to the dev site until I have the
time to really look into them and clean 'em up.

Good luck,
Giovanni :slight_smile:

After closer inspection, it appears that the applied patches are causing
my page_attachments to be neither exported nor imported (probably
because they aren’t exported!).

Giovanni, since you added a priority field to the extension_meta table,
must I now assign a priority to each extension in order for them to be
processed at all?


Will G.

Find out why this email is 5 sentences or less at http://five.sentec.es/

Disregard this. I needed to alter
vendor/extensions/import_export/lib/exporter.rb, line 3, to specify
which models to export. After adding PageAttachment to the end of the
list (there has got to be a better, more Rails-esque way to do this),
my page_attachment records are now exported.

I have yet to try importing with this fix in place, though.

Will G. wrote:

After closer inspection, it appears that the applied patches are causing
my page_attachments to be neither exported nor imported (probably
because they aren’t exported!).

Giovanni, since you added a priority field to the extension_meta table,
must I now assign a priority to each extension in order for them to be
processed at all?


Will G.

Find out why this email is 5 sentences or less at http://five.sentec.es/

Import-Export exports only the default rails models. I didn’t change
that because the production version of my app has already lots of data
stored in the extensions tables and I don’t want to touch it when I
update (importing new version of pages, snippets and stuff).

2007/9/6, Will G. [email protected]:

IIRC, I left open a hook to add your own models. I didn’t put this hook
in page_attachments because I couldn’t be sure anyone was going to use
import_export. Also consider that import_export is half-baked, too.
I’m of a mind to rewrite it as Rake tasks with dependencies.

Sean

2007/9/6, Sean C. [email protected]:

I’m of a mind to rewrite it as Rake tasks with dependencies.

That would be great Sean.

Agreed! Sean, please be of a full mind! :wink:

I’d be happy to be a guinea pig.

Giovanni I. wrote:

2007/9/6, Sean C. [email protected]:

I’m of a mind to rewrite it as Rake tasks with dependencies.

That would be great Sean.


Will G.

Find out why this email is 5 sentences or less at http://five.sentec.es/