[Plugin: Yet Another Related Posts Plugin] pb with yarpp when accents in post (27 posts)

  1. didierjm
    Posted 7 years ago #

    Hi, just sent you 2 tweets, but in case, I duplicate here.

    If the posts contains accents on chars, when saving draft, there's an error and these chars are lost.

    Here's a pic of the error I get : http://twitpic.com/43izh

    I tested with the 2 latest versions, including 3.01.

    To test : create a ne post. Add éééé in post and title, click save draft.

    As per the msg, the problem seems to be with the cache ?


  2. Nehemoth
    Posted 7 years ago #

    Having the same problem.

    Special characters are change to another custom character.

    Accents & Characters as ñ are converted to ? in black.

    This problem appears first time in version 3.0

    Maybe has something to do with the new Cache option.

  3. Nehemoth
    Posted 7 years ago #

  4. Could either of you copy the error message you're getting into here rather than posting a photo? I really want to try to figure out the syntax error but I don't want to try to retype the query... :) Thanks!

  5. didierjm
    Posted 7 years ago #

    Hopefully, I could get access to the page source code... BTW I get the following chars first ����������, if title contains accents, it gets deleted (it's kept if no accents) and on 2nd save, chars become "????".

    Here's the Query

    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'duplicate key update date = now()' at line 18 for query insert into wp_yarpp_related_cache (reference_ID,ID,score) SELECT 1794, ID, (0+ (MATCH (post_content) AGAINST (' ')) * 3+ (MATCH (post_title) AGAINST (' ')) * 1+ COUNT( DISTINCT tagtax.term_taxonomy_id ) * 1+ COUNT( DISTINCT cattax.term_taxonomy_id ) * 1) as score
    from wp_posts
    left join wp_term_relationships as blockrel on (wp_posts.ID = blockrel.object_id)
    left join wp_term_taxonomy as blocktax using (term_taxonomy_id)
    left join wp_terms as blockterm on (blocktax.term_id = blockterm.term_id and blockterm.term_id in (68))
    left JOIN wp_term_relationships AS thistag ON (thistag.object_id = 1794 )
    left JOIN wp_term_relationships AS tagrel on (tagrel.term_taxonomy_id = thistag.term_taxonomy_id
    AND tagrel.object_id = wp_posts.ID)
    left JOIN wp_term_taxonomy AS tagtax ON ( tagrel.term_taxonomy_id = tagtax.term_taxonomy_id
    AND tagtax.taxonomy = 'post_tag')
    left JOIN wp_term_relationships AS thiscat ON (thiscat.object_id = 1794 )
    left JOIN wp_term_relationships AS catrel on (catrel.term_taxonomy_id = thiscat.term_taxonomy_id
    AND catrel.object_id = wp_posts.ID)
    left JOIN wp_term_taxonomy AS cattax ON ( catrel.term_taxonomy_id = cattax.term_taxonomy_id
    AND cattax.taxonomy = 'category')
    where (post_status IN ( 'publish', 'static' ) and ID != '1794') and post_password ='' and post_type IN ('post', 'page')
    group by id
    having score >= 2.5 and count(blockterm.term_id) = 0 and COUNT( DISTINCT tagtax.term_taxonomy_id ) >= 1 order by score desc limit 5 on duplicate key update date = now() made by include, do_meta_boxes, call_user_func, yarpp_metabox, yarpp_related, yarpp_cache_enforce

  6. Nehemoth
    Posted 7 years ago #

    The error is that Instead of the special characters as ñ, á é í ó ú appear this �

  7. Hi all—I've been unable to reproduce this issue. http://twitpic.com/44zdo

    When this problem happens, are you using the visual editor or the HTML editor? What other plugins are you using?

  8. chinasmack
    Posted 7 years ago #

    Visual and HTML editor both have same problem.

  9. chinasmack
    Posted 7 years ago #

    I just upgrade to 3.02. The problem is still the same.

  10. @didierjm, it looks like your issue is a separate one and I cannot reproduce it. It looks like your MySQL is saying that it doesn't like the "insert... on duplicate key" syntax, which was new in MySQL 4.1.0. If you could try to run that query in your MySQL directly and see what happens, that would be heplful.

    For everyone else... I still have yet to reproduce this accent-shifting issue. Could I get some information on what your setup is? What type of server? PHP version? MySQL version? Blog encoding (both what is in the Settings > Reading and in wp-config.php)?

  11. If any of you would like to try to reproduce it in my environment (in case I'm just doing it wrong) here's my test blog:

    user: test
    pass: test

  12. fbreve
    Posted 7 years ago #

    Mine is at a shared server from HostGator.
    Apache: 2.2.11
    CentOS: 5.3
    MySQL: 5.1.30
    Perl: 5.8.8
    PHP: 5.2.5
    ionCube Loader: 3.1.34
    Zend Optimizer: 3.3.3

  13. @fbreve - what settings do you use in Settings > Reading and wp-config.php for your encoding and collations?

  14. chinasmack
    Posted 7 years ago #

    Hi, I just try on your test blog and you are right that the problem does happen for you. I do not know why.

    I am using Dreamhost. PHP should be the newest version (5x?). I do now MySQL version, maybe "MySQL client version: 5.0.32"? Blog encoding is UTF-8.

    DO you think maybe there is conflict with other plugins?

    I use:

    ALl in One SEO
    Comments Vote
    Contact Form 7
    Featured Gallery Content
    Feedburner Feedsmith
    Get Recent Comments
    Google Analyticator
    Google XML Sitemaps
    Page Links To
    RSS Footer
    Subscribe To Comments
    TinyMCE Advanced
    WordPress.com Popular Posts
    WP-DB Manager
    WP PageNavi
    WP Greet Box
    WP Super Cache
    Yet Another Related Posts Plugin

  15. fbreve
    Posted 7 years ago #

    The other installed plugins are:

    AdSense Manager 3.2.13
    Advanced Excerpt 0.2.2
    Akismet 2.2.3
    All in One Adsense and YPN 1.82
    All in One SEO Pack 1.4.9
    Bad Behavior 2.0.26
    FD Feedburner Plugin 1.4
    FeedBurner Widget 1.2
    Get Recent Comments 2.0.6
    Global Translator 1.2.3
    Google Friend Connect Integration
    Google XML Sitemaps 3.1.2
    MyBlogLog Widget 2.0
    Popularity Contest 1.3b3
    Popularity Lists Widget 1.1
    SimpleTags 2.0
    Sociable 3.0.6
    Subscribe To Comments 2.1.2
    Thumbnail For Excerpts 1.3
    TimesToCome Stop Bot Registration 1.8
    Top Commentators Widget 1.1
    Viper's Video Quicktags 6.1.21
    WordPress.com Stats 1.3.8
    Wordpress Gravatars 2.7.1
    WP-HoneyPot v1.0

  16. fbreve
    Posted 7 years ago #



  17. I just tried adding the following plugins to my testblog (it's the plugins which both @fbreve and @chinasmack have):

    All in One SEO
    Get Recent Comments
    Google XML Sitemaps
    Subscribe to Comments

    and yet I still cannot reproduce the encoding issue...

  18. I finally reproduced the problem! The bugfix will be rolled into 3.0.3.

  19. fbreve
    Posted 7 years ago #


    Great! :)

    Thanks for this plugin and for your support.

  20. chinasmack
    Posted 7 years ago #

    What was the problem? Thank you so much for working so hard to find and fix the problem!

  21. The problem was that I was specifying utf8 for the transmission when inserting the keywords in the keyword cache table... and it was not being reverted. I made it so that it checks for DB_CHARSET and only sets the transmission charset if DB_CHARSET is set.

  22. 3.0.3 has been uploaded... waiting for wordpress.org to update its servers.

  23. didierjm
    Posted 7 years ago #

    Will test 3.03 anyway... ;-)

  24. didierjm
    Posted 7 years ago #

    BTW, thx for the hard work...

  25. Nehemoth
    Posted 7 years ago #


  26. Nehemoth
    Posted 7 years ago #

    Working like a charm here, tested yesyerday.


  27. didierjm
    Posted 7 years ago #

    I tested again with the last version... Indeed the pb with accents is corrected now. But I still have my same error msg.
    I then completely removed yarpp : deactivation + removal of 2 tables in MySQL DB + removal of 2 yarpp keys on the Posts table.
    I then tried to reactivate the plugin, so that it could setup it clean from scratch.
    I got the following error : http://twitpic.com/4hlgs
    Unfortunately I can't copy the code itself... to send it to you.
    The 2 tables and keys are indeed created, although the msg states there are errors... Here's the result for the 2 keys

    yarpp_title FULLTEXT 1 post_title
    yarpp_content FULLTEXT 1 post_content

    If I try to save the draft of a post (existing or new) I still get "my" previous error...

    Any clue ?

    PS: I had a big crash 15 days or so ago and had to restore the DB from scratch (the Posts table was locked). After that all my posts had trouble with special chars (accents...) and I had to declare UTF-8 for all tables as well as DB... I had the same error/problem before, but at least Yarpp worked...

Topic Closed

This topic has been closed to new replies.

About this Topic