• Hi,

    Like many people using this plugin, I am having the Autopost issue where only some of the feed items are being published to main database.

    Did some (ok alot!) testing and this is what I came up with…

    In import_posts.php

    Line 594 comment out
    Lines 611 and 612 change $thislink to $items["mylink"]

    Now I am getting the feed items published.

    Am not a php expert. If you decide to try out this modification, advise that you run it in a test environment first.

    Hope it works for you.

    PS: I would like move the rssmi_delete_posts() out of import_posts.php so that the import cron job can finish more quickly. Prefer to put it in a separate cron job. If someone has done this already, would love to hear some feedback (and copy your code…). Thanks.

    Pete

    https://www.ads-software.com/plugins/wp-rss-multi-importer/

Viewing 15 replies - 1 through 15 (of 19 total)
  • I will try this. If it works, Allen should give the rights to the program to you.

    Hi

    It should be noted that if you remove the “comment” (you mean instruction) for line 594, then lines 611 and 612 become 610 and 611 respectively.

    Ok. I just made those changes, and installed import_posts

    LET SEE WHAT HAPPENS! I hope it works.

    I tried it, but no real difference so far

    Thread Starter peteduignan

    (@peteduignan)

    Suggest you add some echo statements to see what is actually happening.

    My apologies. Forgot to mention…

    I commented out these lines
    ‘if($feedlimit>$maxposts) continue;’
    and
    ‘if ($total>$maxperfetch) break;’

    because for now I am more interested in getting the EVERY NEW feed item posted, than worrying about how many are being posted each time the program runs.

    In addition to that, I made another change for the reason below so that when I do go back to checking on total new posts, it will be correct.

    I moved this line
    ‘$total = $total +1;’
    under
    ‘if ((empty( $mypostids ) && $mypostids !== false) ){‘
    because if the post already exists then I want to keep going down the array until it finds one that doesn’t exist. THEN I want to increment the total.

    Hope I am making sense!

    Pete

    So what do you think is the problem? Too many posts? not enough memory?

    Thread Starter peteduignan

    (@peteduignan)

    I think there are thousands of scenarios since everyone is running this plugin with different plugin options settings, different hardware, software, RSS feeds etc.

    One scenario many people seem to have in common is that they are not getting all their feed items published into the main database.

    This is a great plugin and quite complex. However like any piece of software there are always areas to improve.

    Actually there are (I believe) a few areas to fix.

    Import_feeds.php
    The totaling of items is happening before the fresh check and before checking if the feed item already exists. I believe it should only increment the total if a new feed item is created.

    Import_posts.php
    The totaling of items is happening before checking if the post already exists. I believe it needs to move to after checking $mypostids. There is also a problem with the trim – see info in this thread.

    My site is https://www.whiddy.com. Since I made these changes, the posting has definitely improved and I am now getting very few duplicates.

    I only know relatively basic php and WordPress, but if you work thru the logic in those php files, I believe they will be improved by implementing these changes.

    Am hoping someone who is knowledgeable in php and WordPress can test this further and if it is works, to provide updated php files to help out everyone else. Or if Allen come out of hibernation, maybe he can tell me I am crazy or I am on the right track! Either way I am just trying to make the plugin better as I want to keep using it.

    Pete

    @pete could you please provide a detailed solution to the autopost bug you fixed?

    I’m experiencing similar situation, in my case…Autopost is no longer posting new items since November 30th, but every other thing else is working, including the fetching of feed.

    As of today I have deactivated the buggy plugin since it keeps importing feeds to my database but not autoposting.

    Thread Starter peteduignan

    (@peteduignan)

    Ok here are the changes I made to import_posts.php. Would be interested to know if that improves the autoposting for anyone. Please test and see if it works. If it’s not correct, please let me know your correct code.

    (Note: the Line #s relate to the original code)

    Line 503
    changed from
    $feedlimit=$feedlimit+1; if($feedlimit>$maxposts) continue;
    to
    // $feedlimit=$feedlimit+1;
    if($feedlimit>$maxposts) continue;

    Line 592
    changed from
    $total = $total +1;
    to
    // $total = $total +1;

    Line 594
    changed from
    $thisLink=trim($items["mylink"]);
    to
    // $thisLink=trim($items["mylink"]);

    Lines 611 and 612
    changed from
    $thisLink = strip_qs_var_match('news.google.com',$thisLink,'url');
    $thisLink = strip_qs_var('bing.com',$thisLink,'tid');
    to
    $thisLink = strip_qs_var_match('news.google.com',$items["mylink"],'url');
    $thisLink = strip_qs_var('bing.com',$items["mylink"],'tid');

    Line 628 (only increment when creating a new post)
    inserted $total = $total +1; $feedlimit=$feedlimit+1;

    Happy testing!

    Pete

    @pete, Nope! Did not work for me. I get the following error message:

    Warning: Cannot modify header information – headers already sent by (output started at /home/xxxxxx/public_html/domain.website/wp-content/plugins/wp-rss-multi-importer/inc/import_posts.php:1) in /home/xxxxxx/public_html/domain.website/wp-includes/pluggable.php on line 1179

    It seems the mod you supplied also broke my wordpress site, and was unable to login again. I had to delete import_posts.php file to regain access.

    Is this why your website was shut down for maintenance?

    Thread Starter peteduignan

    (@peteduignan)

    Thanks for testing it. Sorry to hear you had issues. No idea how those mods could cause that.

    My website is up and running well. I have had it down a few times over the last while because I was getting too many duplicates and not enough feed items published so it was looking stupid. I was busy with other work/life and didn’t have time to investigate fully.

    Since I implemented those changes in the last few days, I have had very few duplicates and lots of feed items being posted. (I do have some older duplicates that I am slowly getting rid of).

    If someone can point out any error(s) in the code/logic, please do so.

    Thanks for the feedback puzzl3d…

    Hi

    Say Pete, after I tried your modifications, I should note I did get an initial thrust of content, but then nothing else that day until I went back to the standard code.

    Then I made another change: I increased the time between the database update and the feed fetch time – to every hour for update and every two hours for fetch. I then reduced the number of per-feed-fetches to two, from 20. I have 105 feeds at this point.

    That has resulted in a higher percentage of feeds pushed out, though not quite 100 percent. More like 90 percent. But I should note that the percentage increased from an initial rate of 70 percent.

    Thread Starter peteduignan

    (@peteduignan)

    Yes during my testing, I found that I got a big burst of content also. That is because I was finally getting all those backlogged feed items processed.

    Then it seemed like I wasn’t getting very many but actually I was getting what I should be getting – i.e. it was processing per the options I had selected.

    That is a very good sign!

    Hmm. In other words, it was clearing the inventory.

    Hmmmm..

    Hey guys, I decided to do similar tweaking to the settings after reading Zennie’s comment above. I’d wait and see if I get new posts, then give you guys feedback.

    On another note, would you guys know how to address the issue below without deleting the plugin? After re-activating the plugin, I get this message:

    The plugin generated 60 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Meanwhile, each time I save plugin settings, I still get this error message:

    Warning: Cannot modify header information – headers already sent by (output started at /home/xxxxxx/public_html/domain.website/wp-content/plugins/wp-rss-multi-importer/inc/import_posts.php:1) in /home/xxxxxx/public_html/domain.website/wp-includes/pluggable.php on line 1179

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Autopost not posting all feed items’ is closed to new replies.