Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Blogger categories #234

Merged
merged 6 commits into from Jan 22, 2016

Conversation

@ScottIsAFool
Copy link
Member

@ScottIsAFool ScottIsAFool commented Dec 23, 2015

No description provided.

@martinwoodward
Copy link
Member

@martinwoodward martinwoodward commented Dec 23, 2015

Looks good - what's left?

@ScottIsAFool
Copy link
Member Author

@ScottIsAFool ScottIsAFool commented Dec 23, 2015

Not much, just
image

@kathweaver
Copy link
Contributor

@kathweaver kathweaver commented Dec 23, 2015

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 [WIP] Support Blogger categories Support Blogger categories Jan 14, 2016
@willduff
Copy link
Member

@willduff willduff commented Jan 14, 2016

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
Copy link
Member

@willduff willduff commented Jan 15, 2016

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

@kathweaver
Copy link
Contributor

@kathweaver kathweaver commented Jan 15, 2016

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

@kathweaver
Copy link
Contributor

@kathweaver kathweaver commented Jan 15, 2016

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

@kathweaver
Copy link
Contributor

@kathweaver kathweaver commented Jan 15, 2016

Having an issue with posting to Typepad.

Open Live Writer.txt

@willduff
Copy link
Member

@willduff willduff commented Jan 15, 2016

@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
Copy link
Member

@willduff willduff commented Jan 15, 2016

@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
Copy link
Member

@willduff willduff commented Jan 15, 2016

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!

@@ -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()

This comment has been minimized.

@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.

This comment has been minimized.

@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
Copy link
Member

@willduff willduff commented Jan 15, 2016

Found one more issue worth fixing before we take this.

@kathweaver
Copy link
Contributor

@kathweaver kathweaver commented Jan 15, 2016

@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
Copy link
Contributor

@kathweaver kathweaver commented Jan 15, 2016

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
Copy link
Contributor

@kathweaver kathweaver commented Jan 15, 2016

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
Copy link
Member Author

@ScottIsAFool ScottIsAFool commented Jan 20, 2016

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

@kathweaver
Copy link
Contributor

@kathweaver kathweaver commented Jan 20, 2016

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

@willduff
Copy link
Member

@willduff willduff commented Jan 22, 2016

Looks good to me! Will merge this in shortly.

@willduff willduff merged commit 5c83552 into OpenLiveWriter:master Jan 22, 2016
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@Indy27
Copy link

@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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants