-
- 24,544 Posts
I’m confused. AFAIK, MakeTable is only available in MODx Evolution where there is no $xpdo variable (and the MakeTable constructor takes no argument).
Did you find (or write) a Revolution version of the MakeTable class? I couldn’t find it.
If so, did you try this in the constructor for your custom class?
-
- 1,336 Posts
I’m seeing maketable.class.php in my revo installation under core/xpdo/table, if it came from evo it looks as though its been lifted into XPDO now. You can’t use this in evo as is, you have no $xpdo objects unless you’ve created them yourself. It looks as though you’re using evo 1.0.1 with a branch of svn intended for use by revo, not evo.
However, you should be able to lift these refs out of this code, as you say its only used for debugging, just delete the relevant lines(only one as far as I can see) and you should be able to use it in evo without any $xpdo stuff.
Use MODx, or the cat gets it!
-
- 49 Posts
Sorry, I’m confusing you with a lack of information.
I’m using MakeTable in conjunction with XPDO 1.0 and MODX 1.0.
I’m building a web app using XPDO. It uses MakeTable.
I’m not trying to use MakeTable without XPDO!
So yeah, MODX 1.0 has no XPDO in it, I’m using XPDO inside MODX snippets as an imported Class.
-
- 1,336 Posts
Ah, Ok got you now, well this should work, because MakeTable has no __construct() PHP 5 should look for a function namd MakeTable() which exists.
For backwards compatibility, if PHP 5 cannot find a __construct() function for a given class, it will search for the old-style constructor function, by the name of the class
Ok, this is probably just bad formatting in the above post but are you getting any other errors? The line :-
parent :: __construct($xpdo);
should really be
parent::__construct($xpdo);
i.e no spaces I believe.
Use MODx, or the cat gets it!
-
- 4,149 Posts
To doubly state Jason’s point:
- MakeForm and MakeTable will not be in the final xPDO release for MODx Revolution.
- MODx Revolution in branches/2.0 SVN (and will so in beta5) be using xPDO 2.0 - not 1.0. This is PHP5-only xPDO.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com