You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2014/06/02 03:33:01 UTC

[jira] [Closed] (ROL-1811) Windows Live Writer fail to do updates - solved

     [ https://issues.apache.org/jira/browse/ROL-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Glen Mazza closed ROL-1811.
---------------------------

    Resolution: Unresolved

Issue is over 5 years old and according to Dave, Roller is coded properly to the MetaWeblog API.  Unsure if newer versions of Windows Live Writer would still have this problem (I don't work with it and rarely work on Windows so wouldn't know.)  Closing, with the expectation that if any recent WLW users have this problem they will enter another JIRA. 

> Windows Live Writer fail to do updates - solved 
> ------------------------------------------------
>
>                 Key: ROL-1811
>                 URL: https://issues.apache.org/jira/browse/ROL-1811
>             Project: Apache Roller
>          Issue Type: Bug
>          Components: Web Services
>    Affects Versions: 4.0.1
>            Reporter: Steven Board
>            Assignee: Roller Unassigned
>            Priority: Minor
>   Original Estimate: 0.5h
>  Remaining Estimate: 0.5h
>
> Hi Guys, 
> I know you're aware that Windows Live Writer is unable to perform updates to roller blogs using the xml rpc, however I thought I would let you know why and how I fixed it locally incase you wanted to apply this fix to the next release of roller.
> The reason the update to blogs fails is actually due to the org.apache.roller.weblogger.webservices.xmlrpc.MetaWeblogAPIHandler.getCategories method actually having two bugs.
> The first is trivial and is the fact that you pass the userId to the MetaWeblogAPIHandler.createCategoryStruct(WeblogCategory category, String userid) method, rather than the blogId.  The createCategoryStruct method then incorrectly creates the rssUrl and htmlUrls.
> The second is the fact that the getCategories method does not comply with the MetaWeblog API.  The method you have created returns a Hashtable with the categories as keys with the values being another Hashtable as defined by the MetaWeblog API for the getCategories method.  The getCategories should just return the values from the currently returned Hashtable as a List.
> e.g. The getCategories method should be something like the below.
> 	public Object getCategories(String blogid, String userid, String password)
> 			throws Exception {
> 		mLogger
> 				.debug("STEVEN BAORD custom getCategories() Called =====[ SUPPORTED ]=====");
> 		mLogger.debug((new StringBuilder()).append("     BlogId: ").append(
> 				blogid).toString());
> 		mLogger.debug((new StringBuilder()).append("     UserId: ").append(
> 				userid).toString());
> 		Weblog website = validate(blogid, userid, password);
> 		Weblogger roller = WebloggerFactory.getWeblogger();
> 		try {
> 			WeblogManager weblogMgr = roller.getWeblogManager();
> 			List cats = weblogMgr.getWeblogCategories(website, false);
> 			ArrayList<Hashtable> result = new ArrayList<Hashtable>();
> 			WeblogCategory category;
> 			Iterator wbcItr = cats.iterator();
> 			while (wbcItr.hasNext()) {
> 				category = (WeblogCategory) wbcItr.next();
> 				result.add(createCategoryStruct(category, blogid));
> 			}
> 			return result;
> 		} catch (Exception e) {
> 			String msg = "ERROR in MetaWeblogAPIHandler.getCategories";
> 			mLogger.error(msg, e);
> 			throw new XmlRpcException(1000, msg);
> 		}
> 	}
> For anyone else wanting to fix this locally you also need to set the site.absoluteurl property in the roller_properties tables within the database to the url for your roller instance.  e.g. http://<your-domain>/roller.  This is to make sure that the rssUrl and httpUrl for the categories are correctly created with their full paths. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)