I don't see the workflow fields in the HEAD version (Views 2). I don't know if I just have to wait until you release the next version, or if I am missing something that I'm supposed to be doing...
I like the HEAD version since it shows the CCK computed fields and all, but if I need to use workflow fields, then the only way for me now is to use the 6--2-0-RC1 version. It seems that at the moment I cannot access CCK fields + workflow fields at the same time? (It took me several hours to discover (?) this... :)

Comments

ramper’s picture

Sorry to reply to my own request - as I don't find a way to edit my earlier post:
I just wonder if it's the job of the workflow module maintainer to update that module so as to make it work with the Views HEAD version?

karens’s picture

Title: Workflow fields in the HEAD version? » Update Workflow to the new Views API
Project: Views (for Drupal 7) » Workflow
Version: 6.x-2.x-dev » 6.x-1.x-dev
Component: files/upload data » Code
Category: support » task
merlinofchaos’s picture

It is; there was an API change that affected all modules. I hated doing it, but it was necessary to reduce Views' memory consumption.

ramper’s picture

Thanks for the replies. Having decided to stick to D6 primarily due to Views 2, I guess I need to be patient - especially since I am not a coder... :)
I guess I can now close this ticket since my query was answered? I ask because I had once clicked on some dropdown item before I understood what these were for, and had needlessly upset some folks...

jvandyk’s picture

No, don't close it because the task still needs to be done.

fterrier’s picture

Status: Active » Needs work
StatusFileSize
new4.11 KB
new33.53 KB

I have followed the instructions here

http://www.angrydonuts.com/attention-views-api-developers

and modified the workflow module accordingly. Now, I have no idea whether it is the right way to do this, but at least it works, I can now display the workflow states in my views. Attached are the modifications I did to the files. There is a patch to apply and a zip file that contains a new includes/ directory.

merlinofchaos’s picture

I didn't look in the zip file but in the patch there are 2 quibbles:

1) The patch tries to add license.txt but that's a file that's automatically added by the packaging system and shouldn't be patched back in.

2) function workflow_views_handlers() should be in the workflow.views.inc file -- only workflow_views_api() needs to be in the main module.

ramper’s picture

StatusFileSize
new57.52 KB

Here is a temporary but entirely working version of the workflow module that I put together essentially as per the tip give by KarenS. Hopefully it should meet the Views 2 API guidelines as well. I did a quick check on the Views 2 API manual though it is clearly meant for developers (and I am not one), just to make sure I was putting in the appropriate "parent handler".

I have created the 'includes' folder, with all the separate '.inc' files that are referenced by the workflow.views.inc file. The path to this file is added in the workflow.module. I don't know how to make a patch file - so what I have done is to make a zip file (I am calling it a 'temporary fix' because I am not a developer (though this module works). To see the changes I have made in workflow.views.inc and workflow.module, just search for "ramper" - I have included comment lines.

Hope this helps anyone like me who wants to use Views 2 AND the workflow module. I have tested this in my workflow/views set up that also pulls in some computed fields (the main reason I had to do this hack)

To install:
Just copy the 'workflow' folder to your usual modules location (e.g., sites/all/modules/') and install as usual, create some workflow states. These should now be available in the Views2 UI.

westwesterson’s picture

subscribing

jvandyk’s picture

Status: Needs work » Fixed

Committed changes based on the above. They will appear in RC3. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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