Should I make a module gterm like gnode?
Or should I make a new contentEnabler plugin in the group module?
--------------
how to use:
1. apply the dependence. 2797793-20.patch
Configurable entities as group content -> https://www.drupal.org/project/group/issues/2797793
2. Apply the gvocab patch.
3. Install the group vocabulary plugin.
4. Add a user to the group.
5. Relate vocabulary to group.
6. Go the ` /admin/structure/taxonomy` view own vocabulary.
| Comment | File | Size | Author |
|---|---|---|---|
| #81 | 2810131-gterm-81-79-interdiff.txt | 1.85 KB | mbovan |
| #81 | 2810131-gterm-81.patch | 29.38 KB | mbovan |
| #79 | 2810131-gterm-79-76-interdiff.txt | 4.7 KB | mbovan |
| #79 | 2810131-gterm-79.patch | 28.9 KB | mbovan |
| #76 | 2810131-gterm-76-75-interdiff.txt | 13.77 KB | mbovan |
Comments
Comment #2
matslats commentedThis patch provides a gterm module, similar to the gnode module
Comment #3
matslats commentedchanged the file extension of the patch in hope of getting it tested
Comment #4
zerolab commentedComment #5
kristiaanvandeneyndeI cleaned up the patch a bit in order to better understand it. It seems like this could be a nice addition, but it bypasses a lot of the forms Group provides for you. The permissions seem pretty limited as well, for instance there is nothing controlling the relationship entity (GroupContent).
Could you elaborate further what you're trying to achieve and explain (with screenshots?) what each screen/form is responsible for?
P.S.: Did not review GroupOverviewTerms as it's a bit massive :(
Comment #6
nicholas.alipaz commentedWas curious about this for a site I am working on, seems more like a feature request than a task. I would like to see this feature in the future.
Comment #7
skyredwangIs this feature similar/alternative to OG Vocabulary?
Comment #8
maxilein commentedCould you please explain the intended scope of gterm.
Comment #9
loicLEMEUT commentedHi all,
I have some error when i try to access to '/group/{group}/vocabulary/{taxonomy_vocabulary}/add', i will change this URL because the previous URL cause an error.
We have an another error in the submit handler form in .module.
Here is my patch.
Loïc
Comment #10
loicLEMEUT commentedHi all,
I currently correct 2 bugs:
I will give my patch just after I resolve that.
Loïc
Comment #11
loicLEMEUT commentedHi all,
Here is my patch when I resolve bugs of permissions et item rendered in vocabulary list.
Hum, for the vocabulary list page, I think we have to make a views like gnode module ?
Loïc
Comment #12
dravenkI add taxonomy term, then I have some error when i try to access to
`/admin/structure/views/view/group_nodes`
`/admin/structure/views/view/group_members`
error report:
```
Error: Call to a member function label() on null in Drupal\gterm\Plugin\GroupContentEnabler\GroupTerm->getPermissions() (line 64 of modules/custom/gterm/src/Plugin/GroupContentEnabler/GroupTerm.php).
……
```
Comment #13
dravenkI am on the basis of group-2810131-11.patch, added views like Gnode
Comment #14
dravenkComment #15
skyredwangInstalling #14 patch, go to
/group/*/terms, the error below is thrown:This was tested on Core 8.4.0-dev with PHP 7.1.7
Comment #16
kaizerking commentedIMHO Many hosting services are not providing Php 7. I suggest to do development work on 5.6. I have seen modules developed on php 7 as base throw errors on 5.6. php 7 errors should be rectified on case to case basis
Comment #17
loicLEMEUT commentedHi,
@skyredwang, same problem with Drupal 8.3.5 & PHP 7.1.
Perfect way we will have:
- First views have to list vocabulary who can access the user of group
- Second views have to list all terms in a views. It must have a button for add terms, and operations buttons like gnode.
Itis possible to list vocabularies to a views ?
https://www.drupal.org/node/2654684
Loïc
Comment #18
dravenkI'm sorry I did not do enough to check.
I fix the above problem on next patch.
Comment #19
dravenkComment #20
loicLEMEUT commented@dravenk Need help ?
Comment #21
dravenk@loicLEMEUT
yes . I don't know why the action I added didn't show up.
Comment #22
dravenkAdd gterm views
Comment #23
dravenkComment #24
loicLEMEUT commentedThis patch works fine, but I have some erreur 502 Bad gateway during clear cache or install/uninstall this modules.
No errors in watchdog.
Else everything is ok for me.
Comment #25
dravenk@loicLEMEUT
Maybe you can try this module
#2900635: Group Vocabulary
Comment #26
dravenkIn this patch, gvocab-2810131-26.patch Provide further about:
1. The group vocabulary offer by the taxonomy.
2. Offer permissions to edit of vocabulary.
3. Include the group_term feature what can be edit every term.
4. Different from group_term , You don't need to install every vocabulary in the configure avaliable content page.
5. Less the code. More then complete feature.
how to use:
1. Apply the gvocab patch.
2. Install the group vocabulary plugin.
3. Add a user to the group.
4. Relate vocabulary to group.
5. Go the ` /admin/structure/taxonomy` view own vocabulary.
Because the group vocabulary save the entity_id same with taxonomy vocabulary mechine name. So, you must apply that patch #2797793: Entities identified by strings as group content . That patch will alter the `group_content_field_data` table to change entity_id to VARCHAR(32).
Comment #27
dravenkNeed reviews, Thanks
Comment #28
maaty388 commentedPatch #26 is not working for me
site-name is unable to handle this request
Comment #29
dravenk@matjaz_zavski
Could you tell me how you do that?Because I not see your error message or anything.I'm difficult to do it better.
Comment #30
maaty388 commentedSteps to reproduce
Download group 8.x-1.x-dev
Download and apply your patch
Create new group type
Install gvocab plugin to group
Create new group
Go to related entities of your group
Relate existing entity to group
Group vocabulary
For content, you can choose default Tags
After saving I get error unable to handle request
Comment #31
dravenk@matjaz_zavski
Thanks. but, you forget apply the another patch. I was write down into #26
Comment #32
maaty388 commentedAhh... Sorry, that was the problem.
Now, this patch works without problems.
Thank you
Comment #33
dravenkComment #34
dravenkThe plugin name is too long. If the group bundle name also too long, then the database tables could not store the right name.So I rename the plugin id to a short name.
Comment #35
dravenkComment #36
maaty388 commentedCan you upload git diff between this 2 patches, please?
Comment #37
dravenk@matjaz_zavski
I had removed the patch #26 above.Then I 'm create the another patch . I believe the #34 completely different #26.
Comment #38
dravenkComment #39
dravenkNeed more reviews.
Comment #40
maxilein commentedI would be willing to test, but I don't know what I should test.
Maybe someone could specify the scope and features of this issue - #26 helps, but I would need a little more details ...
Comment #41
dravenkDo three thing in this commit.
1. Make vocabulary api level conform the permission of group content.
2. Remove one property which not use.
3. Clean code to make it conform to code specifications.
Comment #42
dravenkdb_select() note better ways in 9.0
Change to `$gvid = $group_content->getConfigTarget();`
Change the code comment to `@return \Drupal\Core\Access\AccessResultAllowed|\Drupal\Core\Access\AccessResultNeutral`
Should return the default `return AccessResult::neutral();`
Need more work to use the right ways.
Comment #43
dravenkComment #44
dravenkComment #45
lawxen commented@dravenk
I view the code,
The patch have bug:
If a user just have a permission Edit terms in Tags(or some other vocabulary)
The patch will prevent the user edit the Tags.
Comment #46
dravenk@caseylau
Thanks for review.
Fix:
Users lose their system permissions that can change the vocabulary terms.
Comment #47
dravenkA little bit clean.
Comment #48
lawxen commented@dravenk Great work!
can you uplaod the interdiff to help me find the difference
Comment #49
dravenk@caseylau
Thank you for reminding me.
Comment #50
lawxen commentedAfter apply the patch, group type's edit permission link get error.
Comment #51
dravenk@caseylau
Thanks for post bug report
Applied into this git commit:
Author: jhedstrom
Date: Fri Oct 20 13:50:51 2017 +0200
Issue #2908830 by jhedstrom, mgalalm, dravenk: Crash when clicking "delete" any group content
goto
/admin/group/types/manage/{group type}/permissionsis fine.but , after update group into follow commit. the output is broken.
see git log:
Related issue:
#2702735: UX - Group node: Clean up permission names
Comment #52
dravenkThe problem #50 not from this patch. Fix suggestions move to https://www.drupal.org/project/group/issues/2928190 .
Comment #53
dravenkChanges:
1. Create class GroupVocabularyAccessCheck.
2. Override entity reference autocomplete if user is group membership.
Comment #55
dravenkChange:
Update GroupTermAutocompleteMatcher make it filter the terms by right way.
Comment #56
alexd73 commentedI have this error
Comment #57
dravenk@alexd73
Thanks for reviews. but, can you reproduce with simplytest.me?See:
#52
Comment #58
dravenkMaybe #57 is wrong.
you miss a dependence possible. I writed down in #26
Comment #59
dravenkComment #60
dravenkComment #61
alexd73 commentedI can`t apply patch from https://www.drupal.org/project/group/issues/2797793#comment-12357500
Comment #62
dravenk@alexd73
Try this https://www.drupal.org/project/group/issues/2797793#comment-12225050 ?
2797793-20.patch.
Comment #63
alexd73 commentedOh! now I have this error:
Drupal\Core\Entity\EntityStorageException: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect integer value: 'for_information' for column 'entity_id' at row 1: INSERT INTO {group_content_field_data} (id, type, langcode, gid, entity_id, label, uid, created, changed, default_langcode) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 22 [:db_insert_placeholder_1] => department-group_vocabulary [:db_insert_placeholder_2] => ru [:db_insert_placeholder_3] => 4 [:db_insert_placeholder_4] => for_information [:db_insert_placeholder_5] => Разделы Ð´Ð»Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ [:db_insert_placeholder_6] => 1 [:db_insert_placeholder_7] => 1513344159 [:db_insert_placeholder_8] => 1513344159 [:db_insert_placeholder_9] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 805 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).I use these patches:
Maybe I must use something else?
Comment #64
dravenk@alexd73
no, I think your database tables is broken after you apply the patch #61 which you said. Are you try to rerolled database before #63 ?
Comment #65
dravenkOther thing you must case about. https://www.drupal.org/project/group/issues/2797793#comment-12296278
Comment #66
dureaghin commentedHi @alexd73. Did you tried to run "/update.php" ?
Thanks,
Alex.
Comment #67
alan_blake commentedfix group user cannot change weight on overview page on core 8.5
Comment #68
dravenkUnable to apply.
If this is an entity type id, it should be $entity_type_id.
I don't think this condition is necessary and this method getVocabularyId() will be removed before 9.0.0.
Check the code standards. Change the status to Need review. :)
Comment #69
JulienD commentedHi @dravenk
Could you tell us if the how to is still accurate?
Thanks
Comment #70
kyuubi commentedI would be interesting in this functionality.
Is there a chance this will get committed?
Cheers
Comment #71
carolpettirossi commentedHi kristiaanvandeneynde,
Are you interested in add this module to the group module or do you think it's better to have a separated module as groupmenu, for example?
Thanks,
Carol
Comment #72
amerie commentedIt looks like the newer patches with gvocab are providing different functionality than the original gterm. In our case, we don't want to associate entire vocabularies with groups, but individual terms in a single vocabulary. For anyone who needs that functionality, I updated the original gterm solution from comment #23 to be more like the gnode module and fix some bugs we ran into, etc.
Comment #74
sajosh commentedHi, I'd like to use gvocab.
Do I use the most current patch only, #72?
Or do i start from the beginning, #2, and apply all thirty some patches, one by one?
What do I do about the txt files?
Comment #75
mbovan commentedI'm not exactly sure in which direction this issue is going, but I am interested in allowing Terms entities as group entities (without vocabularies).
I made the following changes based on #72:
Comment #76
mbovan commentedI had to rewrite the patch from #75 as it had security flaws (allowing create access to vocabularies that are not enabled).
The patch now uses significantly less code and it relies upon Group base functionality.
Comment #77
carolpettirossi commentedHi @mbovan there is a separate module to the taxonomy enabler here: https://www.drupal.org/project/group_taxonomy
Maybe you should consider using it and then the maintainer of this module could close this issue since there isn't a plan to merge this patch anytime soon?
Comment #78
mbovan commentedHi @carolpettirossi
Thank you for pointing to Group Taxonomy module. I wasn't aware of it.
However, I tested it briefly and noticed it's different in functionality than other group modules (gnode, patched gmedia module).
The main differences between group_taxonomy and #76 (gterm) are:
That being said, I think it still makes sense to keep this issue open (#76) in case there are other people who want to have taxonomy terms integration with groups in a way gnode, gmedia do it.
Comment #79
mbovan commentedMore improvements to patch #76:
gterm_taxonomy_vocabulary_insert.bypass node accesspermission in thecreateEntityAccess().Comment #80
berdirI don't think that's correct. this permission is only for nodes, not for any other entity type.
Comment #81
mbovan commentedRight, there is no similar
bypass node accessfor taxonomy terms, so I wasn't sure what would make sense here.Instead, I added a new
create any group term entityglobal permission. This allows sites to easily enable this permission for super editors who should not have any group permission restrictions.Comment #82
mbovan commentedAs per Slack conversation the idea of the maintainer is to have common core entity types supported out of the box by Group module (Node, User etc). For other entity types, the recommendation is to create a separate contrib module to make future maintenance easier.
Based on that, I created Group Term module which is in a nutshell #81 with a very few changes (namespace, permission name).
I gave credit to everybody who contributed to this issue (thank you!):
Let me know if you think you're missing from the list and deserve credit.
To summarize, since we now have two contrib modules:
I think it's safe to assume that we have all cases covered.
I'll close this issue as won't fix and we can continue discussions in the issue queues of these two modules.
Comment #83
mbovan commentedReading through https://www.drupal.org/issue-queue/status#fixed: "The issue has been resolved (usually by committing a patch).", I think the status can be "Fixed".
Comment #84
kristiaanvandeneyndeCheers everyone who contributed to this!
While it's sad to admit, the fact that I could not find the time to properly review this module is exactly the reason we need more entity types supported in their own modules. So I think it's great that the effort here made that happen for taxonomy terms.
Good job, everyone! I'll assign credit according to the message in #82.
Comment #86
le72At this moment the Group Taxonomy doesn't provide the desired functionality for Group, like OG Vocabulary did for Organic Groups.
The idea of the maintainer to have common core entity types supported out of the box by the Group module not implemented at this moment. They should also include Taxonomy and Menu, both are core entities.
Comment #87
le72The idea is to provide each group with its own vocabularies (i.e. taxonomy). This lets groups logically segregate their content into categories that make sense for them.