Support Blogger categories #234

Merged
merged 6 commits into from Jan 22, 2016

Projects

None yet

6 participants

@ScottIsAFool
Member

No description provided.

@martinwoodward
Member

Looks good - what's left?

@ScottIsAFool
Member

Not much, just
image

@kathweaver
Contributor

So far, you haven't broken Typepad, and I am able to load categories from Blogger.

Yes, I've opened some test blog accounts

@willduff willduff changed the title from [WIP] Support Blogger categories to Support Blogger categories Jan 14, 2016
@willduff
Member

I tested the categories API call that Scott added against a Blogger blog hosted on the blogspot.se domain and another one hosted on a custom domain. Both blogs responded with a complete list of a categories in the expected JSON format - nice find Scott!

I posted a draft to my own Blogger blog that contained a new category in it. I noticed that if I then make a request to the categories API that Scott added, the new category from my draft isn't there. But it shows up as available in the Blogger.com dashboard as a known label for any blog post. This makes sense because the categories API that Scott added is a public URL, so revealing users' unpublished categories would be a privacy concern. But this means that saving a local draft and then reopening it later might lose categories. I confirmed I do loose categories this way, but that actually might be due to this second issue I'm hitting.

After closing Writer and then re-opening it, the categories list and the autocomplete in the UI isn't working anymore. I re-installed and I can reliably reproduce this - categories work great on first run but not thereafter. The first time I used categories, I got this nice drop down like this:
image

Now after restarting Writer I just see a refresh button, but when I click on it I don't see any HTTP requests in Fiddler:
image

I'll try and debug through this tomorrow.

@willduff
Member

I built the installer myself from source and now it's working fine...still looking.

@kathweaver
Contributor

Just downloaded and installed from the artifacts here, with no issues.

@kathweaver
Contributor

Posted a post to blogger (blogger domain), and added a category. Worked as expected.

@kathweaver
Contributor

Having an issue with posting to Typepad.

Open Live Writer.txt

@willduff
Member

@kathweaver What if you quit out of Open Live Writer and then launch it again and do another post. Does adding categories show the drop down?
image

@willduff
Member

@kathweaver Your TypePad issue seems to be a networking problem. For some reason TypePad.com is resolving as 192.168.1.254 for you, but that IP address range is private and will generally resolve to your home network.

From your log:

Network Connection Error - Error attempting to connect to blog at: http://www.typepad.com/services/xmlrpc
Unable to connect to the remote server
No connection could be made because the target machine actively refused it 192.168.1.254:8080

EDIT: Sounds like it might be your anti-virus or firewall. See this article: https://www.smartftp.com/support/kb/connection-refused-f58.html

@willduff
Member

Ah, figured it out! Scott's branch version is out of date, so I'm actually getting upgraded from 0.5.1.3 to 0.5.1.4 when I quit out of Writer. That won't matter when I merge this into master...which I'm going to do now!

@willduff willduff commented on an outdated diff Jan 15, 2016
...iveWriter.BlogClient/Clients/GoogleBloggerv3Client.cs
@@ -88,7 +88,7 @@ private static BlogPost ConvertToBlogPost(Post post)
Permalink = post.Url,
Contents = post.Content,
DatePublished = post.Published.Value,
- Keywords = string.Join(new string(LabelDelimiter,1), post.Labels ?? new List<string>())
+ Categories = post.Labels.Select(x => new BlogPostCategory(x)).ToArray()
@willduff
willduff Jan 15, 2016 Member

This needs to be post.Labels?.Select(x => new BlogPostCategory(x)).ToArray(). post.Labels can be null, so I'm getting a NullReferenceException on some posts when I go to File > Open recent post > Your Blog Name.

@willduff
willduff Jan 15, 2016 Member

@kathweaver If its not captured already, opening posts from the remote blog server would be good to add to the test plan. You can do this via File > Open recent post > Your Blog Name. Then you can browse through and select any post, and Writer will download the post from the blog server and open it as a local draft.

@willduff
Member

Found one more issue worth fixing before we take this.

@kathweaver
Contributor

@willduff Yes, that test plan is there: In my latest branch, I moved that under \testplan\testFile and in observeOpenDialogBox. It might be worthwhile to split things out further.

@kathweaver
Contributor

Never did figure out the TypePad issue. I rebooted, deleted everything related to Open File Writer and was able to post again. Didn't go back and pull and test this again as it got late.

@kathweaver
Contributor

I'm running to the same problem you are -- when I run the setup, I can edit the categories fine, but if I get in and out, I go back to the previous release -- I think I need to unselect auto updates.

@ScottIsAFool
Member

I've just fixed up a few potential ArgumentNullExceptions and updated the PR

@kathweaver
Contributor

Ran a few tests, and so far you haven't broken anything.

@willduff
Member

Looks good to me! Will merge this in shortly.

@willduff willduff merged commit 5c83552 into OpenLiveWriter:master Jan 22, 2016

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@Indy27
Indy27 commented Jan 22, 2016

I wonder is it possible to enlarge the drop-down box (height, not width), or make the box into two columns for easy scrolling?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment