All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

PHP Error in Low Variables after update to EE 2.2.1

Sjoerd 4 Jul 2011 08:19 problem, rejected

After updating to EE 2.2.1, there is a PHP Error when trying to access Low Variables.
Low Variables: 1.3.6.
WYGWAM: 2.3.4.1

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Addons_modules::$tools_model

Filename: wygwam/ft.wygwam.php

Line Number: 643

Fatal error: Call to a member function get_upload_preferences() on a non-object in /home/pre2/public_html/redactie/expressionengine/third_party/wygwam/ft.wygwam.php on line 643

Replies

  1. Low 4 Jul 2011 08:23

    Hey Sjoerd,

    Looks like Wygwam is causing the error. Have you contacted Pixel&Tonic about this?

  2. Sjoerd 4 Jul 2011 08:28

    No not yet. But Wygwam seems to work fine when editing entries. It is specific when I start Low Variables.

  3. Low 4 Jul 2011 08:34

    The error is triggered by a Wygwam file (wygwam/ft.wygwam.php), so it has to do with Wygwam's compatibility with Low Variables, not with LV itself.

    It probably is an easy fix -- looks like Wygwam needs to load the Tools model, which is already loaded in a publish form, but not when dealing with variables.

  4. Sjoerd 4 Jul 2011 08:39

    OK, thanks. I will ask P&T.

  5. lukewilkins 13 Jul 2011 15:48

    We were able to temporarily fix this issue by loading the tools_model model before the call to get_upload_preferences() on line 644 of ft.wygwam.php. So it should look like:

    // Save the upload directory URLs
    $this->EE->load->model('tools_model');
    $filedirs = $this->EE->tools_model->get_upload_preferences(1);

    Brandon at P&T is aware of the issue and will be adding the fix.

  6. stinhambo 25 Jul 2011 22:57

    Yup this definitely works!

  7. Low 28 Jul 2011 12:37

    Setting the status of this thread to 'Not a problem', since it's up to P&T to inplement the fix in Wygwam.