Support » Plugin: Toolset Types - Custom Post Types, Custom Fields and Taxonomies » Error while updatin “Call to a member function get() on a non-object “

  • Resolved Mohsin Rasool

    (@mohsinrasool)


    Hello,

    After the last auto-update of plugins broke my site. I am getting following error from Toolset Types plugin.

    Fatal error: Call to a member function get() on a non-object in */wp-content/plugins/types/application/controllers/interop/mediator.php on line 139

    I rolled back it from backup and tried upgraded on a staging site by deactivating, upgrading and then activating the plugin. Issue remains the same. I upgraded from v2.2.15.1.

    Can you please help me out here to resolve it?

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Beda

    (@bedas)

    Hello

    Types does not Auto Update.

    WordPress does, but in Types you need to click to update.

    I assume it’s a misunderstanding, as otherwise the bug could not be introduced by Types, since that needs to be manually updated.

    Anyway, this issue did not happen to any of my test sites or other User’s sites as far I see.

    The code that seems to throw the error tries to get a Theme Name (slug).
    It wp_get_theme() and that returns an object (if a theme exists).
    Now, I see our code does not check the object’s exists() and that could be a problem, but WordPress without a theme is not possible, so this should never happen at all.

    Might I ask if you switch to a native WordPress theme, the issue is solved?
    Then it can be due to how the Custom Theme is coded.

    I will anyway ask the DEV to add an additional check there just to be safe.

    I had exactly the same error.
    Used the plugin with the “Gravit” theme and got the same error.

    My plugin updates are automatic so I do not know if this caused the error. I reverted to 2.2.14 and all went to normal.

    In my case, developer performed the some comments removal tool that stripped off the comments at the top of style.css of child theme. This cause the Types to throw error on updating.

    Fixed by adding header in style.css of active theme.

    We got the same error when we updated to the latest version of WP-Types. This is definitely a Types issue.

    Plugin Support Beda

    (@bedas)

    We ar on it.

    The code wrongly assumes an Object, while in certain situations it can return no object.

    I will update here ASAP

    Plugin Support Beda

    (@bedas)

    We have an erratum that shoulöd solve this:
    https://wp-types.com/errata/error-call-to-a-member-function-get-on-a-non-object-when-using-types-with-certain-themes/

    It would be very nice if you could confirm the fix!

    Plugin Support Beda

    (@bedas)

    @tinsterman, @barttheman and @mohsinrasool – it would be cool if someone of you could confirm the fix.

    I have no steps how to replicate your error at all, and I cannot test if it’s solved with the patch.
    We would love to merge it but need some confirmations from you.

    Plugin Support Beda

    (@bedas)

    The erratum has been updated with a fix for a small glitch making the error appear again.

    Could you give me feedback if it solves your issue?
    https://wp-types.com/errata/error-call-to-a-member-function-get-on-a-non-object-when-using-types-with-certain-themes/

    Plugin Support Beda

    (@bedas)

    This is now also solved the stable release.
    I close this ticket here.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Error while updatin “Call to a member function get() on a non-object “’ is closed to new replies.