Hi there, trying to import from my WP Blog.

When I try to use the login box I get the following error:
The file could not be uploaded, most likely because the file size exceeds the configured limit of 8 MB
There is nothing in the file upload box.

Also, when I try to use the upload file feature, I get:
Could not load WXR file - problems reported: Opening and ending tag mismatch: encoded line 157 and script at line 159 Opening and ending tag mismatch: item line 145 and code at line 161 Sequence ']]>' not allowed in content at line 167 Opening and ending tag mismatch: channel line 28 and content:encoded at line 167 Opening and ending tag mismatch: rss line 19 and item at line 207 Extra content at the end of the document at line 208

Any ideas?
Bryn

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

How big is the file? You can increase the limit by adding this to your .htaccess file:

php_value upload_max_filesize 256M
php_value post_max_size 256M

As for the error, that looks like a duplicate of #1055310: Could not load WXR file - mismatched tag due to embedded CDATA.

wizonesolutions’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
879 bytes

I've stepped into the code, and this is actually because of the following:

/**
 * Submit callback for the WordPress import form.
 */
function wordpress_migrate_import_form_submit($form, &$form_state) {
  if ($_FILES['files']['error']['wxr_file']) {
    form_set_error('wxr_file', t('The file could not be uploaded, most likely
      because the file size exceeds the configured limit of !filesize',
      array('!filesize' => format_size(file_upload_max_size()))));
    return;
  }

Basically, it's checking for an error with the file even if login credentials have been supplied.

Hmm, since I'm already in here, here's a shot at a patch. Untested, but it'll move us along.

wizonesolutions’s picture

Category: support » bug
Priority: Normal » Major

1. I verified that this patch works. Both import methods continue to function.

2. I've bumped this to major because in the current -dev release the domain + credentials-based method of retrieving the WXR file is completely inaccessible. I'd say that (relative to the module) that's major.

wizonesolutions’s picture

@mikeryan, have you seen this issue? I know you don't have time to fix everything - just curious as there have been other commits since.

dqd’s picture

let me try your patch!
thanks for your contribution wizonesolutions.

ptaff’s picture

subscribe; indeed, patch from comment #2 works

aacraig’s picture

The patch in #2 doesn't solve all of the problems for importing with credentials. The remaining code has quite a bit of issues, including not handling the file download (the downloaded file remains empty) and problems with the cookie file.

Included is a patch which addresses all of these issues (including the test which is fixed in the comment #2 patch).

I am currently importing a large (1.4 MB) xml file using the credentials option with the code contained in this patch, so I guess you can say it's tested :)

aacraig’s picture

I left behind a call to dpm() in the patch.

Here is a clean version without the debug output.

starapple’s picture

Has the patch been committed? I've tried today, Nov 14, to patch and Patch says "Reversed patch detected!" and "Hunk #1 failed at 18. Hunk #2 failed at 118".

Thanks.

joeshmoe123’s picture

Has the patch been committed? I've tried today, Nov 14, to patch and Patch says "Reversed patch detected!" and "Hunk #1 failed at 18. Hunk #2 failed at 118".

I'm having the same issue. If the patch has been applied I still have the same outcome as the OP.

finedesign’s picture

Same as #10 above on Nov 29.

stephnicolaou’s picture

Why hasn't this been solved, is anyone even working on this?

Which patch do I use out of the possible 3 uploaded and what are the steps use the patch with the wordpress migrate module!
I edited by php.ini file to allow 87GBs and it still told me that the limit weren't enough!

This error should have been a warning prior to downloading this module.

I'm new to Drupal and so far I'm not very impressed by all these bugs I'm finding.

mikeryan’s picture

Status: Needs review » Fixed

Committed the patch by wizonesolutions in #2, which appears to address the original issue directly. The other patches do not apply, and it's not clear to me what they were intended to do - please open a separate issue and make a clean patch for that.

Thanks.

Status: Fixed » Closed (fixed)

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