We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9827
    • 17 Posts
    Hi there,
    I’m very new to MODx but got it running in few minutes. I played around a little in the manager and in the frontend and I’m getting enthusiastic more and more...
    So I tryed to switch with some code from an older CMS to MODx - I’ve many files and classes to be overviewed and partially rewritten to fit in the MODx environment. As is the rule many things wont work and I’m confronted with many errors and messages which are completely new to me.
    Anyway, now I’m looking for a debugging option and found something like this:
    modxDebugConsole which seems to fit my needs but I’m not quite sure either to use this class nor how... Is there any documentation about it? An example?
    I already took a look at Ditto 2 which uses and extends modxDebugConsole but I’m looking for an simple example to start up using debbuging.

    I tryed this code in my snippet but without success:
    include($adiconfig['modx_debug_class']); // path to 'debug/modxDebugConsole.class.php'
    include($adiconfig['debug_templates']); 	// path to 'debug/debug.templates.php'
    $mydebug = new modxDebugConsole($dbg_templates);
    $tabs = array();
    $tabs['info'] = 'Info test text';
    $tabs['more'] = 'More test text';
    $mydebug->render($tabs, 'kind of debug msg', 'some base url');  //still not sure what parameters to pass, seems to be like this: 1=array, 2=string, 3=baseurl ?
    


    The result when I reload the Frontend is the normal page...

    Would appreciate ANY help!!
    Thanks,
    Greets Mike
      • 26903
      • 1,336 Posts
        Use MODx, or the cat gets it!
        • 9827
        • 17 Posts
        Yes indeed. But it didn’t help me out...
        Neither types are specified nor examples are provided and the same can be read in the code of the class.

        Hm, would be nice to reuse such classes - it’s just hard without any documentation...
          • 32699 ☆ A M B ☆
          • 427 Posts
          maybe you are going about this the hard way grin

          Try making snippets.

          Your class(es) can be referenced via a snippet, which can be in turn called from a document.

          To get a handle on it, try looking at eform or another snippet in the resources section of the manager as well as the respective directory in the assets/snippets folder
            Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

            Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
            • 7231
            • 4,205 Posts
            for parse error look into the system events log (manager -> Reports) here you will see a record of any modx errors.

            The best modx debugger is this forum wink get in a pickle and post the error and most likely you will get a response quickly. Chances are someone has been there before.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 9827
              • 17 Posts
              Hi all,

              yes, I do trying snippets - that’s not a problem for me. But it would be nice to have such tools like debuglib (http://www.atomar.de/debuglib/) - I’m afraid of asking for development with eclipse grin or for a class-explorer...
              I’m familiar with php, but not with modx. As you know at the beginning one makes many misstakes and furthermore sometimes one comes to a good finish but took not the best way through...

              and yes, I know that you guys are a very good debugger for all questions about modx! That’s why I’ve asked you wink

              Greets Mike