arjendejong
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Search with Algolia] Global multisite search with multiple indexesThank you for answer, @tw2113!
I’ve been experimenting in the mean time, and I’ve got something working for the autocomplete:
add_filter('algolia_autocomplete_config', function ($config) { if (is_admin()) { return $config; } $original_plugin = Algolia_Plugin::get_instance(); $original_prefix = $original_plugin->get_settings()->get_index_name_prefix(); $sites = get_sites(['deleted' => false]); $configs = []; foreach ($sites as $site) { switch_to_blog($site->blog_id); $plugin = Algolia_Plugin::get_instance(); $settings = $plugin->get_settings(); if ($settings->get_autocomplete_enabled() === 'no') { restore_current_blog(); continue; } $prefix = $settings->get_index_name_prefix(); $config = $settings->get_autocomplete_config(); foreach ($config as $key => &$entry) { if (!isset($entry['index_id'])) { unset($config[$key]); restore_current_blog(); continue; } $index = $plugin->get_index($entry['index_id']); if (null === $index) { unset($config[$key]); restore_current_blog(); continue; } $entry['index_name'] = str_replace($original_prefix, $prefix, $index->get_name()); $entry['enabled'] = true; } $configs = array_merge($configs, $config); restore_current_blog(); } return $configs; });
This piece of code allows me to show results for the subsites that have Algolia indexes enabled. What do you think about this?
Hi Alex, that’s what I want yeah, but I can’t get it working. I added #pdf-download-button to the button that needs its link not processed and to the exclusion list but it still get processed, see here (the blue “Save this vacancy” button).
Any idea? How can I get the permalink to the original language of
$post->ID
?- This reply was modified 2 years, 10 months ago by arjendejong.
Hi webtoffee,
Thank you for the code. It fixed my issue!
@kevinb Rereading this thread made me consider that my original problem outlined in the first message could be fixed; I haven’t ran into that problem again yet.
Related to my last message here, it happened again when scheduling 12 posts. 3 appeared missing in the revision queue, but I confirmed that they were correcty into the
wp_posts
database table. I found the main issue to be that when creating new revisions, not all published posts receive the_rvy_has_revisions
meta field. The reason why they appear again when creating another revision is because of therevisionary_refresh_postmeta()
function.I know that we can use the
Regenerate revision storage flags (for Revision Queue listing)
option in settings to fix this, but I’d rather have a permanent solution to his problem. ??@kevinb Beta 2 did not fix my problem unfortunately. I received a message that when scheduling 12 posts, only 8 showed up in the revision queue. When they create another revision for the missing 4, the missing 4 suddenly show up again in the queue.
I’ll take a look in the database once this problem shows up again, to see if and how the missing posts are created.
@kevinb Thanks for the zip. I’ve updated the plugin in my site, but unfortunately it didn’t correctly include the featured image in the revision. Looking at the updated code in GitHub, it seems you updated it in pending revisions. However, we’re not using pending revisions, only scheduled revisions. That’s why it’s not working for us I think. One thing that does seem to work is reupload the current featured image. I’m not sure if the current one has a faulty reference in the database, but it displays correctly in our site.
Also, this latest beta release broke our scheduled revisions. They are not being scheduled correctly. For now I’ve reverted back to beta 2. I’ve included the stack trace below:
[2020-08-06 08:30:04] production.ERROR: Creating default object from empty value {“userId”:null,”email”:null,”exception”:”[object] (ErrorException(code: 0): Creating default object from empty value at /home/wpsoup/domains/girlz.nl/public_html/htdocs/content/plugins/revisionary/admin/revision-action_rvy.php:468)
[stacktrace]
#0 /home/wpsoup/domains/girlz.nl/public_html/htdocs/content/plugins/revisionary/admin/revision-action_rvy.php(468): Themosis\\Core\\Bootstrap\\ExceptionHandler->handleError(2, ‘Creating defaul…’, ‘/home/wpsoup/do…’, 468, Array)
#1 /home/wpsoup/domains/girlz.nl/public_html/htdocs/content/plugins/revisionary/admin/revision-action_rvy.php(893): rvy_apply_revision(‘110832’, ‘future-revision’)
#2 /home/wpsoup/domains/girlz.nl/public_html/htdocs/content/plugins/revisionary/admin/revision-action_rvy.php(842): rvy_publish_scheduled_revisions()
#3 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-includes/class-wp-hook.php(287): _rvy_publish_scheduled_revisions(Object(Revisionary))
#4 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
#5 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#6 /home/wpsoup/domains/girlz.nl/public_html/htdocs/content/plugins/revisionary/revisionary_main.php(150): do_action(‘rvy_init’, Object(Revisionary))
#7 /home/wpsoup/domains/girlz.nl/public_html/htdocs/content/plugins/revisionary/rvy_init.php(929): Revisionary->__construct()
#8 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-includes/class-wp-hook.php(287): rvy_init(”)
#9 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
#10 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#11 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-settings.php(540): do_action(‘init’)
#12 /home/wpsoup/domains/girlz.nl/public_html/htdocs/wp-config.php(54): require_once(‘/home/wpsoup/do…’)
#13 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-load.php(42): require_once(‘/home/wpsoup/do…’)
#14 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/wp-blog-header.php(13): require_once(‘/home/wpsoup/do…’)
#15 /home/wpsoup/domains/girlz.nl/public_html/htdocs/cms/index.php(17): require(‘/home/wpsoup/do…’)
#16 {main}
“}We’re using W3 Total Cache, but the REST API is not being cached (or used in any other way except by Gutenberg).
That’s great news! I’m looking forward to the fix.
Hi Steve, Kevin,
I’ve raised a support ticket on the site with a report of my site health details.
I’ve downloaded the beta release and I will let you know if it works.I’ve received additional info about a problem that might be related to this:
“I just scheduled the daily horoscopes and that is not going well for me. In the revision queue there are now only five zodiac signs while I have planned them all. As soon as I make a test schedule post of the seven zodiac signs that are missing,
they come back in some vague way (without me changing the post content, I just schedule a new one). Maybe useful as extra info.”The editorial office only uses it on this custom post type so I don’t know if it happens on posts or pages, sorry.
@kevinb I am using the Gutenberg editor in combination with a custom post type. No other page builders or editors. I’ve made a small recording to show you what happens when I save a post: https://www.awesomescreenshot.com/video/557233?key=4d31256118084e5b63e619efecb1da83
This particular post is now missing its featured image in the revision: https://tinyurl.com/y6e4kgb9Hi Kevin,
This new version fixed the problem I described. Thank you very much!
Forum: Plugins
In reply to: [Yoast SEO] WPSEO_Frontend_Primary_Category::post_link_category deprecated@benmoody This has been fixed in 14.0.1, which is out now. ??
Forum: Plugins
In reply to: [Yoast SEO] WPSEO_Frontend_Primary_Category::post_link_category deprecated@joostdevalk I have removed both lines and the error disappeared, so everything is working correctly now.
- This reply was modified 4 years, 7 months ago by arjendejong.