• Resolved keithp

    (@keithp)


    Hi,

    First of all, I think thisis a great plugin. The features are outstanding.

    But, everytime i have a schedule fetch, at times, itwill repost an article on my site that was posted by Wpematico during the last fetch.

    one time, I had the article sho up on my site, 7 times.

    How can I fix this

    At first, i had the fetch set up at any, because I wanted to fetch as soon the rss feeds updated, but i changd it to an hour.

    Is here any way I can fetch every 5 minutes without wpematico fetching the same article they posted on my site 5 minutes ago?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • Does it have a single quote in the title? If so, go to the wpematico_dojob file, isDuplicate function, under the line that says –
    $title = $item->get_title();
    put
    $title2 = str_replace(“‘”,”””,$title);
    and in the query below it, change $title to $title2

    had the same issue

    Nice find gdaddy. Been banging my head on this problem all day, should’ve looked here first.

    This shows that SQL injection is possible, and the plugin is probably vulnerable in other places. Maybe a better choice if you’re using MySQL:

    $title2 = mysql_real_escape_string($title);

    I tried the fix above and it seems to be working for titles with single quotes in it.

    However, it still posts duplicates if it contains a colon now.

    amplifiedshock: Which fix: str_replace() or mysql_real_escape_string()?

    I’m running with mysql_real_escape_string() and two titles yesterday had colons without a duplicate problem.

    Are the titles identical, or is there a subtle difference, such as spaces or what is at the end of the title?

    And I have a correction… WP has a function which is already being used elsewhere in the code to clean up incoming strings. This seems to be what is needed:

    $title2 = $wpdb->escape($title);

    And then replace $title in the following line with $title2.

    You were right, it seems like there WAS a tiny difference in the title of the duplicate article!

    I guess mysql_real_escape_string() was working perfectly. I’ll test your latest correction now.

    Hey guys, any idea how to stop duplication of titles with the character = &

    Thanks in advance

    same issue.. thanks folks for the fix. did pretty much as RoamFree suggested but just amended that line to:
    $title = $wpdb->escape($item->get_title());
    to save editing the query.

    thanks again folks.. saved me lots of messing about to figure it out myself!

    Plugin Author etruel

    (@etruel)

    thanks, this fix come in next version.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: WPeMatico] I keep getting duplicate content during every fetch’ is closed to new replies.