I'm pretty new to plugin creation and I've already hit a snag. I'm trying to add fields to the admin-side article creation via plugin but nothing is showing up in $params signifying proper loading and a die('testing...') in the plugin methods does not fire. Was hoping to get a fresh pair of eyes on this to see what I'm doing incorrectly.


defined( '_JEXEC' ) or die;

class plgContentArticlepublishemail extends JPlugin
    protected $autoloadLanguage = true;

    function __construct(& $subject, $config)

    function onContentPrepareForm($form,$data)
            case 'com_content' :
                if ($app->isAdmin())
                    JForm::addFormPath(__DIR__ . '/forms');
                return true;
        return true


<?xml version="1.0" encoding="utf-8"?>
    <filename plugin="articlepublishemail">articlepublishemail.php</filename>
    <language tag="en-GB">en-GB.plg_content_articlepublishemail.ini</language>
    <fields name="params">


<?xml version="1.0" encoding="utf-8"?>
<fields name="attribs">
    <fieldset name="articlepublishemail" label="PLG_CONTENT_ARTICLEPUBLISHEMAIL_FIELDSET_LABEL">
            <option value="0">JOFF</option>
            <option value="1">JON</option>

I've changed the names of fields and fieldsets several times trying to get something positive going and nothing. I don't entirely understand how the directory structure for a plugin is supposed to work either so that could be it...Either way, any help would be appreciated.

  • Have you enabled the plugin the via Plugin Manager?
    – Lodder
    Jul 12 '16 at 9:24
  • There is a full guide on how to do this on Joomla's website. You can find it here: docs.joomla.org/Adding_custom_fields_to_the_article_component . Have you used this guide for the implementation?
    – itoctopus
    Jul 12 '16 at 10:53
  • @itoctopus yes, I've used that among a few other guides (where applicable).
    – Chase
    Jul 12 '16 at 12:55
  • @Lodder Y'know, I got so caught up trying to code the darn thing that I completely forgot about any other steps that might be involved...Enabling the plugin might have helped. Would you kindly turn that into a formal answer so I can mark it.
    – Chase
    Jul 12 '16 at 12:59

Plugins, like other Joomla extensions, must be enabled in order work and the code be executed.

Please ensure you've enabled it, by going to the Plugin Manager via the Joomla backend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.