Content-Plugin-Event doesn't get executed

by Cowboy_Patrick   Last Updated August 07, 2019 16:10 PM - source

I have the following plugin written:

defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.plugin.plugin' );

class plgContentModifyArticle extends JPlugin
    function plgContentModifyArticle ( &$subject, $params )
        parent::__construct( $subject, $params );

    function onBeforeContentSave( &$article, $isNew )

        echo "Can you see this?";

        global $mainframe;
        $newText = '<b>Testtext</b>';
        $user =& JFactory::getUser(); // get the user


        return true;

With the following xml-file:

<?xml version="1.0" encoding="utf-8"?>
<extension type="plugin" version="3.1.0" group="content">
    <description>Modify your articles</description>
       <filename plugin="modifyarticle">modifyarticle.php</filename>



I've made all of this based on the following tutorial:

But unfortunately it doesn't add text the a new article. And I don't have any idea on how to debug this.

Related Questions

Make a checkbox group disappear

Updated March 21, 2017 23:10 PM

How to save Custom Fields in Core components

Updated March 19, 2016 08:04 AM