Help text from workflow module appears on every drake page.
pearcec - May 8, 2007 - 13:36
| Project: | Drake :: Drupal-CakePHP bridge |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
For some dumb reason, I get the following at the top of every page:
You are currently viewing the possible transitions to and from workflow states. The state is shown in the left column; the state to be moved to is to the right. For each transition, check the box next to the role(s) that may initiate the transition. For example, if only the hulking_editor role may move a node from Review state to the Published state, check the box next to hulking_editor. The author role is built in and refers to the user who authored the node.
I am using the workflow module. I am not sure why this is getting triggered.

#1
workflow.module is using strstr which ends up matching on an empty section. What happens is when CakePHP is invoked it trashes the _GET['path'] variable. So we can just save it and restore it.
get($parameters['url']);
// Restore _GET['path'] for proper help
$_GET['path] = $savePath;
?>
#2
workflow.module is using strstr which ends up matching on an empty section. What happens is when CakePHP is invoked it trashes the _GET['path'] variable. So we can just save it and restore it.
get($parameters['url']);
// Restore _GET['path'] for proper help
$_GET['path] = $savePath;
?>
#3
workflow.module is using strstr which ends up matching on an empty section. What happens is when CakePHP is invoked it trashes the _GET['path'] variable. So we can just save it and restore it.
get($parameters['url']);
// Restore _GET['q'] for proper help
$_GET['q'] = $savePath;
?>
#4
gah! anyway to delete the first two comments? I didn't think they submitted, and I realized it isn't path but q that needs saving. Anyway, you get the picture.
#5
Both 'q' and 'task' $_REQUEST params are set for removal on line 303 in drake.module:
<?php$cakeDispatcher->setIgnoreParameters(array('q', 'task'));
?>
They are removed as part of the cake dispatcher's _start() function (lines 284-291) in lib/cake_embedded_dispatcher.class.php:
<?php
// Remove unnecessary parameters for CakePHP
if (isset($this->ignoreParameters))
{
foreach($this->ignoreParameters as $parameter)
{
unset($_REQUEST[$parameter]);
unset($_GET[$parameter]);
}
}
?>
I've attached a patch file that does three things:
This solves my workflow conflict.
#6
I patched it and it works like a champ. Thanks.