Forums / Developer / Are custom action handlers still supported?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Are custom action handlers still supported?

Author Message

Thiago Campos Viana

Thursday 10 February 2011 8:52:40 am

I tried to create but I had some problems, it doesn't work at all.

I created the content.ini.append.php:

[ActionSettings]
ExtensionDirectories[]=dappsocial

Then I created the file content_actionhandler.php inside the extension actions folders:

<?php

function dappsocial_ContentActionHandler(&$module, &$http, &$objectID){

    if($http->hasPostVariable("hello")) {
        echo $http->postVariable("hello");
        exit;

    }
    echo 'does it works?';
    exit;
    return true;
}
?>

Finally I created a form in a template:

<form action="{"content/action"|ezurl}" method="post">

<input name="hello" type="submit" value="Olá mundo!" />

<input name="ContentObjectID" type="hidden" value="50" />

</form>

And it doesn't work, the code is not called at any time... Am I doing something wrong or it is not support anymore?

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Thiago Campos Viana

Thursday 10 February 2011 10:55:25 am

Nevermind, I found the error:

<form action="{"content/action"|ezurl}" method="post">

It's not supposed to has ", the correct is:

<form action={"content/action"|ezurl} method="post">

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br