I have been looking at content_copy.module to manage several complex CCK types.

Turns out when you export a content type its "Display settings" are not exported and therefore cannot be imported.

This is a significant oversight, but I am not sure where to even get started fixing this...

Comments

dkruglyak’s picture

Status: Active » Needs review
StatusFileSize
new2.56 KB

I figured out how programmatic form submission works and made the fix...

This has been working very well locally, but of course others might want to give it a try before commiting.

__Tango’s picture

StatusFileSize
new4.21 KB

Unfortunately, the original patch created by dkruglyak will disregard the selected fields (e.g. it will always export and import all of the fields, even if one or more fields are not selected to be exported).

During the Drupalcon Boston Code Sprint, KarenS and I talked about this and she suggested a patch that was based on getting and setting the data directly from/into the database as opposed to using the macro mechanism.

New patch included.

__Tango’s picture

StatusFileSize
new4.2 KB

Patch #3. This one merely removes some spaces to comply with coding standards. This one obsoletes the two previous patches.

dynv’s picture

I'm having this issue as well.

yched’s picture

Status: Needs review » Reviewed & tested by the community

The patch work as expected. Nice job ! I'll commit this asap.

dkruglyak’s picture

Thanks for getting this done!

Do you think we could complete the fixing of import / export by moving output to standalone dump files, as discussed here:
http://drupal.org/node/128038#comment-527468

On another note, maybe it is time for a new CCK release? Perhaps it could be cut once Panels 2 integration is fixed:
http://drupal.org/node/203495

yched’s picture

Status: Reviewed & tested by the community » Fixed

committed a few hours ago, forgot to mark as fixed. Thanks __Tango !

Anonymous’s picture

Status: Fixed » Closed (fixed)

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