Closed GoogleCodeExporter closed 9 years ago
I couldn't reproduce the problem, maybe we're doing different things. That's
what I tried:
Wordpress wp = new Wordpress("username",
"pass","http://www.blog.com/xmlrpc.php");
for (PageDefinition pageDefinition : wp.getPageList()) {
System.out.println(pageDefinition.getPage_title());
}
And I'm using the latest version of wordpress. Can you let me know if you're
doing something else, and what version of Wordpress you're using?
Original comment by can.bican@gmail.com
on 4 Dec 2010 at 10:19
That's exactly what I did. I suspect that there was something wrong with the
site I'm accessing. I have wordpress 3.00 installed on the site. The reason I
said that because I even tried the XmlRpcAPI using some other lib and gets the
same error... I can't call any data from Wordpress
Original comment by vnguyen972
on 4 Dec 2010 at 7:35
Did you make sure you allow xmlrpc requests via the wordpress admin interface?
Original comment by can.bican@gmail.com
on 4 Dec 2010 at 9:23
Hmmm... I am not sure... let me check.
Original comment by vnguyen972
on 4 Dec 2010 at 9:41
Okay, I saw that in the admin tool, under Writing settings... it was off so I
enable it but still got the same error why calling getPageList... Isn't that
setting only for Posting (writing) to the blog?
[Fatal Error] :83:154: Attribute "type" was already specified for element
"link".
What does it really mean? I googled the error and found nothing... apparently
no one has encountered it...
Original comment by vnguyen972
on 4 Dec 2010 at 9:46
Please quote your code, maybe you're overseeing a mistake, or I am.
Original comment by can.bican@gmail.com
on 4 Dec 2010 at 9:49
Here is my code, very basic test:
public static void main(String[] args) {
try {
Wordpress wp = new Wordpress("userName","password","http://www.bluelightpictures.com/");
List<PageDefinition> pages = wp.getPageList();
System.out.println("Here are the pages:");
for (PageDefinition pageDefinition : pages) {
System.out.println(pageDefinition.getPage_title());
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlRpcFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Original comment by vnguyen972
on 4 Dec 2010 at 10:49
Might it be that the url is http://www.bluelightpictures.com/xmlrpc.php and not
http://www.bluelightpictures.com/ only?
Original comment by can.bican@gmail.com
on 5 Dec 2010 at 9:12
That's it. I'm new to this so I didn't know about the URL to call :) Thanks.
I'm running into another issue, when I try to call wp.getPages(); It gives me
some warnings and No IDs to be printed. Not sure what it means... the code is
below the warnings:
Warning: value "15" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "115" is invalid for "page_id", setting it to "null"
Warning: value "4020" is invalid for "wp_page_order", setting it to "null"
Warning: value "15" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "93" is invalid for "page_id", setting it to "null"
Warning: value "4010" is invalid for "wp_page_order", setting it to "null"
Warning: value "15" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "82" is invalid for "page_id", setting it to "null"
Warning: value "6000" is invalid for "wp_page_order", setting it to "null"
Warning: value "0" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "34" is invalid for "page_id", setting it to "null"
Warning: value "2000" is invalid for "wp_page_order", setting it to "null"
Warning: value "0" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "30" is invalid for "page_id", setting it to "null"
Warning: value "3000" is invalid for "wp_page_order", setting it to "null"
Warning: value "0" is invalid for "wp_page_parent_id", setting it to "null"
public static void main(String[] args) {
try {
Wordpress wp = new Wordpress("userName",
"password","http://www.bluelightpictures.com/xmlrpc.php");
List<Page> pages = wp.getPages();
System.out.println("Here are the pages:");
for (Page page : pages) {
System.out.println(page.getTitle()+ ":" + page.getPage_id());
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (XmlRpcFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Original comment by vnguyen972
on 6 Dec 2010 at 12:57
Now we're talking about a bug :) I either didn't test fields that issued the
warnings or wordpress became more picky about their types. Anyway, I changed to
code to run without warnings and set correct values. Please check it from svn
and let me know if it works.
Thanks.
Original comment by can.bican@gmail.com
on 7 Dec 2010 at 9:37
Sorry if I sound like a n00b :) but what is svn? :)
Original comment by vnguyen972
on 7 Dec 2010 at 9:45
Svn is the way I store the code on googlecode. Contrary to downloading a
snapshot of my code from downloads, you can get the latest sources from there.
Have a click at it:
http://code.google.com/p/wordpress-java/source/checkout
If you're using eclipse or similar, you can easily find a plugin for using svn
with your IDE. I'm sorry but this text box is just not sufficient to explain it
all, so please see if you can make it - I don't know what OS you're using but
if it's OSX or Unix/Linux you can use it from command line, just one command in
the link I mentioned above:
svn checkout http://wordpress-java.googlecode.com/svn/trunk/ wordpress-java
Original comment by can.bican@gmail.com
on 7 Dec 2010 at 9:54
I'm using Eclipse on Windows ... okay, let me check that out... and see if I
could get it
Original comment by vnguyen972
on 7 Dec 2010 at 10:02
Oh and thank you!!! :)
Original comment by vnguyen972
on 7 Dec 2010 at 10:02
I'll be releasing precompiled packages from time to time, so stay tuned.
Original comment by can.bican@gmail.com
on 7 Dec 2010 at 10:06
Sorry the status says "fixed", but the bug still exists, as of what copy i
have..
It gives..
Warning: value "15" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "115" is invalid for "page_id", setting it to "null"
Warning: value "4020" is invalid for "wp_page_order", setting it to "null"
Warning: value "15" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "93" is invalid for "page_id", setting it to "null"
Warning: value "4010" is invalid for "wp_page_order", setting it to "null"
Warning: value "15" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "82" is invalid for "page_id", setting it to "null"
Warning: value "6000" is invalid for "wp_page_order", setting it to "null"
Warning: value "0" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "34" is invalid for "page_id", setting it to "null"
Warning: value "2000" is invalid for "wp_page_order", setting it to "null"
Warning: value "0" is invalid for "wp_page_parent_id", setting it to "null"
Warning: value "30" is invalid for "page_id", setting it to "null"
Warning: value "3000" is invalid for "wp_page_order", setting it to "null"
Warning: value "0" is invalid for "wp_page_parent_id", setting it to "null"
I am not able to retrieve the Page ID , which is very crucial, for other tasks,
like comments, edits, drafts...
Any other way to get Page ID's....?
Post ID's work fine..
Original comment by vipulnsw...@gmail.com
on 10 Feb 2011 at 3:55
Can you check that
1. You check out from svn, not download the files (I haven't released changes
yet)
2. You provide the correct url for xmlrpc.php
Original comment by can.bican@gmail.com
on 21 Feb 2011 at 12:35
I assume this is over by now.
Original comment by can.bican@gmail.com
on 27 Feb 2011 at 9:29
Issue 28 has been merged into this issue.
Original comment by c...@bican.net
on 11 Feb 2012 at 9:42
Original issue reported on code.google.com by
vnguyen972
on 3 Dec 2010 at 4:09