Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Can't set Priorities
This topic contains 4 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 6 months ago.
- AuthorPosts
- November 29, 2018 at 6:22 am #20165
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.
November 29, 2018 at 3:09 pm #20184Hi!
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 :)
November 30, 2018 at 5:23 am #20197Hey,
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 />November 30, 2018 at 5:37 am #20198Managed 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.
November 30, 2018 at 12:30 pm #20202Hi,
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 :)
- AuthorPosts
You must be logged in to reply to this topic.