Browser Fatal error: WPML class-wpml-translation-element.php on line 28

This topic contains 5 replies, has 2 voices, and was last updated by  Paolo 8 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #317469

    wci
    Expired Member
    Post count: 1035

    Hi support team,

    while trying to edit listings in front end I am getting a browser failure displayed.

    Fatal error: Uncaught exception ‘InvalidArgumentException’ with message ‘Argument ID must be numeric and greater than 0.’ in /home/worldcheckin/public_html/wci/wci.ms/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php:28 Stack trace: #0 /home/worldcheckin/public_html/wci/wci.ms/wp-content/plugins/sitepress-multilingual-cms/classes/canonicals/class-wpml-canonicals.php(78): WPML_Translation_Element->__construct(0, Object(SitePress)) #1 /home/worldcheckin/public_html/wci/wci.ms/wp-content/plugins/sitepress-multilingual-cms/classes/compatibility/wpseo/class-wpml-wpseo-filters.php(71): WPML_Canonicals->get_canonical_url(false, Object(WP_Post)) #2 [internal function]: WPML_WPSEO_Filters->canonical_filter(false) #3 /home/worldcheckin/public_html/wci/wci.ms/wp-includes/plugin.php(235): call_user_func_array(Array, Array) #4 /home/worldcheckin/public_html/wci/wci.ms/wp-content/plugins/wordpress-seo/frontend/class-frontend.php(1001): apply_filters(‘wpseo_canonical’, false) #5 /home/ in /home/worldcheckin/public_html/wci/wci.ms/wp-content/plugins/sitepress-multilingual-cms/classes/translations/class-wpml-translation-element.php on line 28

    URL
    Screen shot

    Looking forward to your help.

    Thanks, Alex

    #317471

    wci
    Expired Member
    Post count: 1035
    This reply has been marked as private.
    #317618

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    I only see errors related to WPML and WP SEO…

    Please ask for help in WPML and WP SEO forum 1st.

    Thanks

    #317934

    wci
    Expired Member
    Post count: 1035

    Hi Paolo, thanks for response.

    I have now created a forum thread within WPML and ask their support for help. Hopefully they will be able to solve my issue.

    Thanks, Alex

    #319288

    wci
    Expired Member
    Post count: 1035

    Hi @all

    I got this correction from WPML which has have helped me to solve the issue.

    Hello.

    We have confirmed that the following code change is working for affected clients.
    =============================================
    Change /sitepress-multilingual-cms/classes/compatibility/wpseo/class-wpml-wpseo-filters.php line 69 from:

    if ( $obj instanceof WP_Post) {

    to:

    if ( $obj instanceof WP_Post && $obj->ID != 0) {

    May this will help other too.

    BR, Alex

    #319331

    Paolo
    Site Admin
    Post count: 31211

    Thanks for sharing. 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount