Skip Navigation

Resolved

Overview of the issue

If you visit the feed of a category in the non-default language and you paginate to the second language, then you can be presented with an error like this one here:

PHP Catchable fatal error:  Object of class WP_Error could not be converted to string in ...wp-includes\pluggable.php on line 1282
PHP Stack trace:
PHP   1. {main}() ...index.php:0
PHP   2. require() ...index.php:17
PHP   3. wp() ...wp-blog-header.php:16
PHP   4. WP->main() ...wp-includes\functions.php:1105
PHP   5. WP->query_posts() ...wp-includes\class-wp.php:739
PHP   6. WP_Query->query() ...wp-includes\class-wp.php:622
PHP   7. WP_Query->get_posts() ...wp-includes\class-wp-query.php:3387
PHP   8. WP_Query->parse_query() ...wp-includes\class-wp-query.php:1723
PHP   9. do_action_ref_array() ...wp-includes\class-wp-query.php:1050
PHP  10. WP_Hook->do_action() ...wp-includes\plugin.php:531
PHP  11. WP_Hook->apply_filters() ...wp-includes\class-wp-hook.php:310
PHP  12. SitePress->parse_query() ...wp-includes\class-wp-hook.php:286
PHP  13. WPML_Query_Parser->parse_query() ...wp-content\plugins\sitepress-multilingual-cms\sitepress.class.php:3310
PHP  14. WPML_Query_Parser->maybe_redirect_to_translated_taxonomy() ...wp-content\plugins\sitepress-multilingual-cms\classes\query-filtering\class-wpml-query-parser.php:345
PHP  15. WPML_WP_API->wp_safe_redirect() ...wp-content\plugins\sitepress-multilingual-cms\classes\query-filtering\class-wpml-query-parser.php:291
PHP  16. wp_safe_redirect() ...wp-content\plugins\sitepress-multilingual-cms\classes\wpml-wp\class-wpml-wp-api.php:728
PHP  17. wp_sanitize_redirect() ...wp-includes\pluggable.php:1344
PHP  18. preg_replace_callback() ...wp-includes\pluggable.php:1282

Workaround

The issue happens only for a category or a taxonomy term in the second (non-default) language.
Our developers are aware of the issue and we are working on fixing this.

2 Responses to “Feed second page of a category can produce an error in the second language”

  1. Hello,
    Did you have a chance to fix it? I have search tab on left side when I click on newly added category “Maga” under “producenci” and than click on “FILTRUJ button” Im getting this error page:

    Fatal error: Uncaught Error: Object of class WP_Error could not be converted to string in /home/platne/serwer16498/public_html/wp-includes/pluggable.php:1316 Stack trace: #0 /home/platne/serwer16498/public_html/wp-includes/pluggable.php(1316): str_replace() #1 /home/platne/serwer16498/public_html/wp-includes/pluggable.php(1392): wp_sanitize_redirect() #2 /home/platne/serwer16498/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/wpml-wp/class-wpml-wp-api.php(734): wp_safe_redirect() #3 /home/platne/serwer16498/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-query-parser.php(291): WPML_WP_API->wp_safe_redirect() #4 /home/platne/serwer16498/public_html/wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-query-parser.php(345): WPML_Query_Parser->maybe_redirect_to_translated_taxonomy() #5 /home/platne/serwer16498/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php(3324): WPML_Query_Parser->parse_query() #6 /home/ in /home/platne/serwer16498/public_html/wp-includes/pluggable.php on line 1316

    Please let me know how I could fix this issue.
    Best regards,
    Sebastian

  2. Hello Sebastian.
    Your error looks similar, but it could be something else.
    Please open a ticket so that we can investigate the problem further.
    Also about the current issue in this errata – it has not been fixed yet.