[wp-trac] [WordPress Trac] #14525: Blogger importer prepends ">" to all content
WordPress Trac
wp-trac at lists.automattic.com
Thu May 24 09:23:49 UTC 2012
#14525: Blogger importer prepends ">" to all content
------------------------------------+----------------------------
Reporter: mdawaffe | Owner: Otto42
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: WordPress.org
Component: Import | Version:
Severity: major | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+----------------------------
Comment (by Workshopshed):
Thanks Ryan, I'll go through the code with a find and replace swaping over
the pies.
I saw another thread about the issues with unit testing things like
importers. This issue with this particular importer (I've not looked at
the others) is that there is tight coupling between the UI code, blog
reading, processing and storage. For example...
{{{
#!php
function show_blogs($iter = 0)
{
if (empty($this->blogs))
{
$xml =
$this->oauth_get('https://www.blogger.com/feeds/default/blogs');
}}}
could instead be more like
{{{
#!php
function show_blogs($iter = 0)
{
if (empty($this->blogs))
{
$this->blogs = $this->importer->getbloglist();
}}}
We could then set "importer" to be a mock object that does not need to
talk to blogger at all. And on the flip side, we could test the importing
without the need for the UI.
The changes to incorporate SimplePie have moved us slighty more towards
this approach but it would need a lot of effort to make it so that it
could be easily unit tested. Unfortunately that's a little more of a
commitment to the importer than I'd like to make. I do plan to incorporate
image migration (as none of the other tools do that very well) and
something for processing of internal links. I've already put in place some
processing for the GeoTags but that needs a little work as I spotted that
there are some get_latitute etc methods to use.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14525#comment:28>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list