0

I'm trying to run a plugin 1 controller from plugin 2. I can get it to run and re-direct to plugin 1's controller but as it is not being run with posted variables I need to be able to tell plugin 1's action what variables to use. I found this in the documentation but it throws an error Unable to resolve the request. Is this even possible and if so where am I going wrong?

Tried so far:

$variable = 'Some Variable';
$actionUrl = UrlHelper::getActionUrl('plugin1/controller', array('variable' => $variable));
craft()->runController($actionUrl);

I've also just tried running it hard coded:

craft()->runController('http://domain.com/actions/plugin1/controller&variable=Some%20Variable');

and

craft()->runController('http://domain.com/index.php?p=actions/plugin1/controller&variable=Some%20Variable');

Your Answer

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

Browse other questions tagged or ask your own question.