Medium / medium-wordpress-plugin

The official WordPress plugin for cross-posting to Medium.
https://medium.com
Apache License 2.0
210 stars 40 forks source link

Editing an article publishes the edit as a new Medium article #17

Closed DanielGenser closed 8 years ago

DanielGenser commented 8 years ago

Each edit of a published WordPress article with crossposting turns on, publishes a new instance of the article on Medium.

frankiejarrett commented 8 years ago

This bug is happening for me too. I think the expected behavior is that updating a WordPress post should also just update the existing Medium post that was cross-posted, not create a new one.

majelbstoat commented 8 years ago

The expected behaviour is that no further edits take effect. The actions box in the top right should change to this after the first successful cross post:

screenshot 2015-10-08 13 08 35

Which happens for me. Is that not happening?

DanielGenser commented 8 years ago

No, I don't see that state. For me, it stays in the state it was before publishing my WP article the first time.

On Thursday, October 8, 2015, Jamie Talbot notifications@github.com wrote:

The expected behaviour is that no further edits take effect. The actions box in the top right should change to this after the first successful cross post:

[image: screenshot 2015-10-08 13 08 35] https://cloud.githubusercontent.com/assets/425787/10378426/b5366a06-6dbd-11e5-92cb-e2e87888ff7b.png

Which happens for me. Is that not happening?

— Reply to this email directly or view it on GitHub https://github.com/Medium/medium-wordpress-plugin/issues/17#issuecomment-146671966 .

Daniel Genser email: daniel.genser@gmail.com skype: DanielGenser mobile: 0682198238

frankiejarrett commented 8 years ago

@majelbstoat Yes, I do see that in the Medium metabox.

The problem is that when you update the WordPress post that has already been cross-posted to Medium it creates a new public post on Medium, and ignores the original visibility setting.

So I guess the expected behavior would be to do nothing when updating the post in WP if it's already been cross-posted to Medium. Although a better expectation IMO would be to update the Medium post with the latest changes :smiley:

  1. I cross-posted "Hello world" as Unlisted.
  2. It was cross-posted to Medium.
  3. I add a paragraph to the "Hello world" post in WordPress and click update.
  4. Another post gets created in Medium as public.
screen shot 2015-10-08 at 3 16 17 pm screen shot 2015-10-08 at 3 12 03 pm screen shot 2015-10-08 at 3 21 51 pm screen shot 2015-10-08 at 3 12 07 pm
majelbstoat commented 8 years ago

Ok, that's an important and bad bug, which I'll fix. Sorry for that :/

frankiejarrett commented 8 years ago

@majelbstoat No worries, thanks!

DanielGenser commented 8 years ago

This is what I see when on the Edit Post screen of an already published (to both WP and Medium) article.

screenshot 2015-10-08 22 52 52
majelbstoat commented 8 years ago

If you're able, can you dump the post meta 'medium' key for that post?

DanielGenser commented 8 years ago

Interesting – so I just made another edit to the same post, and now it triggered the expected state on the Edit Post page: https://www.dropbox.com/s/9a7eutkb4n1z41k/Screenshot%202015-10-09%2001.44.16.png?dl=0

However, a new issue is that this resulted in multiple “Also Published on Medium” items at the top of my post (in addition to the expected one at the bottom of my post): https://www.dropbox.com/s/xyiqzte281q550j/Screenshot%202015-10-09%2001.44.57.png?dl=0

The actual post URL is http://myhomeisthesea.com/multitude/

DanielGenser commented 8 years ago

I now made yet another edit to this post, to see what would happen, and the Edit Post page stayed in the expected state again, however on the actual post, the “Also Published on Medium” items are completely gone (even the expected one at the bottom of my post).

majelbstoat commented 8 years ago

Wow, all that is completed unexpected :/ The "Also published on Medium" is added once to each post that had cross_link set to true at the time of publish in the_content() - I guess there's a chance I'm not scoping the global post correctly. Something must be corrupting the post meta. Digging in on this further, but I haven't been able to repro even once :(