-
- 79 Posts
Hi all,
I'm trying to develop an Extra and have no idea where to start, so I'm following the RTFM's "
http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution" but I'm stuck. Under the paragraph "
Building the Query", it says
Then go ahead and run your snippet. This will automatically create the DB table that we made in our schema.
When I run the snippet, it gives me the following error:
Fatal error: Call to a member function getService() on a non-object in /root/doodles/core/components/doodles/elements/snippets/snippet.doodles.php on line 2
Could someone please help me out and tell me what I'm doing wrong?
I'm using
MODX 2.2.0-pl2 (traditional)
Thank you!
Jean-Marc Buytaert (@jmbuytaert)
MODX truly is the greatest thing that's ever happened to the Internet.
I believe, you're missing the modX instance (as $modx).
You need to create the snippet from the manager, and call it [[snippetName]], not by accessing the file directly.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
Is this via Bobs script?
If so place that script into a snippet. Call that snippet from an actual page, passing in the custom information as per the instructions (URL and table prefix iirc) and then open that page, it will out put the snippets "work" and then you will be able to use XPDO on your database objects.