Can't set Priorities

This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 4 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #20165
    peik_cm
    peik_cm
    Participant

    Can’t set priorities, wp debug gives out an error code:

    <label for="p_asp_blog">Blog</label>
    <select name="p_asp_blog">
        <option value="0" selected>Current</option>
    <b>Fatal error</b>:  Cannot use object of type WP_Site as array in <b>/var/www/html/wp-content/plugins/ajax-search-pro/backend/tabs/priorities/priorities_individual.php</b> on line <b>12</b><br />
    

    It’s a multisite running WordPress 4.7.11 & ASP.

    The search function was exported from a non-multisite development environment using the built-in Import/Export -tool.

    Do you know what’s causing the issue?

    Thanks for your kind support.

    #20184
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    This might be a yet unknown but. I checked the function reference, and there was a change that I was not aware of, affecting this section only. I will make sure to resolve it in the upcoming release. If you want to resolve it manually now, you can do that by changing one of the plugin files:

    (before you start, make sure to have a back-up, just in case)
    1. Open up the wp-content/plugins/ajax-search-pro/backend/tabs/priorities/priorities_individual.php file on your server
    2. Change it’s contents to this
    3. Save the file.

    Now, going to the priorities menu, and making changes should work again. Let me know if you need a help with this.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #20197
    peik_cm
    peik_cm
    Participant

    Hey,

    Now the error message has changed:

    <b>Fatal error</b>: Uncaught Error: Cannot use object of type WP_Site as array in /var/www/html/wp-content/plugins/ajax-search-pro/backend/tabs/priorities/priorities_individual.php:13
    Stack trace:
    #0 /var/www/html/wp-content/plugins/ajax-search-pro/backend/priorities.php(69): include()
    #1 /var/www/html/wp-content/plugins/ajax-search-pro/includes/classes/core/class-asp-menu.php(147): include(‘/var/www/html/w…’)
    #2 /var/www/html/wp-includes/class-wp-hook.php(298): WD_ASP_Menu::route(”)
    #3 /var/www/html/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters(”, Array)
    #4 /var/www/html/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
    #5 /var/www/html/wp-admin/admin.php(222): do_action(‘ajax-search-pro…’)
    #6 {main}
    thrown in <b>/var/www/html/wp-content/plugins/ajax-search-pro/backend/tabs/priorities/priorities_individual.php</b> on line <b>13</b><br />

    #20198
    peik_cm
    peik_cm
    Participant

    Managed to fix the issue by removing these lines:

    <?php foreach($blogs as $blog): ?>
    <?php $blog_details = get_blog_details($blog->blog_id); ?>
    <option value=”<?php echo $blog[‘blog_id’] ?>”><?php echo $blog_details->blogname; ?></option>
    <?php endforeach; ?>

    Now the priorities can be set. This site has a bit special multisite setup so maybe that was causing the issue.

    #20202
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you very much for letting me know. I will still investigate this to make sure.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.