A couple of weeks ago, I announced that Testee 2.2 now lets you run your tests via an ACTion ID.
Whilst writing said announcement, I spent a few minutes scouring the ExpressionEngine documentation for a succinct ACTion ID overview that I could link to. I wasn’t expecting much, just an explanation of what an ACTion ID is and does, for the completely uninitiated.
This is a bit surprising, given that many (probably most) ExpressionEngine modules couldn’t function without the existence of ACTion IDs. If you’ve implemented a comments form, used the Simple Commerce module, or allowed a visitor to register as a Member, you’ve used ACTion IDs. They’re everywhere in EE.
Read on for my attempt to plug this hole in the ExpressionEngine documentation dam.
An ACTion ID is a number that appears in an ExpressionEngine URL as a query string parameter. It looks something like this:
Whenever ExpressionEngine encounters an ACTion URL, it attempts to run the code associated with the provided ACTion ID.
When an ACTion URL is loaded, ExpressionEngine looks in the
exp_actions database table for an entry with the supplied ACTion ID. Each ACTion ID is associated with a class and method (i.e. the code to run).
Assuming the ACTion ID exists in the
exp_actions table, ExpressionEngine automatically creates a new instance of the associated class, and calls the appropriate method.
What happens next is entirely up to the code being called. It could register a new Member, process a purchase, or drop all your database tables whilst emitting an evil cackle and twirling its moustache.
The latter scenario is why you should never install any software you dont trust; but Im sure anyone as whip-smart and fragrant as your good self already knew that.