The function workflow_state_allowed_values() and its D7 predecessor workflow_options_list() was once a central function. It is not used anymore and it is succeeded by the 2 functions getPossibleOptions() and getPossibleOptions() from the OptionsProviderInterface.

Comments

johnv created an issue. See original summary.

  • johnv committed c54bc44 on 8.x-1.x
    Issue #2924667: Remove workflow_state_allowed_values() function
    
johnv’s picture

Status: Active » Fixed

  • johnv committed 782aef5 on 8.x-1.x
    Issue #2924667: Remove workflow_state_allowed_values() function
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

yjajkiew’s picture

I am using Workflow 8.x-1.0 and I'm having this error with devel_generate :
Error: Call to undefined function workflow_state_allowed_values() in options_allowed_values() (line 88 of core/modules/options/options.module).

But searching inside the workflow module there is still a reference to the function "workflow_state_allowed_values" at line 159, inside the function defaultStorageSettings, of the file WorkflowItem.php

Could it be an oversight ?

johnv’s picture

Status: Closed (fixed) » Active

I need to check that.
the 'Version' of this issue states that is detected in 1.0-rc1, so should be solved in 1.0.
However, the dev-version is the most recent and has numerous improvements.

yjajkiew’s picture

I'm using the 1.0 version so there's still an issue with this function being called but not existing (because of the commits related to this particular issue).

The code I mentionned, that makes a reference to the deleted function, exists in 1.0 and 1.0-dev apparently.

Hope this helps :-)

johnv’s picture

I see the wrong line. Can you provide me with a testscript to reproduce the error?

yjajkiew’s picture

The steps to reproduce this error is pretty simple by using "devel_generate" (I don't know this module well enough to generate a testscript) but it goes as follow :

  1. install & enable devel_generate
  2. Go to devel_generate UI to generate content : /admin/config/development/generate/content
  3. Select a content type and click on "Generate"

  • johnv committed 1e74fc6 on 8.x-1.x
    Issue #2924667: Remove workflow_state_allowed_values() function
    
johnv’s picture

Version: 8.x-1.0-rc1 » 8.x-1.0
Status: Active » Fixed

Thanks for the catch. I could not get rid of the problem entirely, so I have a stub function for older installations.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.