Title: Fatal error: &#8230; get_default_language()
Last modified: August 21, 2016

---

# Fatal error: … get_default_language()

 *  Resolved [charl0s](https://wordpress.org/support/users/charl0s/)
 * (@charl0s)
 * [12 years ago](https://wordpress.org/support/topic/fatal-error-get_default_language/)
 * Hi. I updated to the last version and I get this when I try to enter to wp-admin
 * **Fatal error: Call to a member function get_default_language() on a non-object
   in <path>\estudio\wp-content\themes\Avada\admin\index.php on line 62**
 * Front-end works fine:
    [http://tottus.apoyo.com/estudio/nuestro-estudio/](http://tottus.apoyo.com/estudio/nuestro-estudio/)
 * What can I do? Thanks
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [12 years ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963541)
 * Hi!
 * It seems that Avada tries to detect the presence of WPML by testing a constant
   present in both Polylang and WPML. And then Avada being “sure” that WPML is present,
   it tries to use an internal function of WPML. But of course, Polylang does not
   provide this function… and you get this ugly fatal error.
 * So please report your error to the Avada team and ask them if they can support
   Polylang or if they can use a constant / function /class unique to WPML so that
   the theme does not believe anymore that Polylang is WPML.
 * Waiting for this, you can put:
    `define('PLL_WPML_COMPAT', false);` in your wp-
   config.php
 * This will disable the WPML compatibility mode of Polylang and should solve the
   fatal error.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [12 years ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963549)
 * See also the post I just wrote for more details [http://polylang.wordpress.com/2014/05/30/fatal-error-call-to-a-member-function-on-a-non-object-in/](http://polylang.wordpress.com/2014/05/30/fatal-error-call-to-a-member-function-on-a-non-object-in/)
 *  Thread Starter [charl0s](https://wordpress.org/support/users/charl0s/)
 * (@charl0s)
 * [12 years ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963598)
 * Thanks, it works.
 * So, I understand that Avada theme has WPML functions by default , Avada theme
   was created thinking to use WPML plugin, right?
 * I’ll write Avada theme to tell what you are saying, but I think they will write
   me back saying it will be consider for next updates.
 * So, my question is, **using “define(‘PLL_WPML_COMPAT’, false);” can my web site
   exists without problems?**
 * Thank you very much!
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963659)
 * Hi!
 * I won’t say that it will work without problem. It much depends on your needs.
   You won’t take profit of multilingual features of your plugins which are compatible
   with WPML and Polylang through WPML compatibility mode (such as WordPress SEO).
 *  [nik9](https://wordpress.org/support/users/nik9/)
 * (@nik9)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963736)
 * Hello.
 * I inserted the suggested code
    define(‘PLL_WPML_COMPAT’, false); into my wp-config
   file which resolved the fatal error, but it does not return the function of Polylang.
   i.e. the language switcher does not function and all (spanish and english) assigned
   posts show up together in the gallery as duplicated images instead of single 
   images per language selection.
 * As Avada and Polylang were working just fine together before the last (2) updates–
   i.e. the problem occurred when I updated Polylang – is it not possible to reinstall
   the previous version that was stable with Avada?
 * Thank you
 *  [nik9](https://wordpress.org/support/users/nik9/)
 * (@nik9)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963737)
 * Incidentally, don’t know how relevant, but I found the following code already
   in the config file and I don’t know what it’s function is, but I tried removing
   that as well which made no difference, so I put it back along with your suggested
   code above.
    define (‘WPLANG’, ”);
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963748)
 * Hi!
 * Yes. It worked with previous versions of Polylang. I improved the WPML compatibility
   mode and it should be good for most users. I am sorry that it created an issue
   with Avada. But as the error message says, the error is in Avada. If the Avada
   authors can have a look to my blog post, I believe that it will be easy for them
   to solve the issue.
 *  Thread Starter [charl0s](https://wordpress.org/support/users/charl0s/)
 * (@charl0s)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963776)
 * I forgot to mark this topic as resolved. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Fatal error: … get_default_language()’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [charl0s](https://wordpress.org/support/users/charl0s/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/fatal-error-get_default_language/#post-4963776)
 * Status: resolved