When trying to import a Workflow, the following error appears:
"Call to a member function label() on a non-object in /modules/contrib/entity/entity.module "

This is due to an outstanding issue in the Entity module. If you want to use the Import functionality, please applay the patch from issue: #2112755: Call to a member function label() on a non-object

Original message
I see the Workflow UI has an export option. Cool. Then I saw this...

    // Workflow is now an exportable entity. But the 'Import' menu item is
    // still broken. Just delete it.
    unset($items['admin/config/workflow/workflow/import']);

Soooooooo does that mean unless I'm using Features I can't import a Workflow?

Comments

johnv’s picture

Yes you can. Just export the module using Features,move your feature to the target and enable it. If the feature only contains workflow stuff, you dont even need to enable Features onthe target machine. (Features alsof exports the WorkflowField)
And some code has changed, so you can just comment out that line and try importing. See the corresponding issue for reporting back your results.

entendu’s picture

you dknt even need to enz le Vesgures

Wat? Sorry, I'm confused.

entendu’s picture

If you apply the patch to entity.module here: https://www.drupal.org/node/2112755

And comment out the line above, importing will work.

The workflow imports as a "default" workflow so the delete action is not available in the UI, but you can manually navigate to (...)/delete and kill it that way.

So, some work still to do, but this is good enough for now...

johnv’s picture

I edited #1 - fat vingers on a tablet.
Thanks for the tip. That seems like exactly the reason why I disabled it.

johnv’s picture

Title: Workflow exports are not importable? » WSOD "Call to a member function label() on a non-object" when trying to import a Workflow
Issue summary: View changes
Status: Active » Postponed

OK, I re-added this function using this commit (but accidentally added it to the wrong issue), and refurbished this issue.
As soon as the Entity has the patch applied, I'll add a dependency on the new version.

  • johnv committed ba4b83a on 7.x-2.x
    Issue #2307303: added IMPORT action to workflows, but this requires...
Manuel Garcia’s picture

johnv’s picture

Status: Active » Fixed

  • johnv committed 08d1d3f on 7.x-2.x
    Issue #2307303: Added dependency on entity module v7.x-1.6
    

Status: Fixed » Closed (fixed)

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

robertom’s picture

#2112755: Call to a member function label() on a non-object is committed to entity 7.x-1.x-dev, so you don't have this patch applied on entity 7.x-1.6

robertom’s picture

Status: Closed (fixed) » Active
johnv’s picture

Indeed, and the patch to 7.x-1.x-dev was committed before after releasing entity 7.x-1.6. (February 25, 2015 16:23 versus... Oops February 25, 2015 16:23)
Do you use both entity 7.x-1.6 and workflow 7.x-2.6 ?

johnv’s picture

Version: 7.x-2.4 » 7.x-2.6
Category: Support request » Bug report

I guess we have to wait for the next 7.x-1.7 version of entity.module or use the dev-version.

johnv’s picture

Version: 7.x-2.6 » 7.x-2.8
Status: Active » Postponed

  • johnv committed a49df73 on 7.x-2.x
    Issue #2307303: Add dependency to entity module v7.x-1.6
    
johnv’s picture

Version: 7.x-2.8 » 7.x-2.11
Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

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