• Resolved darwinadv

    (@darwinadv)


    Hello after updateing to the latest versions we have the following error when an editor tries to save/update an existing or new product:
    PHP Fatal error: Uncaught TypeError: Argument 2 passed to relevanssi_wpml_term_fix() must be of the type array,
    On wp-content/plugins/relevanssi/lib/compatibility/wpml.php:122

    Is there a quick fix or something we can apply?

    We have the latest version of WPML

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    For a quick fix, change the line 122 in /lib/compatibility/wpml.php to

    function relevanssi_wpml_term_fix( string $term_content, $terms, string $taxonomy, int $post_id ) {

    That is not the full error message. Can you please tell me what the full error message says? How does the sentence “must be of the type array,” continue?

    Thread Starter darwinadv

    (@darwinadv)

    Thank you for the quick fix. I ll try it now. The full error message:

    PHP Fatal error:  Uncaught TypeError: Argument 2 passed to relevanssi_wpml_term_fix() must be of the type array, object given, called in /home/#/public_html/wp-includes/class-wp-hook.php on line 287 and defined in /home/#/public_html/wp-content/plugins/relevanssi/lib/compatibility/wpml.php:122
    Stack trace:
    #0 /home/#/public_html/wp-includes/class-wp-hook.php(287): relevanssi_wpml_term_fix('', Object(WP_Error), 'pa_diathesimoti...', 21889)
    #1 /home/#/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters('', Array)
    #2 /home/#/public_html/wp-content/plugins/relevanssi/lib/indexing.php(646): apply_filters('relevanssi_tag_...', '', Object(WP_Error), 'pa_diathesimoti...', 21889)
    #3 /home/#/public_html/wp-content/plugins/relevanssi/lib/indexing.php(540): relevanssi_index_taxonomy_terms(Array, 21889, 'pa_diathesimoti...', false)
    #4 /home/#/public_html/wp-content/plugins/relevanssi/lib/indexing.php(805): relevanssi_index_doc(21889, true, 'all', true)
    #5 /home/#/public_ht in /home/#/public_html/wp-content/plugins/relevanssi/lib/compatibility/wpml.php on line 122
    Plugin Author Mikko Saari

    (@msaari)

    Great, thanks, that full stack trace was what I was looking for. Now I can fix this properly. Next version will include a fix.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error on Save/Update Post & Product with WPML’ is closed to new replies.