Support » Plugin: ACF: Better Search » Fatal error: using_index_permalinks

  • Hello,

    When I activate the plugin and run a script with:

    header(‘Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0’);
    $dir = dirname(__FILE__);
    define(‘WP_USE_THEMES’, false);
    $root = ”;
    $dir = str_replace(‘\\’,’/’,$dir);
    $dir = explode(‘/’,$dir);
    $count = 0;
    foreach($dir as $piece)
    {
    $count++;
    if($count < count($dir)-2)
    {
    $root .= ‘/’.$piece;
    }
    }
    $root = substr($root,1).’/wp-load.php’;
    require($root);

    I get the following error:

    Fatal error: Call to a member function using_index_permalinks() on null in /www/ftpstorage2/webton402/webton402/wp-includes/rest-api.php on line 313

    Could you please fix this?

    WP version: 4.9.7

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author mateuszgbiorczyk

    (@mateuszgbiorczyk)

    Hi @r3dridl3,

    This is not related to my plugin. Please check your code again.

    Well, how do you explain that it works flawless without your plugin? How can you just say that it’s not related without taking a look at it?

    Plugin Author mateuszgbiorczyk

    (@mateuszgbiorczyk)

    Hi @r3dridl3,

    My plugin is responsible for searching. With other plugins, does your code work? I added your code to your functions.php file and I have no error using my plugin.

    Sometimes it happens that the written code has a bad effect on the plugins, but that does not mean that they are bad. The more so because my plugin is used since people and no one reported problems.

    Please write to me what your code should do and I will try to help you.

    The piece you see only loads WP without theme. After that there was some code for a cronjob via a .php file.

    It’s not there in the issue because i tried to remove as much as possible and even with the bare minimum it still gives an error.

    Please try it yourself.

    Plugin Author mateuszgbiorczyk

    (@mateuszgbiorczyk)

    In what file do you add this code? Please send me instructions on how to run it.

    You can add this code in the theme that is active. In it’s own file. Nothing more nothing less. Than go to the exact path in your browser to run the file. Remember it’s a cronjob file.

    Plugin Author mateuszgbiorczyk

    (@mateuszgbiorczyk)

    Please give me screenshots for each steps.

    I also get this error whenever trying to use the WP CLI while this plugin is activated on my site.

    I also get this notice:
    Notice: Use of undefined constant AUTOSAVE_INTERVAL – assumed ‘AUTOSAVE_INTERVAL’ in /Users/andrewmiller/Sites/bcen/wp-includes/script-loader.php on line 1086

    The fatal error only occurs while the plugin is active on the site.

    I am thinking that maybe it has something to do with when the plugin is initialized?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.