WPML problem after update 1.0.2 ==> FIX!
-
Hi there,
the last update, where you updated this part
remove_filter('terms_clauses', array($sitepress, 'terms_clauses')); $categories = get_categories(array('hide_empty' => false, '_icl_show_all_langs' => true)); add_filter('terms_clauses', array($sitepress, 'terms_clauses'));
with “icl_show_all_langs” didn′t work for me. I′m still getting my error log filled with:
Missing argument 2 for SitePress::terms_clauses() in /home/www/web13/html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 5927
Missing argument 3 for SitePress::terms_clauses() in /home/www/web13/html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 5927
I′m using the latest WPML version.
Now I have do be honest, I don′t know a lot about PHP, I can partially read it and understand some, but not nearly all. But I took a look at the mentioned function in the WPML php file and saw, that the function has some more numbers at the end. Arguments? So I updated the above mentioned codeblock as follows:
remove_filter('terms_clauses', array($sitepress, 'terms_clauses'),10 ); $categories = get_categories(array('hide_empty' => false, '_icl_show_all_langs' => true)); add_filter('terms_clauses', array($sitepress, 'terms_clauses'),10, 4 );
Note the “,10” and “,10, 4” at the end of remove and add filter.
That did the trick for me! Everything seems to work and the error log doesnt get filled anymore!
I hope I could help someone with that. And maybe someone can also explain to me what these numbers stand for and what I actually did there. Because I don′t really understand it but it seems to work.
Best regards,
Toby
- The topic ‘WPML problem after update 1.0.2 ==> FIX!’ is closed to new replies.