Resolved

Reported for: WPML Multilingual CMS 3.3.8

Resolved in: WPML Multilingual CMS 3.6.0

Symptoms

When visiting the Gravity Forms activation link that is sent to the customer, a fatal error occurs on the site.In example, visiting: http://example.com/?page=gf_activation&key=3f14e4d2e8025d47

For example, the following link: http://example.com/?page=gf_activation&key=3f14e4d2e8025d47

Leads to an error:

PHP Fatal error: __clone method called on non-object in ..\wp-content\plugins\sitepress-multilingual-cms\sitepress.class.php on line 2875

Workaround

In order to fix this, you need to go to ../wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2875

There, replace the code:

 $wp_query = clone $this->wp_query; 

With the following:

if(!is_object($this->wp_query)) {
    $this->wp_query = is_object( $wp_query ) ? clone $wp_query : null;
}

5 Responses to “Issues when overriding the default user activation template in Gravity Forms User Registration add-on”

  1. In Version 3.4.1 the line in the file sitepress.class.php to update is 2958

    Hope the fix is added to the next version. 🙂