terrylinooo / githuber-md

Markdown editor plugin for WordPress.
GNU General Public License v3.0
604 stars 88 forks source link

MD Disappearing on save #331

Closed DuckyDisciple closed 8 months ago

DuckyDisciple commented 10 months ago

Any issue will be ignored if you don't provide the following detailed information.

Describe the bug

After saving the post, the MD content no longer shows, but is converted to html. I have to manually click the Convert button each time I visit the page.

To reproduce

Steps to reproduce the behavior:

  1. Save a post with MD
  2. When the page refreshes, the content is back to html instead of MD

Expected behavior

It used to be that when the content saved it would stay as MD. I'm not sure what has changed, but I expect that the content automatically changes back to MD when the page loads.

Screenshots

image

Server environment

User environment

Additional context

I have tried copying the data to a local setup as well and the same thing happens. I updated that plugin to the latest version and have the same issue.

DuckyDisciple commented 10 months ago

Update on this - it seems like this is only happening with custom post types. I can take the exact same content and paste it into a Post or into a custom post (which is enabled in the settings) and everything saves perfectly fine in the database. (Both have the MD in post_content_filtered and the html in post_content).

The problem is when I open a saved post, that content on the page is in MD format. When I open a custom post type, that content is in html format. I'm guessing there is a function somewhere that is hooked into a post loading and is supposed to swap the post_content and post_content_filtered, but is only doing it for the Post type instead of all supported CPTs.

github-actions[bot] commented 8 months ago

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] commented 8 months ago

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

mac2net commented 7 months ago

I had the same problem with a regular post type