WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#15290 closed defect (bug) (fixed)

Blogger Importer plugin broken

Reported by: yorksranter Owned by:
Milestone: WordPress.org Priority: normal
Severity: critical Version: 3.0.4
Component: Import Keywords: needs-patch
Focuses: Cc:

Description

Blogger Importer plugin doesn't work. It successfully communicates with Google, the authorization appears to happen, but it then:

Makes 2 unsuccessful attempts to request the Blogger metafeed (error: getaddrinfo() failed).

Finally returns the metafeed, but with post counts of zero.

Sometimes one of my blogs has correct post counts but not the other - sometimes only one blog is detected. Either failure mode may happen, randomly, but it always fails. Problem appears to be in the parsing process.

Running on a Debian Linux server.

Change History (19)

comment:1 @PeteMall4 years ago

  • Keywords needs-patch added; plugin blogger import metafeed parsing removed

comment:2 @dd324 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #15560 The error and sporadic failures are due to HTTP/DNS requests failing. The Importer should be using the WP_HTTP class as to ensure reliability of the requests.

comment:3 @yorksranter4 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened
  • Summary changed from Blogger Importer plugin broken to Blogger Importer plugin STILL broken
  • Version changed from 3.0.1 to 3.0.4

Still broken in wp 3.0.4. Not a sporadic failure, never was, fails 100% of attempts.

I have been waiting to import posts for months.

Reopening ticket in hope that denial over this will end.

comment:4 @yorksranter4 years ago

(note that the alleged duplicate is irrelevant. it may produce dns errors, but it retries and eventually gets the metafeed. it then fails to *parse* it)

comment:5 @ocean904 years ago

  • Milestone set to WordPress.org
  • Summary changed from Blogger Importer plugin STILL broken to Blogger Importer plugin broken

comment:6 @yorksranter4 years ago

Any news?

comment:7 @yorksranter4 years ago

  • Version changed from 3.0.4 to 3.1.3

Still broken in 3.1.3 and Importer 0.4. Failure behaviour identical. I have been trying to import my blog for SEVEN MONTHS.

comment:8 @ocean904 years ago

  • Version changed from 3.1.3 to 3.0.4

comment:9 @dd324 years ago

  • Milestone WordPress.org deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

The problem here is a poor PHP installation on the server, PHP is unable to contact the Blogger servers, due to DNS issue with PHP. The only change that can be made here, is to use the WP_HTTP class, and even then, it's not guaranteed to work around every servers bad configurations.. just gives it a better chance at working around it (unlike what it presently has, a zero shot).

re-closing as a duplicate of #15560, as that's the only chance of fixing this.

comment:10 @yorksranter4 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

PHP is unable to contact the Blogger servers, due to DNS issue with PHP

I think it would help if you were to read the bug report.

1) It makes 2 efforts to contact Blogger, which return a DNS error. True so far.

2) BUT - key moment! - it then *succeeds* and returns correct post and comment counts for one of my two blogger blogs.

3) However, it returns zero posts and zero comments for the other. Which is the one I want to import. IF I WANTED TO IMPORT THE FIRST BLOG, I COULD.

This quite evidently has nothing whatsoever to do with DNS and everything to do with parsing. If it was a DNS issue, how could it possibly find out the post count for the first blog?

Coda: it's always 2 DNS errors. Always. If it was just a transient DNS problem, it might be zero, or one, or 15. But it's always precisely 2. If you can think of any plausible failure mode that would lead a DNS resolver to ignore the first two A record queries but then function normally, but only manifest itself for WordPress... It's always 2.

Reopening as the only chance of fixing this is a maintainer grasping the point that it is a parsing issue completely unconnected with DNS.

comment:11 @yorksranter4 years ago

  • Version changed from 3.0.4 to 3.2.1

comment:12 @yorksranter4 years ago

PS, it's possible to create a sentient life-form in the time it has so far taken to get this resolved.

comment:13 @dd324 years ago

  • Version changed from 3.2.1 to 3.0.4

it's possible to create a sentient life-form

Then please do so. Or provide a patch.

This bug remains a duplicate of #15560, The error message here is provided BY PHP, This is not just the importer randomly throwing its hands up, this is it saying "Hey, the plannet I lived in just broke in two.. I dont have anywhere to live now".

The best, and only resolution possible, is to switch to a more reliable HTTP transport functionality, which is what the above ticket is for.

As a possible work around, Import onto a server which doesn't exhibit the issues, and export to a WordPress WXR format export, and then import that into the server which is having the issue.

Also, I still fail to see how it fails to parse it, given the error message you keep giving is, literally, a DNS failure message.
My only thought pattern for your issue, is that it's randomly failing to connect, The blogger import process requires multiple HTTP requests to do it's job, if one is timing out due to network congestion, server speed or config, or a dodgy PHP install (they exist), then that'll bring the entire process to a halt.

I'm not re-closing this, as I know you'll only re-open it, which doesnt help anyone.

comment:14 @yorksranter4 years ago

  • Version changed from 3.0.4 to 3.2.1

You're really not getting this, are you?

Yes. It emits a DNS failure message. Then it retries. It does this exactly twice. On the third attempt, it successfully resolves the host name and downloads the Blogger metafeed. We know this because it returns data from it! Data that it can only know by resolving it!

But it only reads metadata from the first blog in the metafeed and the header of the second. After the header of the second, it returns crap. Not an error message - it just sets the counter to "0/ ".

If it was doing a GET per blog ID for metadata, it would only return ANYTHING for the first blog (if that one worked). Then nothing, or perhaps a DNS or HTTP error message.

But it doesn't. It returns correct metadata for the first blog, then wrong metadata for the second, and then fails silently.

Also, I see no reason for the version change. I'm running 3.2.1. I updated this morning.

Now, the branch in #14525 doesn't exhibit the problem. It gets the metafeed with all 6 blogs and correct counts, and it will even start to import content. It fucks up after the first 25 entries, but that's another problem.

Note that #14525 is a ticket about....inserting funny characters during the parsing process.

comment:15 @ocean904 years ago

  • Version changed from 3.2.1 to 3.0.4

The version field is used to track the earliest reported version which an issue affects.

Also, don't be a kid please.

comment:16 @yorksranter4 years ago

this diff seems to address the problem: http://core.trac.wordpress.org/attachment/ticket/14525/14525.diff

not much about dns errors there. the branch has its own problems (see #14525) but I think they will be solved.

comment:17 @SergeyBiryukov3 years ago

  • Milestone set to WordPress.org

comment:18 follow-up: @Workshopshed3 years ago

I'd be interested to know if the oAuth version has the DNS issues you mentioned?

See http://core.trac.wordpress.org/ticket/14525

comment:19 in reply to: ↑ 18 @yorksranter3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to Workshopshed:

I'd be interested to know if the oAuth version has the DNS issues you mentioned?

See http://core.trac.wordpress.org/ticket/14525

I have just used it and it works.

Note: See TracTickets for help on using tickets.