Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter chris12357

    (@chris12357)

    Thank you for your help with Related Post Shortcode. After a somewhat painful debugging session it seems that my problem was not in the plugin itself. Looks like I was running out of memory in wp-db.php when the plugin called query_posts() or get_posts(). I increased WP_MEMORY_LIMIT from96M to 256M and that fixed the problem. I consider the matter resolved but if there is any other information you’d like I’ll provide it.

    While perhaps moot at this point, there were some errors is the javascript console. I didn’t copy them and I can go back and change my config to get them if you still want to see them but the error was because$filtered was null in related-post-shortcode.php when I ran out of memory so posts was null when the JS code in rps-popin.html runs and posts.length was invalid.

           function updatePostsList (posts){
              var options = "";
              for (var i = 0; i < posts.length; i++) {
                options += '<li data-value="'+posts[i].value+'">'+posts[i].text+'</li>';
              }
              $("#rps-list", context).html(options).find('li').on('click', function () ...
    • This reply was modified 7 years, 8 months ago by chris12357.
    Thread Starter chris12357

    (@chris12357)

    I tried the 1.1 update which did not solve the problem. I suspect that the problem is my database, but I don’t no why yet. No one else has reported a problem either but at least my issue is documented here in case someone else comes looking.

    I’ll try to debug this further today.

    I see you just published 1.2 so I’ll give that a try right now too.

    Thread Starter chris12357

    (@chris12357)

    You are really quick! :-). Yes. I’ll try it.

    Thread Starter chris12357

    (@chris12357)

    The show_posts confusion was from my original comment. It is showpost. I tried changing it to posts_per_page last week and it didn’t make a difference.

    Somewhat off topic, I was also looking into using get_posts() as opposed to query_posts() with numberposts as an argument. The documentation says query_posts alters the main loop but I don’t really understand the context differences between get_posts and query_posts. At some point I thought I’d look at the code that the insert link button as the popup as a similar functionality.

    Thank you for your support. I’ll post again after I try a few more things.

    Thread Starter chris12357

    (@chris12357)

    Sorry I missed your earlier reply. I am still having a problem. I did some poking at the plugin code and had found that by changing showposts from -1 to one less than the number of posts I have makes the problem go away.

    I only have this problem with of my sites though. I’ll try your recommendation today

    Thanks

    Thread Starter chris12357

    (@chris12357)

    Thanks. Let me know if you need any more info. The plug in is still working on my other sites, it just stopped on the one I use the most ??

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