I am using WP 3.4. My problem occurs when I attempt to copy and paste anything into the post or page editor of WordPress. The situation arises every time I save or attempt to preview the post. The post gets truncated and about 65% of the text gets chopped off the end of the post. This does not happen if I manually enter content into the text box and then preview or save it.
This works well on my other WP site but not this new install. I have used text editors to strip out formatting. I have also used the text editor copy and paste feature within WordPress but nothing works.
Hereâs some background. I first installed WordPress 3.4 through Bluehost. That’s when I discovered the problem. I then reinstalled WP through BlueHost. This did nothing to resolve the issue. I then downloaded WordPress and uploaded it to BlueHost but the problem still exists.
I tried using the 20/10 theme. Then I tried using the Genesis Framework theme. I also tried using the Genesis Framework with the Prose child theme. The problem would occur each and every time. I should note here that all plugins are turned off while attempting to create a post.
I did not link to the site as it is under construction and the only post available was manually entered into the text editor and saved which does not cause a problem.
Here is an example of what happens. I copy this text into the text box.
I have been involved in Local SEO long enough to remember my old friend the Local Business Center. This service offered free business listing similar to a local directory site. I thought what a great idea.
The fact that these listings were being featured by Google for local searches made them extremely useful. If your local website was having problems, ranking in the organic results this was a godsend.
In the early days just claiming or setting up a listing got your business onto the first page of the Google results. It was often a one and done situation for many small business owners.
With little or no effort, you could easily land on the first page of the Google results in most markets. Moreover, this wasnât always true for many websites trying to get onto Google results front page.
(for the full text see revision history)
This is what is left after I save or preview it.
“I have been involved in Local SEO long enough to remember my old friend the Local Business Center. This service offered free business listing similar to a local directory site. I thought what a great idea.
The fact that these listings were being featured by Google for local searches made them extremely useful. If your local website was having problems, ranking in the organic results this was a godsend.
In the early days just claiming or setting up a listing got your business onto the first page of the Google results. It was often a one and done situation for many small business owners.
With little or no effort, you could easily land on the first page of the Google results in most markets. Moreover, this wasn”
It also occurs with much smaller posts as well.
I have been working on this problem for about a week and could use any help available.
Your browser doesnât send the copied text UTF-8 encoded to the server. On the first character that isnât UTF-8 compatible, in your example the apostrophe â â â, the stream to the data base is broken and not recovered. Thatâs a browser issue.
If I had to guess â well, I have because you didnât mention it â I would say Internet Explorer.
There are two ways to fix that.
Get a better browser.
Make sure everything you try to save is UTF-8 compatible. And here is finally a chance to bring this issue on topic for our site. 🙂
You can filter
'wp_insert_post_data'
and prepare all the data. The following code should work as a plugin (not tested, it is just a prototype).I had the problem just as well, first Umlaut (or in other term: first non-ascii latin1-character aka first invalid unicode character) and things got truncated on save. I am on Firefox 15, not IE.
Root cause: Client requests require me to deliver latin1 and (hence?) work with a latin1 database (aka ISO-8559-1, let’s skip the subtleties).
Fixed in
wp-config.php
by:Before I did this, I converted my database to latin1 (exporting in phpmyadmin, a bunch of search and replace, re-import). I think, the latter doesn’t matter (though it makes sense to have), the first part does: Invalid unicode (aka latin1) does not like to travel accross a utf8 connection.
The problem is fixed. I had the location setting as UTC 7 for Arizona. When that was changed everything worked. WOW! Thanks for the help!