Community tags port to 6.x
mariusooms - March 20, 2008 - 14:22
| Project: | Community Tags |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | critical |
| Assigned: | dropcube |
| Status: | active |
Description
Will this be a reality? I certainly hope so. If so, is there some estimation as when?
Kind regards and keep up the good work,
Marius

#1
...
#2
I'm also interested in Drupal 6 port of this module.
#3
Well, this seams to be the obligatory question these days ;) I'd be interested, too, and might even be able to punch in a few lines. CVS will see me soon.
#4
I am working on a patch.. will submit soon.
#5
subscribing
#6
subscribing
#7
I am interested in working on this port also as it is required for a project I am working on - would you be willing to provide me with your work so far?
#8
I have created a working port for drupal 6 based on the 5.x-1.0-beta1 release (and integrating the fix found on this issue tracker - #159479: Tagging Image Nodes Removes Image From Gallery). I have asked the current maintainer if I can become co-maintainer, and will upload the drupal 6 release as soon as I can.
Regards,
Nathan
#9
Excellent...your timing is perfect! Thanks for the effort.
Regards,
marius
#10
@nburies: could you post it as an attachment to this issue (preferably in both .patch and a .zip file format) so that people can test it in the meantime?
#11
I was working on a 6.x port of the module as well.
We must consider this:
Taxonomy terms are associated with node revisions
Issue: #115667: revisioned taxonomy
Community tags are going to deal with node revisions as well?
@nburies: Could you post your patch to review it and merge with mine?
#12
I created these .patch files with WinMerge... I'm not sure if this is correct? (I used to use Linux which did it all for me!)
@dropcube: Good point about the node revisions - at the moment my community tags v6.x only deals with nodes, but I will amend to use revisions instead.
#13
@nburles Could you please provide a one-file patch?
Edit: the patches did not apply.
#14
What program should I use to create the patch in windows? Then I will create a single file patch for you :-)
NB
edit: Thought maybe I should just attach a .zip of the folder in the meantime, so it can be tested before I work out how to create a working patch.
#15
nburles, See Create patches on Windows
I will try to test the zip file you posted.
#16
@nburles: Ok, I installed the updated module you uploaded but it does not work. It can not work beacuse there are menu entries missing, for example, the module only have two menu entries implemented in hook_menu: admin/settings/community-tags and community-tags/js. Entries and callbacks implementations for node/%node/tag, community-tags/user, ... are missing.
- There are blocks of code commented. If the code is not required any more, delete it.
- Do not move functions from their current positions in the file, this makes the patch bigger and is harder to review the code.
The .install file seems to be OK.Edit: The schema seems to be Ok, but you removed some required code from the install function (the code required to drop module weight so we act after taxonomy)
In this issue, we should port the current code to be compatible with 6.x, but fix other pending issues in follow up issues.
I am going to merge part of your work with mine and will submit a patch.
#17
Attached a working patch against the 5.x branch (which is where the recent development has been committed). All module functionalities I have tested seems to be working correct. Please review.
#18
This new patch splits the code to separate off the page handlers functions in the file community_tags.pages.inc.
#19
@dropcube: What is menu item community-tags/user supposed to do? I couldn't find a callback implementation in the v5.x beta1, so decided I would take it out of the menu for the v6.x version.
Also, there wasn't a node/%node/tag, which I see loads the node without the community tagging block?
Sorry about the moving of functions - I was not originally intending to submit to drupal.org, so merely included them in my port as and when I had written and tested them.
I had not previously understood the reason for the weight code (as it worked perfectly on my test systems without it), but thanks for pointing it out, I now get it.
How do I get the second patch to work? I have patched the files successfully, but when I try to run it on a test server, I get an error:
Fatal error: Call to undefined function community_tags_node_view() in community_tags.module on line 174 - it does not appear to include the community_tags.pages.inc file - is this a configuration issue for me?
Thanks,
Nathan
p.s. I've worked out how to create and apply patches in windows for future use, thanks for the link
#20
This patch changes community_tags_update_index to not use db_num_rows() (no longer in Drupal 6). The diff is based upon Dropcube's 236751-18.patch
@Dropcube: I still can't work out how to get it working with the functions in the community_tags.pages.inc file, so have locally moved them back into my main file - if you could advise me on how to solve this it would be appreciated. Thanks.
Nathan
#21
Hi everyone.
Well, to start off I haven't used comm_tags before and neither any patches. I'd just thought I'd let you know this: The only thing I did was to grab the ziped files and nudged them onto the server of an existing site, went to modules, enabled both, went to roles permissions and then went to test it with a couple of node types. The only thing that doesn't work for me is the first of the three options: "tab" (whatever that means. If it means tab as in "edit node tab", "track node tab", etc. than this doesn't work for me, either).
If tab option is supposed to work like the other two, too, i.e. if there is only an xor choise, I would ask for an option to turn off community tagging completely by node type. Either in node type configuration (as with comments) or via permissions. The later would be much handier for admins but I guess since the node type config interface is there allready to put it there would be easier to develop.
So thanks for wrapping that up and for all the development efforts. Hope to see a release soon.
Cheers.
#22
@nburles: node/%node/tag is the menu entry replacement of
'node/'. arg(1) .'/tag',(it's included in my the patch)It's required to act after taxonomy module.
#23
I have created a new development branch for the 6.x version of the module. A nightly development snapshot release is available for testing.
Tests and patches are very appreciated.
#24
@nburles's #20:
Thanks nburles for the patch. I would prefer to follow up that at #207832: update search index when adding tags, though. See my comment there.
#25
Please, test the development snapshot release or checkout from CVS 6.x branch and post follow up issues related to the 6.x dev of the module.
#26
@drupcube: I don't see a 6.x-dev in releases list view. Is that just because of delays in automated builds?
#27
I can't currently access the dev snapshot or a 6.x CVS branch, so have created this patch based on dropcube's 236751-18 version.
This patch corrects any errors when using the code review module. It also uses php's include_once to allow access to the community_tags_node_view function in the .pages.inc file - if there is a better way to achieve this please let me know or create a patch.
Nathan
#28
I've reviewed the code (v20 patch), looks good to me.
#29
#30
@nburles
There is a dev snapshot of 6.x, check http://drupal.org/node/90368/release
Also there is a 6.x branch in CVS, see http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/community_t...
Please, test and post your patch against the 6.x branch. Thanks.
#31
@dropcube: I was trying to commandline CVS just -r DRUPAL-6, so that would be why I could not access it before :-)
This patch corrects any errors when using the code review module. It also fixes tagging with javascript disabled, and implements a few important Drupal 5 -> 6 changes.
Nathan
#32
after I installed 6.x-dev version a couple of hours ago I get the following error:
Fatal error: Call to undefined function db_num_rows() in /home/www/drupal/sites/all/modules/community_tags/community_tags.module on line 48So far I got on any save operation, namely on teleport.module admin settings page, community_tags admin settings page, and content type article settings where the ones I tried.
Additionally, when chosen "inline" in content type workflow settings, actually "tab" is used. When changed to "tab" in workflow settings (save works for this content type) tabs are used. And thirdly if set to "block" again the tab is displayed. Strangely in the version from nburles #14 tabs was the only option that didn't work.
Cheers.
#33
Well, it turns out the after clearing the cache everything works fine. I wonder why ;) Sorry for rushing this!
This doesn't stop my from wondering if the tab is supposed to always be visible. On the site I installed the module I want to enable it only for a subset of content types but see no option for this. As said above in #21 I would love to see such an option. Optimally in settings to enable it per content type through checkboxes which would mean to create a new "interface" but would be much more effectiv for admins. For me it would be sufficient just to including a forth "disable" option to workflow settings in each content type.
Cheers.
#34
@thomas23: Thanks for testing and reporting the issues.
The Fatal Error you are getting surely was beacuse the cron.php ran and the function
community_tags_update_index()get executed. I have not ported to 6.x this function yet beacuse this function will be removed in favor of other approach, see http://drupal.org/node/207832#comment-926793 at this issue #207832: update search index when adding tags.I will fix soon the other issue related with the tab option.
@nburles:
Thank you very much for your effort. I am sorry, but your patch did not apply for me :( . Please, try doing the diff from within the module's root directory rather than Drupal root nor driver's root. Also would be good if you can make a patch directly against CVS 6.x branch beacuse I am working actively on the migration and the release system creates a 6.x-dev snapshot every 12 hours.
Edit: you can find further information in the Developers handbook: Creating Patches.
#35
I have committed a fix for the indexing issue (#207832: update search index when adding tags)
#36
This time I used tortoiseCVS to create a patch directly against the CVS - so hopefully this one will work! (It appears to have created a patch in a slightly different format than WinMerge, despite me following the instructions for that s/w!)
#37
@nburles: The patch applies cleanly now!!!. I have committed it. Thanks.
I will coordinate with the other maintainers and will issue a beta release for 6.x soon.
#38
That's great, I'll use tortoiseCVS in future :-)
Thanks