Major bug in worpress – code gets deleted or replaced with garbage.
-
As a software engineer, I blog about programming, so others can benefit from solutions and algorithms I have found. This requires that I paste source code (as text) for others to view.
I have tried all of the following:
...my source code
[code]
...my source code
[/code]…my source code
according to this article: https://en.support.wordpress.com/code/posting-source-code/ [code] should work.
It does work immediately after you hit Publish. But next time you edit the article, e.g. to fix a typo in the text (not in the code), it completely destroys the code in the code blocks at random. Then you fix it, publish it, it destroys a different code block. You fix that, publish it, it destroys the other one. Its a disaster - I have been trying for months to write a few simply articles with source code. I have given up.
I have contacted the support via the chat in the WordPress.com site. Each time, I sow them screen shots, show them the history which shows WordPress deleting or managing my source code text (it even deletes the <code></code> and [code][/code] tags randomly for no reason). They always say they will route it to the WordPress support staff, then nothing happens. It goes into a black hole. I dont get any emails from them (nothing in spam either).
It seems there is no way to raise a major bug to WordPress.com staff.
Additional notes:
1) I am editing via safari on Mac.
2) I rarely use the HTML editor, as it screws things up (yes I know you cant put specific HTML in there).
3) I conducted an experiment using the visual editor only. I created an article, put some simple java (not even HTML) source code in ablock (via thebutton on the UI. then published it. It formatted the code wrong, but you could read it. So all good. Then I fixed a typo in the text (not in the code), an published the updated version. WordPress deleted half my code, and removed theblocks. It also did many other changes, such as replacing "1.123" with "1.123"Basically, when you edit the republish, WordPress does some mangling which destroys even the simplest source code, with no work around.
The blog I need help with is: (visible only to logged in users)
-
-
As you cant edit posts, ill try to fix the formatting here:
As a software engineer, I blog about programming, so others can benefit from solutions and algorithms I have found. This requires that I paste source code (as text) for others to view.
I have tried all of the following:
<code> ...my source code </code>[code] ...my source code [/code]<pre> …my source code </pre>according to this article: https://en.support.wordpress.com/code/posting-source-code/
[code]</code> should work.It does work immediately after you hit Publish. But next time you edit the article, e.g. to fix a typo in the text (not in the code), it completely destroys the code in the code blocks at random. Then you fix it, publish it, it destroys a different code block. You fix that, publish it, it destroys the other one. Its a disaster - I have been trying for months to write a few simply articles with source code. I have given up.
I have contacted the support via the chat in the WordPress.com site. Each time, I sow them screen shots, show them the history which shows WordPress deleting or managing my source code text (it even deletes the<code><code></code></code> and <code>[code][/code] tags randomly for no reason). They always say they will route it to the WordPress support staff, then nothing happens. It goes into a black hole. I dont get any emails from them (nothing in spam either).
It seems there is no way to raise a major bug to WordPress.com staff.
Additional notes:
1) I am editing via safari on Mac.
2) I rarely use the HTML editor, as it screws things up (yes I know you cant put specific HTML in there).
3) I conducted an experiment using the visual editor only. I created an article, put some simple java (not even HTML) source code in a block (via the button on the UI. then published it. It formatted the code wrong, but you could read it. So all good. Then I fixed a typo in the text (not in the code), an published the updated version. WordPress deleted half my code, and removed the blocks. It also did many other changes, such as replacing "1.123" with"1.123456"Basically, when you edit the republish, WordPress does some mangling which destroys even the simplest source code, with no work around.
-
This seems to be more than a major bug. The lack of attention suggests the plan is to have people with blogs related to software more to an alternative platform.
Perhaps software blogs do not generate sufficient revenue on wordpress.com, so they are not really desired?
-
I just tried using the new blocks editor. It is the same – its completely broken for showing HTML in a code or any other block. Some blocks work, some don’t. If there are any html tags, it fails regardless of what type of block (including code blocks) you put it in.
Sadly, there is no way to upload images into this forum, to show the code in the editor and the random garbage which actually appears as a result.
- The topic ‘Major bug in worpress – code gets deleted or replaced with garbage.’ is closed to new replies.