Ticket #7652 (accepted enhancement)
Merge all atom parsers
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | AtomPub | Version: | |
| Severity: | normal | Keywords: | has-patch needs-review gci westi-likes |
| Cc: | ron@…, westi, mcepl, kpayne@… |
Description
Currently we have two Atom Parsers. One for the Blogger Importer and one for our APP implementation.
We need to only have one!
Attachments
Change History
-
attachment
merge-atomlibs.diff
added
- Keywords has-patch needs testing added
- Status changed from new to assigned
That is very rough and needs some testing.
- Keywords needs-patch added; has-patch removed
TODOs:
- Change AtomLib so that parse can be passed the xml.
- Change the Blogger importer to use a single AtomParser for the whole feed and iterate over the parsed Entries.
comment:4
jacobsantos — 4 years ago
- Type changed from defect to enhancement
- Milestone changed from 2.7 to 2.8
- Keywords needs testing removed
- Component changed from General to AtomPub
- Milestone changed from 2.9 to Future Release
just for reference, there was some discussion about using simplepie for this one in IRC
see #10147
see also #7644
see also #9524
comment:11
westi — 3 years ago
comment:12
rmccue — 18 months ago
- Owner changed from westi to rmccue
Taking this for Google Code-In.
I think I'll take the SimplePie route for this, as I have the most experience with it, and I think it's a natural match.
comment:13
rmccue — 18 months ago
One thing I don't like about this patch is the hack to get it to work with SimplePie. SP expects a normal, Atom syndication feed (with the top-level element being feed), while this is AtomPub. The str_replace hack should work, but there's probably a better way to do it.
-
attachment
7652-wpapp.diff
added
All of AtomParser converted to SimplePie in wp-app.php
comment:14
westi — 18 months ago
- Cc westi added
- Keywords needs-patch, gci added; needs-patch removed
This is looking good.
Did you manage to get APE working enough to test this out?
Well done :-)
comment:15
rmccue — 18 months ago
- Keywords needs-patch added; needs-patch, removed
Using the override, I was able to, however, it appears Ape doesn't use the credentials you pass to it. I'll see about fixing this bug in Ape (my Ruby is rather poor), but I doubt they accept patches often.
I'd still like to move this into the unit testing and rewrite the tests in PHP (which should be easy), but that's out-of-scope for this task/bug.
As for the importers, these have now been spun off into their respective plugins, so I'll be taking a look at these next.
comment:16
rmccue — 18 months ago
Regarding Ape results, the warnings generated are:
- Summary changes - WP adds the "Read more" link. This is normal.
- Content changes - Content is trimmed. I believe this is also normal behaviour.
- "Server discarded foreign markup" - Not sure on this one.
- Slug doesn't match - Normal for non-rewritten permalinks
- "Published entry retains dangerous hyperlink: 'javascript:evil'." - kses problem?
- "Pictures apparently not in collection" - Did not touch this code, so should be fine.
comment:17
rmccue — 18 months ago
- Keywords has-patch needs-review added; needs-patch removed
This patch converts the Blogger Importer to use SimplePie, and I believe it completes this ticket. Still existing, but out-of-scope for this task are #4555, #7644 and #7543.
One part of this that will need to be tested is the timestamp handling. I'm not entirely sure I nailed that down fully in this importer, and I may have missed something (especially if the timezones from the imported blog and the WP blog don't match).
Due to the impracticality of writing unit tests for these (as doing so would require access to Blogger's servers), the only testing that can be done is manual testing. Unit testing may be possible for the Atom API, and I'll investigate that in the next day until my deadline expires. If I haven't completed that, I'll file a new issue for it. :)
-
attachment
7652-separate.diff
added
Separate WP_SimplePieAtomPub_Item into class-feed.php
comment:20
westi — 14 months ago
- Keywords westi-likes added; 3.2-early removed
There is great work on this ticket but it is going to need a fair chunk of testing so I don't think we should try and merge it in the 3.2 cycle - if I get time I will look at merging the Blogger importer changes into the plugin though
comment:21
kurtpayne — 3 months ago
- Cc kpayne@… added
Refreshed rmccue's patched for 3.4 and ran Gorilla against it. Looks like everything passed.
C:\Gorilla\bin>gorilla --user=admin --pass=******** --uri=http://127.0.0.1/wordpress-trunk/wp-app.php ServiceDocumentTest
Gorilla is beginning testing on http://127.0.0.1/wordpress-trunk/wp-app.php...
testServiceDocumentExists with data set #0
------------------------------------------
[info] Service document found
[result] success
testCollectionsExist with data set #0
-------------------------------------
[info] Collections found:
Test Blog Posts accepts application/atom+xml;type=entry
Test Blog Media accepts image/*, audio/*, video/*
[result] success
testHasJPEGCollection with data set #0
--------------------------------------
[info] JPEG collections found:
Test Blog Media
[result] success
C:\Gorilla\bin>gorilla --user=admin --pass=******** --uri=http://127.0.0.1/wordpress-trunk/wp-app.php EntryPostsTest
Gorilla is beginning testing on http://127.0.0.1/wordpress-trunk/wp-app.php...
testListPosts
-------------
[info] Post collections found:
Test Blog Posts
[info] Using Test Blog Posts at http://127.0.0.1/wordpress-trunk/wp-app.php/posts
[info] Checking current
[result] success
testSparsePost
--------------
[info] Testing basics
[info] Posting of new entry reported success, location: http://127.0.0.1/wordpress-trunk/wp-app.php/post/1802
[result] success
testPostFromTemplate with data set #0
-------------------------------------
[info] Creating from Gorilla/lib/tests/data/posts/example-1.xml
[info] Posting of new entry reported success, location: http://127.0.0.1/wordpress-trunk/wp-app.php/post/1804
[info] Examining the new entry as returned in the POST response
[info] Slug was used in server-generated URI
[info] Checking at the new location
[result] success
comment:22
Workshopshed — 7 days ago
So did WP_SimplePieAtomPub_Item make it into the latest 3.4 builds as I don't see it.

First pass. Rip it out of the blogger importer and use atomlib, add the extra tag to atomlib