function install_content_copy_import_from_file does not import anything on my fresh drupal 6.10 installation.

Error message :
The import data is not valid import text.

CommentFileSizeAuthor
#1 install_profile_api_content_copy.inc_.patch724 bytesniQo

Comments

niQo’s picture

StatusFileSize
new724 bytes

It seems a line is missing in the code: var $content is not set => eg. $content = ob_get_contents();

Here is a patch which use file_get_contents instead of "ob_" functions.

James Andres’s picture

The install_content_copy_import_from_file() function requires an opening PHP tag, <?php, at the top of each CCK export file.

I agree that this behaviour is a little strange, since install_views_ui_import_from_file() doesn't require an opening tag and install_node_export_import_from_file() doesn't require an opening tag.

The counter argument is that having an opening tag at the top of each ".inc" file is important for security. On a misconfigured apache installation the CCK/views/node_export dump would be viewable in the browser (given a direct URL to the dump file).

James Andres’s picture

Status: Active » Closed (works as designed)

Closing this, the issue appears to have died off or been resolved.

safani’s picture

This issue is not resolved I am having the same issue and I have no WYSIWYG editors enabled, I have also tried the php suggestion to no avail.