githuber-md icon indicating copy to clipboard operation
githuber-md copied to clipboard

Bug: Bulk editing posts converts markdown to HTML in post_content_filtered

Open viktorix opened this issue 6 years ago • 7 comments

Describe the bug

We had 40 posts, all with markdown, that was created by user1. I wanted to re-assign all 40 posts to user2. So I selected 40 posts, and used "Edit" dropdown option to make bulk edits. I selected user2, and hit save. I went inside a post to make some edits, but I realized that markdown for all 40 posts was converted to HTML.

I went into database and checked contents of post_content_filtered column, everything is HTML. There was no markdown left.

I repeated this with test posts. It happens every time. It doesn't matter what change is made to the posts. The bulk editing action converts markdown to HTML.

To reproduce

Steps to reproduce the behavior:

  1. Create a post with markdown, save as draft or publish, doesn't matter.
  2. Go to All Posts, select this post by ticking checkbox.
  3. In the dropdown, select "Edit" and click "Apply".
  4. Make a change, doesn't matter what. Assign to category, change author, etc.
  5. Click Save.
  6. Open your post again and check markdown textarea. It should be HTML now, no markdown.

Expected behavior

Performing bulk edits should not convert markdown to HTML.

Screenshots

image

Server environment

  • WordPress: 5.2.1
  • WP Githuber MD plugin version 1.11.4
  • PHP version 7.3.5

User environment

  • OS: Win 10
  • Browser: Chrome

Additional context

I think what might be happening, for some reason post_content overrides post_content_filtered when performing bulk edit.

viktorix avatar Jun 06 '19 14:06 viktorix

Thanks for your feedback. I will look into it.

terrylinooo avatar Jun 07 '19 13:06 terrylinooo

Same here, in my case what I did was to assign categories, and now I've realized everything is in html

kuworking avatar Sep 13 '19 12:09 kuworking

Same here, sorry for the spam :)

stuehmer avatar Apr 14 '20 18:04 stuehmer

This happens to me with DocPress posts in an unpredictable way. Whenever I go back to a post, sometimes it's in markdown and others in HTML. This wouldn't be such a big issue if not for #79 which augments the problem.

BeardScript avatar Jul 31 '20 12:07 BeardScript

This is still happening.

fireundubh avatar Jul 06 '21 14:07 fireundubh

I have the same problem. Does someone has any solution?

zszymczyk avatar Aug 31 '21 09:08 zszymczyk

I just made a pull request proposing to fix this issue. Kindly review and merge Terry.

hmaragy avatar Oct 24 '21 14:10 hmaragy

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 2 days.

github-actions[bot] avatar Jul 03 '23 00:07 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Jul 05 '23 00:07 github-actions[bot]