This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: We are getting tons of error on our website and not sure how to fix them: PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WPML_Archives_Query::get_archives_join

Solution: I just had a look at the error message and I could see that this issue is related to the Better archives widget plugin. Once you deactivate it, everything should go back to normal.

This topic contains 2 replies, has 2 voices.

Last updated by matthewS-6 2 weeks, 3 days ago.

Assigned support staff: Radu.

Author Posts
September 26, 2019 at 6:34 pm #4649691

matthewS-6

Hi,

We are getting tons of error on our website and not sure how to fix them:

[26-Sep-2019 17:39:46 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WPML_Archives_Query::get_archives_join(), 1 passed and exactly 2 expected in /nas/content/staging/pgx/wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-archives-query.php:34
Stack trace:
#0 [internal function]: WPML_Archives_Query->get_archives_join('')
#1 /nas/content/staging/pgx/wp-includes/class-wp-hook.php(286): call_user_func_array(Array, Array)
#2 /nas/content/staging/pgx/wp-includes/plugin.php(208): WP_Hook->apply_filters('', Array)
#3 /nas/content/staging/pgx/wp-content/plugins/better-archives-widget/widget-archives.php(65): apply_filters('getarchives_joi...', '')
#4 /nas/content/staging/pgx/wp-includes/class-wp-widget.php(378): Baw_Widgetarchives_Widget_My_Archives->widget(Array, Array)
#5 [internal function]: WP_Widget->display_callback(Array, Array)
#6 /nas/content/staging/pgx/wp-includes/widgets.php(770): call_user_func_array(Array, Array)
#7 /nas/content/staging/pgx/wp-content/themes/PGX/sidebar-blog.php(11) in /nas/content/staging/pgx/wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-archives-query.php on line 34
[26-Sep-2019 17:39:58 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function WPML_Archives_Query::get_archives_join(), 1 passed and exactly 2 expected in /nas/content/staging/pgx/wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-archives-query.php:34

September 27, 2019 at 4:59 am #4651725

Radu
Supporter

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hey Matthew,

Thank you for reaching out the WPML support!

I just had a look at the error message and I could see that there's something related to the Better archives widget on it. This makes me think that all the errors might be caused by some compatibility issue.

Just as a test, could you deactivate all the plugins except for WPML, activate a default theme (like Twenty Ninetee), and tell me if the errors are still there, please? You can start by deactivating first the plugin I mentioned.

If the error messages are still there, just simply send me a link to a page where I can see them and I'll have a closer look.

Thanks,
Radu

September 27, 2019 at 3:03 pm #4655385

matthewS-6

Thank you Radu for looking into this. After deactivating Better Archives Widget the problem solved.