I have a content type with a number of fields, some are set to filtered html, others to a custom added text format. When I export via XML the field values are always set to <format type="NULL"></format>, for all fields.

When I change this manually in the export file and then import it, the text format in the imported nodes is still not set.

Perhaps this is related to the problem in #1401764: No body after importing? I do have another default language configured (Dutch), but the content type is not multilingual-enabled. In any case, the text format should be exported and imported.

Comments

dpearcefl’s picture

Version: 7.x-3.0-rc4 » 7.x-3.0

Still happening.

mvaneck’s picture

Hi, I might have found a solution, based on different suggestions. It works for me.

1. Make sure you are using using the 'deprecated' relation export submodule from node export, on the source and destination site.
2. disable the CK editor in the destination site (this makes a BIG difference for the disappearing of the body content!)
3a. export nodes from the source site
3b. copy related images from the source to the destination site (usually in sites/default/files) - otherwise image links are broken
4. if you use relationships - additional fields such as a taxonomy field within a content type - find out what the corresponding names are in source and destination. Do this also for the taxonomy ID's.
5. edit the XML to suit the correct relations (for me I had to change the taxonomy field names into the correct new names (which are prefixed with field_. Also the Taxonomy ID's () may be different in the destination site. I use search/replace for this
6. import the XML (add content - node import - select file)
7. you should see no errors.
8. use phpmyadmin or similar to edit the contents of the table field_data_body. It is essential to check the field 'body_format'. In drupal 6 these are numbers, in 7 it is a varchar. I changed everyone into 'full_html' using the following query:

update field_data_body set body_format="full_html" where body_format="1"
update field_data_body set body_format="filtered_html" where body_format="2"

also, when importing nodes, although you configure NOT to save the User ID, somehow it stays within the destination node table. Therefore I manually changed them into user 1 (admin) using sql:

update node set uid=1 where type="*****"

where the stars is for example the node type "story". Be careful: in my case I had NO stories before the update. Maybe you should check for >= nodeid.

9. Now enable the ckeditor module in the destination site.
10. check the content in the destination site - it should now look OK.

Regarding the node export module: it does not work flawlessly - it took me many hours of trial and error before coming up with a working sequence.

Good Luck!

mrdrewkeller’s picture

Issue summary: View changes

I was having this same problem when using Node Export via features. I looked in the database and the fields were set to "filtered_hyml". I did a search and replace and sure enough all of my content now showed up. I searched the node export module for the string "hyml" and found nothing so I am not sure where this typo is occurring.