We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26537
    • 7 Posts
    Regarding the tutorial

    http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components

    1) Inside the file build.config.php, MODX_BASE_PATH replacement to my path, which is on localhost and gives me error.
    Also in the file build.schema.php when MODX_CORE_PATH replacement for my / / localhost / MyWeb / core I get error in line 15, can not find the core / model / modx / modx.class.php.

    I’m working on the last XAMMP
    Any suggestions or another way to do better.

    2) I want to know how to specify in my myschema.mysql.schema.xml the MyISAM and InnoDB, always in the same model, how do I do?

    From already thank you very much
      • 32699 ☆ A M B ☆
      • 427 Posts
      W. Shawn Wilkerson Reply #2, 16 years, 1 month ago
      Wow that’s a lot of questions for a single post!

      My first suggestion is to look at what your core path is set to now in the /core/config/config.inc.php

      Or create a snippet and simply

      echo MODX_CORE_PATH;


      As far as schema goes, the best place to look is inside of the /core/model/schema folder and see how they worked out most of modx.

      If my memory servers correct (I may be incorrect on this point) it is recommended to use: platform="mysql" defaultEngine="MyISAM"

      Lastly, I would suggest you take a look at some samples, I have links in my signature for xPDO for you to look at.
        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
        • 26537
        • 7 Posts
        Ingenious
        "Echo MODX_CORE_PATH;"
        I continued on my xampp evidence of w7 and gives me strange error with addresses "\ /", and in OSX the screen remains blank.
        Also install a Virtual Machine with Ubuntu Desktop (I have no experience) and I get an error in the installation. of modx

        Connecting to mysql server:
        Could not connect to the database server. Check the connection properties and try again.

        [2010-08-29 15:50:53] (ERROR in xPDO::connect @ /opt/lampp/htdocs/m2/core/xpdo/xpdo.class.php : 305) SQLSTATE[HY000] [2002] Argumento inválido

        [2010-08-29 15:50:53] (ERROR in xPDO::connect @ /opt/lampp/htdocs/m2/core/xpdo/xpdo.class.php : 305) SQLSTATE[HY000] [2002] Argumento inválido

        PHP Version 5.3.1
        mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $
          • 32699 ☆ A M B ☆
          • 427 Posts
          W. Shawn Wilkerson Reply #4, 16 years, 1 month ago
          Search for mysqlnd. You will find others with issues with that.
            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
            • 10355
            • 44 Posts
            Hi
            I’m trying to create a custom table on instructions http://rtfm.modx.com/display/revolution20/Using+Custom+Database+Tables+in+your+3rd+Party+Components. Filled with all my map and class files.
            I run:

            ======================================================
            $Stores = $ modx-> getCollection (’sfStore’);
            echo ’Total:’. count ($ stores);
            ======================================================

            In the frontend I see "Total: 0"
            But the mysql tables are not created, what could be the problem?

            ======================================================
            $store = $modx->newObject(’sfStore’);
            $store->fromArray(array( <<< Fatal error: Call to a member function fromArray() on a non-object in line
            ’name’ => ’Store 1’,
            ’address’ => ’12 Grimmauld Place’,
            ’city’ => ’London’,
            ’country’ => ’England’,
            ’zip’ => ’12345’,
            ’phone’ => ’555-2134-543’,
            ));
            $store->save();
            ======================================================

            Sorry for my english.
              • 26537
              • 7 Posts
              C4
              I can not help. I’m still lost
              I will try to DIRECTORY_SEPARATOR
              http://modxcms.com/forums/index.php/topic,4604.msg33568.html#msg33568

              to see if it helps you
              http://rtfm.modx.com/display/xPDO20/Setting+Object+Fields
                • 31471
                • 206 Posts
                Quote from: G4 at Sep 15, 2010, 04:50 AM

                $store->fromArray(array( <<< Fatal error: Call to a member function fromArray() on a non-object in line

                Check this line in your snippet:
                $modx->addPackage('storefinder',$base_path.'model/'); 

                It helped for me.
                  • 26537
                  • 7 Posts
                  I resolved my problem, it is unclear where he was
                    • 10355
                    • 44 Posts

                    Check this line in your snippet:
                    $modx->addPackage('storefinder',$base_path.'model/'); 

                    It helped for me.

                    Thanks it worked laugh