• Ram

    (@sriram275)


    Hi..,
    Thanks for your great plugin..

    we are getting fine on upto when we are working dev server and once after moving into to another server..the plugin is working when logging into admin only..if we are not login to admin means the function throws js error like below

    414 Request-URI Too Long 614ms

    Well I have tried to figure out..i though may be you have you haven’t used ajax call for not loged in users mean nopriv callback..but you are using fine in the code

    add_action(‘wp_ajax_nopriv_pi_tweetscroll_ajax’, ‘pi_tweetscroll_ajax’);
    add_action(‘wp_ajax_pi_tweetscroll_ajax’, ‘pi_tweetscroll_ajax’);

    But with out login into admin we are not able to get the tweets..can you please let us know what is going wrong..whether related to hosting or we need to change any?

    Thanks in advance

    https://www.ads-software.com/plugins/tweetscroll-widget/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Vladimir

    (@vmrkela)

    Hi,

    Thanks really strange. I didn’t have this problem yet. Can you please provide link to your website so I can check console.

    Vladimir

    Thread Starter Ram

    (@sriram275)

    Thanks here is the site link https://www.pinkelephant.nl/ can you please check and let me know.

    Thanks in advance

    Plugin Author Vladimir

    (@vmrkela)

    Hi,

    It seem that your server has some limits. You can read more about it here:
    https://stackoverflow.com/questions/2891574/how-do-i-resolve-a-http-414-request-uri-too-long-error

    If you can’t configure it by yourself you can try modifying GET requests into POST in jquery.tweetscroll.js, line 77 change from

    $.getJSON

    to

    $.postJSON

    and in widget-tweetscroll.php

    line 429,429:

    $current_instance_id = $_GET['instance_id'];
    $current_post_id = $_GET['post_id'];

    change to

    $current_instance_id = $_POST['instance_id'];
    $current_post_id = $_POST['post_id'];

    Note that I didn’t test this.

    Vladimir

    Thread Starter Ram

    (@sriram275)

    Thanks for your help..came to know that we can achieve the longest uri 414 issue..from changing get to post.

    And in jQuery we have $.getJSON but not $.postJSON() method so we need to use like below

    // Send the request
    $.post(‘script.php’, data, function(response) {
    // Do something with the request
    }, ‘json’);

    like that we need to change our js and it works..

    Thank you ??

    Plugin Author Vladimir

    (@vmrkela)

    Glad it’s working now!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘414 Request-URI Too Long Error’ is closed to new replies.