We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42841
    • 24 Posts
    MIGX recently updated from 2.5.8 to 2.5.9 and the new version throws an error when I try an add a new MIGX Config. (Components -> MIGX -> MIGX -> Add Item)

    I get the error:

    Fatal error: Call to a member function get() on a non-object in --omitted--/core/components/migx/elements/tv/input/migx.class.php on line 104


    And lines 102-104:

        
        $temp = $this->modx->getObject('modTemplateVar',$this->tv->get('id'));
        $tv_value = $this->tv->processBindings($this->tv->get('value'));
        $default_value = $this->tv->processBindings($temp->get('default_text'),$resource_id);


    Obviously the first question is, how do I fix that?

    Second question would be: in the interim, is there an easy way to roll back to 2.5.8? I'd note that this isn't an installation I've upgraded, it's a fresh installation. I've previously used 2.5.8 with no errors on other projects.

    Cheers,
    Ahren.
      • 4172
      • 5,888 Posts
      does it work, when you change this part to:

      $tv_value = $this->tv->processBindings($this->tv->get('value'));
      if ($temp = $this->modx->getObject('modTemplateVar',$this->tv->get('id'))){
          $default_value = $this->tv->processBindings($temp->get('default_text'),$resource_id);    
      }else{
          $default_value = $this->tv->processBindings($this->tv->get('default_text'),$resource_id);   
      }
      




        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 42841
        • 24 Posts
        Yup, it sure does!

        Thanks for that Bruno -
          • 6038
          • 228 Posts
          was glad to find this thread smiley

          thanks - confirming the fix worked for me too, after a fresh install of MIGX 2.5.10 in MODX 2.2.9 [ed. note: christianhanvey last edited this post 12 years, 10 months ago.]
            • 4172
            • 5,888 Posts
            Great! Thanks for reporting!
            Then I will upgrade at the MODX - repo soon.
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 6038
              • 228 Posts
              Quote from: christianhanvey at Dec 03, 2013, 10:36 PM
              ...a fresh install of MIGX 2.5.10 in MODX 2.2.9

              that would be MIGX 2.5.9 of course, you havn't released 2.5.10 yet smiley