WordPress.org

Ready to get started?Download WordPress

Forums

Related Links
[resolved] Ajax call to load_links_list() has an error (1 post)

  1. robert_k
    Member
    Posted 2 years ago #

    When using the related links plugin I noticed that with WP_DEBUG on, I kept getting an error warning me that line 236 of "class-related-links-box.php" was attempting to access an attribute of a non-object. The fix is simple: you have to send the Post ID with the ajax call, because the ajax call won't automagically know what the ID is.

    My patch:

    class-related-links-box.php, line 236:
    $meta = get_post_meta(intval($_POST['post_id']), '_related_links', true);

    script.js, line 118-121:

    var data = {
    		action: "load_links_list",
    		post_id: jQuery('#post_ID').val()
    	};

    http://wordpress.org/extend/plugins/related-links/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic