Common Multiple Import Plugin errors

by Nicholas on June 27, 2009

in Web Application Development

Multiple Import is a plugin written by Michael Ha, who is a colleague of mine.  This plugin allows the admin to import multiple blogs from the same server to one specific blog.  Because this plugin can import all the blogs linked to the server, it is important to limit the permission to use this plugin to specific blogs.

The plugin does the following:

  1. Takes the file that you uploaded.
  2. Reads through all the url’s in the file and compares to all the url’s in the server.
  3. Requests confirmation on the blogs it is about to upload.
  4. Goes through each option and import only the posts/pages with specific tags.
  5. Uploads all the files attached as well if selected.

There were many problems with privacy issues while uploading the file, because of the nature of this problem, it is difficult to pin down one solution, most solutions can be found easily online.

After the file can be uploaded, there might be errors about cookie sessions such as:

Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/portfolio/wordpress/wp-admin/admin-header.php:103) in /home/portfolio/wordpress/wp-content/plugins/multipleimport/multipleimportform.php on line 66

Many solutions online suggest to take out the white spaces and white lines in the files it complains about and the wp-admin.php file.  However, this didn’t solve the problem because the problem resides in the cookie session not starting soon enough.  (However, the white spaces and white lines have to be taken care of also if there exist any in specified files, refer to online resources for more details).  The session has to start before any of the objects are displayed on the webpage; therefore, the line “session_start();” has to be placed right after <?php on line 2 in the file ‘wordpress/wp-admin/includes/template.php’ .  This will start a cookie session before any of the objects are displayed and will solve the “headers already sent” problems.

I am not sure if there are side effects in keeping the “session_start();” in the template.php but I have not had any problems related to it.  I assume there will be a lot of cookie’s added to the visitor’s browsers but no lethal side effects.

There are still warnings when importing the blog and it seems to happen only with new blogs:

Warning: Invalid argument supplied for foreach() in /home/portfolio/wordpress/wp-content/plugins/multipleimport/beginimport.php on line 58
Checking page About

This warning seem to only affect empty blogs or blogs that have no new content in them, I am still currently trying to troubleshoot this problem.

I know Michael didn’t leave any methods to reach him or contact him on the official Wordpress site, but if you leave me a comment here, I can try my best to help you out.

This article was written for the Faculty of Education at the University of British Columbia and cannot be copied, modified, or published without the consent of the University.

Leave a Comment