Title: Database errors on some feeds
Last modified: August 21, 2016

---

# Database errors on some feeds

 *  Resolved [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/)
 * I’m getting database errors on some feeds:
 * WordPress database error Incorrect string value: ‘\\xD7
    51 ro…’ for column ‘
   post_content’ at row 1 for query INSERT INTO `wp_posts` (`post_author`,`post_date`,`
   post_ date_gmt`,`post_content`,`post_content_filtered`,`post_title`,`post_excerpt`,`
   post_status`,`post_type`,`comment _status`,`ping_status`,`post_password`,`post_name`,`
   to_ping`,`pinged`,`post_modified`,`post_modified_gmt`,`post _parent`,`menu_order`,`
   guid`)
 * [http://wordpress.org/plugins/wp-rss-multi-importer/](http://wordpress.org/plugins/wp-rss-multi-importer/)

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279676)
 * It appears that it chokes on atom feeds.
 *  Plugin Author [Allen](https://wordpress.org/support/users/amweiss98/)
 * (@amweiss98)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279724)
 * what is the rss feed’s url where you think this is choking?
 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279740)
 * [http://feeds.feedburner.com/TheFirearmBlog?format=xml](http://feeds.feedburner.com/TheFirearmBlog?format=xml)
 * **_[Please repost that to a pastebin – that’s too much code to post on the forums–
   see: [http://codex.wordpress.org/Forum\_Welcome#Posting\_Code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)]_**
 *  Plugin Author [Allen](https://wordpress.org/support/users/amweiss98/)
 * (@amweiss98)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279765)
 * well, here is that feed running successfully on my public site (this is using
   the feed to post)
 * [http://www.wprssimporter.com/](http://www.wprssimporter.com/)
 * and here it is using the shortcode
 * [http://www.wprssimporter.com/mypage/](http://www.wprssimporter.com/mypage/)
 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279784)
 * Its random. Sometimes it works, sometimes it doesn’t.
 * It appears to be related to character encoding from what I can research so far.
 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279786)
 * I found a workaround:
 * ALTER TABLE wp_posts DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
 * One could say its a wordpress problem due to inadequate installation requirements
   or the plugin is not handling character sets properly.
 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279788)
 * Hmmm…that seemed to fix some of the errors. Do you check for dupes before posting?
 *  Plugin Author [Allen](https://wordpress.org/support/users/amweiss98/)
 * (@amweiss98)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279790)
 * if you’re using the feed to post, it checks for dupes using the permalink and
   title – if either of them are already in the database, it doesn’t enter the item
   again (some people make the mistake of putting an item into trash and thinking
   the item is gone, but wordpress keeps the item in the database until it is permanently
   deleted.
 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279799)
 * Okay. I think I found a feed that it breaks on consistently.
 * [http://betterbarbecueblog.com/feed/](http://betterbarbecueblog.com/feed/)
 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279800)
 * On that feed your escaping the ® html entity with \\xAE which causes the “WordPress
   database error Incorrect string value:”
 *  Plugin Author [Allen](https://wordpress.org/support/users/amweiss98/)
 * (@amweiss98)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279805)
 * as you said, I’m not a programmer, so since I’m not having any problem with that
   feed on my end..where precisely do you see this feed breaking….is there a specific
   feed item?
 * Actually, use this file which will solve the problem.
 * [https://dl.dropboxusercontent.com/u/3132388/pluginfiles/excerpt_functions.php](https://dl.dropboxusercontent.com/u/3132388/pluginfiles/excerpt_functions.php)
 *  Thread Starter [BuckShank](https://wordpress.org/support/users/buckshank/)
 * (@buckshank)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279806)
 * It causes mysql to reject post. You are having problems; it just depends what
   characters are in the feed. It still posts the the items that don’t fail. A log
   file should be implemented since this plugin works on a lot of different feeds.
   If one looks in their php error_log you will see the errors.
 * Here is a snippet from that same file:
 *     ```
       function CleanHTML($content,$thisLink){
   
                       $content=str_replace("&nbsp;&raquo;", "", $content);
       ```
   
 * There are already hacks in place to strip out characters. You would need these
   for every extened ASCII character for the rss import to posts to operate flawlessly.
   However, this turns the function into a “lossy” method; one loses information.
   Anyway, the loss probably would be acceptable if the post was actually transacted.
   In this particular case you lose all of the information because its never posted.
 * I’ve moved on to different plugin and will not be spending anymore time on this.
   Thanks for your time.
 *  [ByteEnable](https://wordpress.org/support/users/byteenable/)
 * (@byteenable)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279817)
 * This is a three part error problem.
 * 1. utf8mb4 characters are attempting to be inserted into mysql which mysql rejects
   because the column does not support the character set.
 * 2. Although not the exact cause of the problem; the my.cnf should have the proper
   character sets stated explicitly in the config file regardless of how you created
   the database.
 * 3. One must get rid of or translate the 4 byte utf8 characters. This code problem
   should be addressed in the core of wordpress.
 * Here is a link to some code that appears to have solved the problem.
 * [http://www.avidheap.org/2013/a-quick-way-to-normalize-a-utf8-string-when-your-mysql-database-is-not-utf8mb4](http://www.avidheap.org/2013/a-quick-way-to-normalize-a-utf8-string-when-your-mysql-database-is-not-utf8mb4)
 *  Plugin Author [Allen](https://wordpress.org/support/users/amweiss98/)
 * (@amweiss98)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279818)
 * you can do into excerpt_functions.php (line 247) and you’ll see different options
   to decode the html. Try using this one:
 *     ```
       $content=html_entity_decode(pre_esc_html($content), ENT_QUOTES,'UTF-8');
       ```
   

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Database errors on some feeds’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-rss-multi-importer_a9b8a0.svg)
 * [WP RSS Multi Importer](https://wordpress.org/plugins/wp-rss-multi-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-rss-multi-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-rss-multi-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-rss-multi-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-rss-multi-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-rss-multi-importer/reviews/)

 * 14 replies
 * 3 participants
 * Last reply from: [Allen](https://wordpress.org/support/users/amweiss98/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/database-errors-on-some-feeds/#post-4279818)
 * Status: resolved