Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
johnvYes 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.
Comment #2
entendu CreditAttribution: entendu commentedWat? Sorry, I'm confused.
Comment #3
entendu CreditAttribution: entendu commentedIf 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...
Comment #4
johnvI edited #1 - fat vingers on a tablet.
Thanks for the tip. That seems like exactly the reason why I disabled it.
Comment #5
johnvOK, 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.
Comment #7
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer commentedLet's make progress on this =)
Comment #8
johnvComment #11
robertom CreditAttribution: robertom commented#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
Comment #12
robertom CreditAttribution: robertom commentedComment #13
johnvIndeed, and the patch to 7.x-1.x-dev was committed
beforeafter 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 ?Comment #14
johnvI guess we have to wait for the next 7.x-1.7 version of entity.module or use the dev-version.
Comment #15
johnvComment #17
johnv