In cases where a state machine class is not defined for all content types, we should check that a valid machine is loaded when we load a machine for a node.

For example, currently we don't check that $state_machine is valid for the node:

$state_machine = state_flow_load_state_machine($node);
$allowed_events = $state_machine->get_available_events();

Comments

arithmetric’s picture

Status: Active » Needs review
StatusFileSize
new11.21 KB

Attached is a first pass on a patch for this.

fmitchell’s picture

Status: Needs review » Needs work

With the new ignore() method, it may be better to set ignore() to TRUE if the machine name doesn't validate. That way, we can leverage what is already there and just set a dsm().

I'll revisit how to incorporate this.

fmitchell’s picture

Issue summary: View changes

Update issue description with example.