We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Hey Guys,
    I've tried to create a child-resource-manager with MIGX using this tutorial:
    http://rtfm.modx.com/display/ADDON/MIGXdb.Manage+Child-Resources+in+a+grid-TV+with+help+of+MIGXdb

    I've done exact this in another MODX project (with 2.2.4-pl traditional and migx-2.3.2-pl) before and everything works fine.

    But today, I have tried to get this working in MODX Revolution 2.2.6-pl traditional (with migx-2.3.2-pl) but after configuring the MIGXdb-Template Variable, the MODX Manager crashes when I try to open a resource which is assigned to this MIGXdb-TV with HTTP 500.

    It seems that MIGXdb as TV generally causes an error if its assigned to a template and you try to edit a resource in the manager which has that template in MODX 2.2.6.

    Has anyone an idea, whats the fault?
    Is there a small fix I can do, to get this working?

    Thanks a lot! smiley
    Jens
    • Have a look in the MODX error log and the server error log to see if there's a reason for the 500 server error anywhere.
        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • Just tried it and it's working fine. Are you absolutely sure that you did the initial installation of MIGx correctly?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
        • @Mark: Unfortunately I've cleared the Error-Log while finding the problem, to get just the fresh errors.. and now - the log stays empty.. even if I play with the migx-configs, the templates, the tv and other options that could cause the error..

          @Susan: I've done the installation (inlcuding running the setup on CMP) correctly I think.. The MIGX CMP is also working fine - just as my normal MIGX-Configs.. there is just the problem with the MIGXdb-TV..

          @Mark/Susan: If you want to have access to the manager to see whats going on send me your email and I give you acces ;-)
          • FWIW, 500 errors will most likely not be reported in the MODX error.log. You would need to look in the error_log specified for PHP on your environment to find this error in most cases...
            • The Server Error-Log says:

              [03-Jan-2013 15:14:01 Europe/Berlin] PHP Fatal error: Call-time pass-by-reference has been removed in /core/components/migx/elements/tv/input/migxdb.class.php on line 31

              This is the line who crashes:

              if ($gridfile = $this->migx->findGrid($defaultpath, $filename, &$filenames)) {


              A little bit more of the code-area
                      $defaultpath = $this->migx->config['templatesPath'] . '/mgr/grids/';
                      $filename = $grid . '.grid.tpl';
                      if ($gridfile = $this->migx->findGrid($defaultpath, $filename, &$filenames)) {
                          $this->setPlaceholder('grid', $this->migx->replaceLang($this->modx->controller->fetchTemplate($gridfile)));
                      }
              
              • I'm coming closer to the result ;-)

                On our Server runs PHP 5.4 - so the &$filenames causes the error.

                For more informations see: http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available

                If I remove the & it don't crashes anymore.

                Tomorrow I will look if this was all ;-) Stay tuned and thanks for the help until now smiley
                • Now, if I try to load the child-resources in my MIGXdb-Grid by clicking the "Load Table"-Button the grid loads but with the message "No items found" (but there are some child-resources).
                  And now there are also several Errors in the MODX-Errorlog:
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) addPackage called with an invalid package name.
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) No class specified for loadClass
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) No class specified for loadClass
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) ::getSelectColumns() is not a valid static method.
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) No class specified for loadClass
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) No class specified for loadClass
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) Could not load class 
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) No class specified for loadClass
                  [2013-01-03 16:12:43] (ERROR @ /assets/components/migx/connector.php) ::loadCollection() is not a valid static method.
                  


                  Any idea?