Unable to import CCK (content_copy_import)

niQo - March 7, 2009 - 16:27
Project:Install Profile API
Version:6.x-2.0
Component:CRUD functions and includes
Category:bug report
Priority:normal
Assigned:Unassigned
Status:by design
Description

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.

#1

niQo - March 7, 2009 - 16:39

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.

AttachmentSize
install_profile_api_content_copy.inc_.patch 724 bytes

#2

James Andres - March 11, 2009 - 16:37

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).

#3

James Andres - June 1, 2009 - 21:37
Status:active» by design

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

 
 

Drupal is a registered trademark of Dries Buytaert.