Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kevin Vess

    (@kevinvess)

    Thanks for posting; unfortunately, I’m not sure how to solve this issue – I suggest trial and error until you figure it out.

    A couple suggestions though:

    1. In your whitelist code, if you’re not going to use the site_url() function to get the site address; then remove the parenthesis too. For example:

    function my_forcelogin_whitelist( $whitelist ) {
      $whitelist[] = 'http://www.viplosjen.no/xmlrpc.php';
      $whitelist[] = 'http://viplosjen.no/xmlrpc.php';
      return $whitelist;
    }
    add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);

    2. I googled your error message and found the following results that might be helpful to you figuring out this issue:

    https://ww.wp.xz.cn/support/topic/jetpack-publicize-error-message
    https://ios.forums.ww.wp.xz.cn/topic/jetpack-is-return-error

    3. One more option you could try for whitelisting the xmlrpc.php page, is to whitelist it regardless of a query string? For example:

    /**
     * Filter Force Login to allow exceptions for specific URLs.
     *
     * @return array An array of URLs. Must be absolute.
     **/
    function my_forcelogin_whitelist( $whitelist ) {
      // Get visited URL without query string
      $url_path = preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']);
    
      // Whitelist URLs
      if( '/xmlrpc.php' === $url_path ) {
        $whitelist[] = site_url($_SERVER['REQUEST_URI']);
      }
      return $whitelist;
    }
    add_filter('v_forcelogin_whitelist', 'my_forcelogin_whitelist', 10, 1);
    Thread Starter fpetter

    (@fpetter)

    Hi, and thanks a lot. The last one was did the trick (3). I didnt to anything else. Now it seems to work.

    Regards
    Frode.

    Plugin Author Kevin Vess

    (@kevinvess)

    Great! Glad we were able to solve your issue.

    Be sure to rate and review my plugin to let others know how you like it; enjoy!

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

The topic ‘Problems with WordPress app’ is closed to new replies.