WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Fatal error / Avada theme (10 posts)

  1. dadcz
    Member
    Posted 8 months ago #

    Hello,

    getting: Fatal error: Call to a member function get_default_language() on a non-object in /home/content/16/10428016/html/psfest/wp-content/themes/Avada/admin/index.php on line 62
    fresh install of Avada 3.2.1 and setting up Polylang 1.2 plugin.

    Can be activated.

    When setting polylang and adding first language I'm getting this fatal error and I need to manually remove plugin via FTP.

    Not happening with polylang 1.1.6

    How I can go back to 1.1.6? Thanks

    http://wordpress.org/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 8 months ago #

    The isse probably comes from the fact that Avada does integrate WPML support and uses internal WPML functions.

    As Polylang does mimic the WPML API, Avada may believe that WPML is present but since Polylang does not provide WPML internal functions (but only documented API functions described on WPML website), Avada breaks.

    I made some changes in 1.2 compared to 1.1.6 that could explain it was working with 1.1.6 and not 1.2

    here is the link to v1.6 http://downloads.wordpress.org/plugin/polylang.1.1.6.zip. This can be a temporary solution. You should ask the Avada author to add a test to avoid this fatal error.

  3. dadcz
    Member
    Posted 8 months ago #

    Thank you for your quick reply!

    I've already posted to Avada devs.

    Are there some database changes that were done by installing polylang 1.2 (and trying to activate language) that need to be undone?

    Thank you!

    David

  4. Chouby
    Member
    Plugin Author

    Posted 8 months ago #

    Yes there are. Did you make a DB backup before upgrade?

  5. dadcz
    Member
    Posted 8 months ago #

    No, unfortunatelly I did not. My bad habit, doing only before wordpress core updates...

  6. Chouby
    Member
    Plugin Author

    Posted 8 months ago #

    Give me some time, I will provide you a procedure. Or maybe we make this line 62 work. As you prefer (hacking the theme will also be a temporary solution).

  7. dadcz
    Member
    Posted 8 months ago #

    Many thanks!

  8. Chouby
    Member
    Plugin Author

    Posted 8 months ago #

    You will have to create to copy paste http://pastebin.com/0TdQzQLv in a text file to create a custom plugin. The procedure is explained in the file. Don't hesitate to ask if something is unclear.

  9. dadcz
    Member
    Posted 8 months ago #

    Many thanks again!

    I have one question...

    What I did so far (prior you sent me this solution)"
    - removed folder polylang (with 1.2), because I wasn't able to use wp
    - uploaded polylang 1.1.6, you provided
    - made some settings

    I simply wasn't able to deactivate 1.2 because I wasn't able without removing folder with 1.2 to get into wp.

    Suppose that it's not a problem, right and I can follow your solution (and make DB backup prior it)...

    Thanks for support!

  10. Chouby
    Member
    Plugin Author

    Posted 8 months ago #

    When you remove a plugin folder, it is automatically de-activated. What you must not do is delete it using the red link in plugins table (because in that case Polylang removes all its data).

    Running the revert plugin should work. What is does is just removing Polylang 1.2 data, and downgrade the Polylang version number (to allow future upgrades to run smoothly).

    Polylang 1.1.6 data are not removed by Polylang 1.2 (just for cases like yours when something went wrong).

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.