Closed (fixed)
Project:
OG Vocabulary
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Nov 2006 at 13:11 UTC
Updated:
17 Jan 2009 at 20:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
moshe weitzman commentedOuch. I don't know how i missed that.
This is not going to be easy to solve. i suggest hacking your core Drupal. Sometimes, thats the best way.
Longer term, I'd like regular old read only tables to be rendered through drupal_render like nodes are. Then we would have a point for altering the array ... Another possible approach is to use hook_link_alter() in drupal5 but these links don't go through there, and i'm not sure they should.
I'd be happy to discuss approaches on this so we have a good solution for drupal6
Comment #2
cooperaj commentedThe attached path will, with changes to taxonomy.module :-/, allow editing of group terms.
Like you said it is a nasty hack but I'm leaving my job on Friday so I'm not sweating it. :-)
Comment #3
cooperaj commentedThis patch will change 4.7.3 taxonomy in the correct way. eww.
I agree that hook_link_alter is probably not the way to go though I'm a bit stumped as to what can be done. It'd be nice to alter the permissions system to do this. Make it more fine grained to allow a sort of node access table for other things. Menus and blocks spring to mind. I'd see it as a sort of authmap for module permissions
How about a
hook_permission_veto($permission="administer taxonomy", $module_checking_permission="taxonomy", $context=array("task"=>"edit", "type"=>"vid", "subject"=>"12"))It's one of the weaknesses I see in the drupal permissions system. It's very difficult to get fine grained enough. For instance, to allow a group member the ability to post stories in one group also allows them to post in any that they are a member of. Even if the intention of that membership is just to view private posts.
I've altered content_moderator to work with groups. It has the exact same problem. A person with the permission 'moderate content' can moderate in all groups of which they are a member. To fix it other wise would require building the functionality right into og.
I've had to put a disclaimer on the group member page that says 'be sure to find out what a users permissions in other groups are before adding them to your group'.
But I digress. Sorry. ;-)
Comment #4
moshe weitzman commentedoccurs to me know that this might be solvable by defining a custom_url_rewrite() function to rewrite outbound links, specifically these taxo links when they appear on an og page.
custom_url_rewrite() is very powerful function - grep for it in path.inc. ... i can't explore this right now.
Comment #5
Luca Lenardi commentedOk. This hack works on Drupal 5.
Add a menu item on og_vocab.module to skip permissions:
Add the custom_url_rewirte() function on setting.php:
Comment #6
Luca Lenardi commentedThe same technique used to list vocabulary on a per-group logic must be used for terms.
To let users edit only terms for og vocabulary, change:
to:
Comment #7
Luca Lenardi commentedThis small patch to allow users to edit terms, skipping taxonomy access control.
This patch needs also the function
custom_url_rewrite()as showed in #5.Comment #8
moshe weitzman commented@Luca - great work in this issue. Thanks for your patches. Are you interested in co-maintaining this module? I will grant you CVS access and you can make the needed changes. I'm a bit unavailable these days.
Comment #9
Christefano-oldaccount commentedThanks, folks. Subscribing.
Comment #10
moshe weitzman commentedvery nice patch. i committed this and the custom_url_rewrite() function to this module since few sites use a rewrite function. those that do will need to copy the code in this module and then comment out our comment_url_rewrite().
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #12
jackbravo commentedI have some sites that use custom_url_rewrite and some that don't (most don't). So if I delete the function on the module I have to write it on every settings.php I have.
I made a change where the function is defined only if its not already defined using:
This allows users to extend this function only when necessary without deleting the function from the module.
Comment #13
moshe weitzman commentedThats an iffy solution - Site owners will just install this module and if they have a custom_url_rewrite then this module will simply not work. I almost rather throw a duplicate function error like today.
Comment #14
jackbravo commentedwhat about providing an error or a notice on the else clause. To inform site owners about the change they must make?
Comment #15
moshe weitzman commentedAnd how can they get rid of the error/notice? we have to build a checkbox or something. thats boring code.
Comment #16
moshe weitzman commentedComment #17
Leeteq commentedsubscribing
Comment #18
sethcohn commentedCurrently looking at a good/better answer for having og_vocab and context_prefix running at the same time. (context_prefix is weighted at -20, and despite a check for the pre-existence of custom_url_rewrite similar to #12's attempt, it fails to work and errors once og_vocab attempts to "redefine", because og_vocab's definition hasn't yet occurred at the time of the check (later weighting than the check itself))
[note - "better" than editing both modules manually (making upgrades a pain), or losing functionality of either.]
Comment #19
jleonard commentedThis problem appears to persist in 6.x -- correct? Workarounds similar to those mentioned above?
Cheers!
Comment #20
amitaibuThis should be fixed in commit http://drupal.org/cvs?commit=160722 for the D6 version.
Comment #21
likewhoa commentedI'm still getting the wrong linkage with latest -dev version. links for editing terms turn out like this.
Using drupal 6.8
Organic groups 6.x-1.0 & OG Vocabulary 6.x-1.x-dev (2008-Dec-30)
reopening bug since this is still an issue it seems.
Comment #22
amitaibu@likewhoa,
Did you run update.php? or try to menu_rebuild().
Comment #23
likewhoa commentedyes I tried both as I normally do and running hook_uninstall() and hook_install() didn't help it, links are still broken.
Comment #24
likewhoa commentedok I see where the bug is triggered, the thing is that vocabulary term editing works only when a vocabulary is associated with a group and term editing only works the group's node/%/og/vocab link, but then all term edit links in admin/content/taxonomy break. so this is a conflict with og_vocabulary & terms in admin/content/taxonomy that are not assigned to a group.
Comment #25
amitaibuFixed, thanks likewhoa!