Hi,
first of all forgive me if this is a duplicate post, I have searched the issue queue and cannot find anything related to this.
This is a fantastic module, great work by all involved and does what I need with the exception of :
I would like also for the users profiles to also be moderated by this module.
The reson being is that I have a content type set up as the users profile for a directory listing site and therfore their profile is effectively the advert that is listed on the live site. The module does not seem to create revisions for changes made to profile pages and obviously this is functionality that I would require.
Therfore I am asking is this by design or can anyone give me any pointers on how I could incorporate this. I am very competent in php but am new to drupal module development. Any help would be greatly appreciated.
Comments
Comment #1
Anonymous (not verified) commentedFirst lets assume you have both Revisioning and Module Grants installed, otherwise it ain't working :)
For your Content type Workflow settings should be ticked for
Create new revision
New revision in draft, pending moderation
Then it comes down to permissions, but one step at a time
Comment #2
waterssaz commentedHi
thanks for your reply.
Yes I have the revisioning, module grants and also workflow modules installed and working as expected with 'normal' content nodes for admin, anonymous and authenticated user roles..
However I will attempt to describe my scenario below:
I am also using the content profile module.
I have created a custom content type using cck and then usinh the content profile module I have set this content type as a user profile.
If I access and edit the 'node' version of the profile through content managment then the revisioning module etc works fine and as expected.
However when I view the 'content profile version' of this node when accessing under the 'my account' menu item, ie stored under user/ and not node/ then the profile listing can be edited without ever creating a new revision and without the revisioning module seeminlg taking any control over it.
Although I would want revisions to be created in both scenarios.
Is this achieveable?
Comment #3
Anonymous (not verified) commentedI will leave this for Rik to answer, as i suspect its currently outside Revisionings scope, though there are lots of improvments being developed.
It will probably be tomorrow before you see a response though (time zones)
Comment #4
rdeboerThanks for your interest waterssaz,
I feel you gave an important clue:
"However when I view the 'content profile version' of this node when accessing under the 'my account' menu item, ie stored under user/ and not node/ then the profile listing can be edited without ever creating a new revision and without the revisioning module seeminlg taking any control over it."
Revisioning currently only handles URLs of the form ..../node/%.
I'll look into allowing .../user as well -- just hope that I'm not opening up a can of worms, in that it turns out to have side-effects via modules I didn't even know existed!
Rik
Comment #5
rdeboerComment #6
waterssaz commentedThanks for the reply RdeBoer.
As stated I am new to drupal module devlopment although competent in php, and after looking throught the modules code I kinda thought that it only handle anything that was node/* , but I also thought that it may just have been something I was inadvertently doing wrong.
Again thanks very much, at least this clarifies the matter.
Comment #7
rdeboerA rough cut of this feature was checked in today and will be available in the development snapshot of 5-Jun-09 or later.
Note that because content profiles don't have distinct create (initial) and edit (subsequent) phases (there both "edits"), the "auto-publish" feature (see Content management>>Content types>>edit, section "New revision in draft"), if switched on, won't work when creating the first version of the profile.
I haven't tested this in the context of CCK (only tested with Content Profile by itself), so have a look and see if it works for you.
Rik
Comment #8
rdeboerComment #9
waterssaz commentedThanks it is much appreciated, I will download the devlopment snapshot and get back to you after I ahve tested it.
Thanks again
Comment #10
waterssaz commentedHi just to feedback.
I have been using the development snapshot with the patch applied for nearly a week now and so far have not encountered any problems with my setup. I will of course post back if I do encounter any bugs.
Once again many regards for all your help on this issue.
Comment #11
rdeboerGreat! Will consider it fixed until someone reports a problem - Rik
Comment #12
rdeboerComment #13
Isostar commentedHi, I have the same issue as comment #2
"However when I view the 'content profile version' of this node when accessing under the 'my account' menu item, ie stored under user/ and not node/ then the profile listing can be edited without ever creating a new revision and without the revisioning module seeminlg taking any control over it."
I made a cck content profile and when I want to make changes when accessing it under 'my account' I can only view and edit the current version. When I access the same node via /node//edit I get the latest version.
I compared the module code of versions 2.x and 3.x and it seems that the code which fixed this issue in 2.x (in revisioning_nodeapi() ) is not available in 3.x.
Is it possible to fix this? Was there a reason to exclude it from the 3.x version?
thx in advance!
Comment #14
JamesK commentedContent profiles appear to ignore the "Links to edit content default to" setting from the revisioning module when you are using a path like user/[uid]/profile/[content type]. This is happening because the content profile module uses a different page callback for that path (content_profile_page_edit) which looks up the node by type and uid rather than by nid. The revisioning module has no replacement for this callback.
Could this be added to the next version?
Comment #15
Isostar commentedI am still searching for a solution. I looked deeper into the code, but couldn't find an easy fix...:-(, but almost half way :)
I don't think you need a replacement callback for content_profile_page_edit. This function uses content_profile_node, which uses node_load.
The node passes hook_nodeapi, where you could trigger a load of of the latest node if the arguments of the url are like the ones from content profile:
$edit_user_profile = ($args[0] == 'user') && ($args[2] == 'edit') && !empty($args[3]);
Comment #16
ollie222 commentedHas anybody come up with a solution for this issue as we've hit the same problem too.
Basically when the node is viewed directly then the revisioning tabs are available and revisions other than the current one can be selected and published or edited.
However when viewing via a user node the revisioning tabs are not visible and it's only possible to edit the current version and not the latest revision.
Comment #17
rdeboer@Isostar #13, 15:
What is the code you're referring to?
@Ollie222, #16:
What are the versions of the modules involved, so that I can reliably reproduce your issue?
Comment #18
rdeboer