Closed (fixed)
Project:
Term Merge
Version:
7.x-2.0-beta2
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 May 2011 at 20:24 UTC
Updated:
18 Jan 2013 at 00:19 UTC
Jump to comment: Most recent file
Comments
Comment #1
nylin commentedHi MXT and thank you for filing this.
Thanks,
m
Comment #2
mxtHi, Nylin!
1) Ok, now I've found it, thank you ;)
2) No error messages, I've enabled only another language only to have interface labels translated in ITALIAN (only the "locale" module is enabled, no others i18n), english and italian languages are active but the italian is setted as "default", "multilanguage support" is NOT enabled for my content types (I don't need translation), other taxonomy modules I've installed are : "taxonomy manager" and "synonyms".
I've not tried the DEV version but I'll do if you think it can be useful.
Thank you!
Comment #3
nylin commentedComment #4
dddbbb commentedMight be an idea to add a note to the read me file (first place I checked for info) - it took me a while to find the option to merge as well.
Comment #5
mxtPlease, can you reconsider issue described in 2).
Taxonomy Manager now use term merge API to merge terms, but that issue is still open:
http://drupal.org/node/1253616#comment-4883234
Thank you very much
Comment #6
barrapontoPlease see #1262810: Use a tab or a link instead of the "merge" button, it has pictures and a patch.
Comment #7
mxtBarroponto why did you close this issue? This thread is now dedicated to point 2 of my question, that's not a duplicate of your link (that resolve point number 1)
(I've changed title with another more appropriate)
Comment #8
barraponto@MXT sorry about that.
Comment #9
dusov commentedSame problem.
Comment #10
dusov commentedSolution here #1312584: Term merge does not work with multiple language
Comment #11
mxtYes, patch in http://drupal.org/node/1312584 solves the problem!
Thank you very much!
Comment #12
jonathan_hunt commentedI just tried this module on a non-multilingual site and after the merge none of the nodes with the term being removed had been updated with the "new" term. No error messages produced. When subsequently viewing a node that had the term removed I get
Comment #13
jonathan_hunt commentedThe attached patch solved the immediate issue for me. $update_data_arr['dest_tid'] is not an object so $update_data_arr['dest_tid']->tid does not exist.
This successfully updates the specific node with the new term.
However, taxonomy_index table is *not* updated. So using taxonomy/term/%tid does not show the newly updated nodes, only the original nodes...
Comment #14
mxtJonathan, seems that this module maintainer has made some confusion with the version releases of this module, see http://drupal.org/node/1409114#comment-5588794
At this point i hope the maintainer makes some order in the releases of this module
Thank you very much.
Comment #15
jonathan_hunt commented@MTX The issue you pointed to has the same fix (doh, wish I'd spotted that earlier). Still, if the maintainer has recommended 7.x-2.0-beta2 then it would make sense to patch against that.
The attached patch incorporates the changes in #13 and adds a fix to update the taxonomy_index. It works for me on nodes; haven't tried it on other entity types.
Comment #16
mxt@Jonathan, I had to apply your patch manually (using 'patch' via command line didn't works).
Terms are correctly merged but with an ajax error.
Comment #17
mototribe commentedthe #15 patch worked for me (could apply it too). The only thing that doesn't work is applying a new term during the merge. The field for "name of new term" is greyed out".
Comment #18
guillaumev commentedNew patch which applies to the latest dev version... Can also confirm that it works...
Comment #19
thomas73 commentedThanks, #18 works for me.
Comment #20
summit commentedYes this works #15 and #18.
Can this be set now to reviewed by the community?
Greetings, Martijn
Comment #21
vchen commentedI get an AJAX error when I applied the patch :(
Comment #22
mxtSame as #16
Comment #23
dhc-history commentedThe patch #16/#18 worked for me for "node" entity types, but it's not working for other entities. Specifically in my case, it's not working on Profiles 2 profiles. In the progress bar, it says that it's updating Profiles 2 fields, but then doesn't actually do it and just deletes the old term.
Any suggestions for how to make this work for Profiles 2 fields?
Comment #24
Taxoman commentedComment #25
Taxoman commentedComment #26
blazindrop commentedWanted to update this issue because I just posted a patch to taxonomy manager, which has a nice interface to use term merge.
Taxonomy manager is relevant on this issue because if you are CALLING term merge from taxonomy manager you may encounter an ajax error (which my patch at http://drupal.org/node/1791594 fixes) whereas going through Structure > Taxonomy > VOCAB NAME > Merge Terms does not.
Comment #27
jordanmagnuson commentedJust wanted to say that I've also run into this.
Just used Taxonomy Manager to merge a bunch of terms, and reference fields pointing to the old terms were NOT updated to point to the new term. 1300 NULL term references, which caused a bunch of site errors.
Bummer.
Comment #28
s.daniel commentedApplied patch term_merge.module cleanly.
Since this bug can cause quite some damage it would be nice to see it committed soon even without support for other entities.
Comment #29
R.Hendel commentedThanks @jonathan_hunt,
Patch #15 works fine for me!
Comment #30
cangeceiro commentedPatch in #18 also worked for me. Considering the last commit was 41 weeks ago. will this even get committed into the main branch?
Comment #31
mxtI've just wrote a mail to the maintainer of this module (Nylin) to try to have this patch committed.
Comment #32
prinds commentedHere's a patch that attempts to make this compatible with other entities than nodes..
@dhc-history, will you test this with profiles 2?
Meanwhile, if patch #18 will not be committed, there should at least be some kind of disclaimer or notice informing, that the D7 version is not functional at the moment.
Comment #33
mxtFollow up from #31: not answer yet from this module maintainer (Nylin).
To EVERYONE: please, try to contact Nylin you too, and if we get no answer I think we can follow the procedure to declare this module "unsupported" (see: http://drupal.org/node/251466).
Someone is interested in became a maintainer?
Comment #34
Pascoual commentedPatch #32 works for profiles 2 entities (and it should on others entities).
Thanks to prinds ! If you have the time (this is the big deal) why not become the maintainer ;) !
Set to NR to activate tests on patchs.
#33 => I sent an email to nylin 5 min ago, we will see.
Comment #35
mxt@Pasqual: did you receive any response from the mainteiner?
In the meantime, I've invited bucefal91 who already has developed a term merge module: see http://drupal.org/node/1840208#comment-6784870
Comment #36
fonant commentedPatch #15 works here with 7.x-2.0-beta2, thanks!
Comment #37
bucefal91 commentedHello, gentlemen!
As I was kindly invited to become a maintainer of this module by MXT, I guess I can't resist such honor :) In the next few days I will download beta release and dev branch 7.x and review code. After I've seen the code and get some feeling about the module and its functionality I will give final reply on whether I will be able to maintain it.
In the meantime, should I contact the current maintainer too? Or we will just piss him off by so many spam mails?
Comment #38
bucefal91 commentedI wasn't able to download 7.x-dev (I am still new to drupal.org) but I installed the beta release and it doesn't seem to work. I just created a vocabulary, added 2 terms, and 2 nodes with taxonomy term field pointing to each term and tried merging and now when I try to view the node of merged term, I get some error.
Long story short, I've reviewed the code also. There are some things that I am not agreed to in the architecture. Firstly, I think this module puts too much "Merge term" buttons, basically the button is on the vocabulary overview page, there is a tab "Merge Terms" and if you try to delete a term, the module also offers itself suggesting merge instead of simply delete the term. Isn't it too aggressive? Personally I do not mind maintaining it this way, if the module users say it's fine.
And a more important thing... How this module does merging is firstly going through all the taxonomy term reference fields and updating it to the trunk term, and then, if the previous operation was successful, it deletes the branch terms. Now, if for some reason the updating fields operation didn't go smooth, the already processed branch terms won't get deleted. It's not much of a problem, nevertheless, something to mention.
As I have implemented similar functionality in synonyms module, in the synonyms module I have slightly different approach. First of all, I do not support merging multiple terms. Another difference is that I encapsulated "merge term" function into a drupal action. So it can be used in rules and other modules. This approach seems better. And definitely it has to support merging multiple terms. I will implement it, but implementing it, I'd prefer doing a term by term merge rather than updating all the fields for all the terms and then deleting all the branch terms.
Summarizing, the implemented in this module approach promises to be faster, because sometimes you have to update the same entity 2 times (if it has 2 term references) and you save it (a slow operation) just one time, while my view on the problem is slower you'll probably end up saving the same entity 2 times in the above case, but it promises to be more stable and resistant, because it's less probable that if it breaks down, it will break down in the middle of something.
Please, share your thoughts and opinions.
If eventually I become a maintainer of this module, I'd prefer to rewrite almost the entire module and I will just keep the interface that uses Taxonomy Manager module, so the maintainers of that module shouldn't worry about changes on this end.
Comment #39
mxtHi Bucefal91, thank you for joining this conversation.
For:
I think for correctness is better that you too try to contact the maintainer and offer yourself as co-maintainer of this module as first step.
If we still get no response, I think we definitively have to follow the procedure: http://drupal.org/node/251466
Thank you for the moment!
Comment #40
s.daniel commentedHi bucefal91 and thank you for stepping up.
I think the best option in terms of functionality and architecture for the modules users would be to have two branches for D7.
One to maintain the current functionality and only fix bugs or commit user supplied patches and basically leave the functionality as is in 7.x-2 and a second branch (7.x-3) where you can improve the architecture etc.
Comment #41
bucefal91 commentedI have just sent emails to both nylin and eli asking whether it would be possible to get access to this module.
s.Daniel, I see what you mean. First of all, definitely I won't do major changes in the module without having approved it with module's community (with you guys). I will review the code closer after I get access to the module and if major changes are required, I will do 3rd branch, otherwise I will try to keep things from outside (in API and UI of the module) as they are and will just change the guts.
Let's wait for replies from the maintainers.
Comment #42
bucefal91 commentedI have been kindly granted access to this module by Max Nylin. Hooray!
I hope to have time for reviewing and recoding this module this weekend or so.. in the meantime, there are some patches in this issue. Should we commit some?
Comment #43
mxtGood news bucefal91!!!
I think patch in #18 and #32 have to be committed because resolve some issues. But I'm not so sure about the version (see http://drupal.org/node/1160612#comment-5642200 ) they have to be applied...
I think is time to make some order, so you, bucefal01, are very welcome!!!
:-)
Comment #44
s.daniel commentedGood news :)
Thanks to Nylin as well here!
Comment #45
bucefal91 commentedHello, guys!
I have taken a major rewrite on the module branch 7.x. Somehow the repository is kinda messed up too, because there is only 1 head for 7.x version, which is 7.x-1.x but somehow the module already has the release "7.x-2.0-beta2", so, I guess in future I will be working with 7.x-2.x version to make the number sequences correct.
Now the summarize of what I've done.
Besides that, I haven't touched the public interface of this module, so this very same version should be compatible with Taxonomy Manager module without any action required from that side.
I have enabled the 7.x-1.x-dev for downloading on the project page. Everybody who is interesting in this module and wants to help its development, please, download this branch and play around with it. Report all bugs.
Comment #46
s.daniel commentedWow that's a lot of changes!
Thanks a lot for all the work.
Since this issue relates to a specific problem in a version that will probably not recieve updates maybe we should close the old issues as soon as a rc of your new version is published?
In any case I'll post new issues for things I find while testing.
Comment #47
s.daniel commentedNote about positive change of behavior:
With beta2 when merging a term which has child terms into another term als child terms got merged. With the new dev this has been fixed and the child terms will remain.
Example Merge "2" into "4"
Input:
Old Result:
New result:
Thanks - thats way better!
Comment #48
bucefal91 commentedI think yes, in future if people find any new bugs, a new issue should be filed for each new bug separately.
Anyone else from the old community of Term Merge module, please, take your time to review the new version of module and post here, or file a new issue if you have found a bug.
In a week or so, if no one posts in this issue I will close it as fixed because module indeed seems to be in working conditions. Once I have all bugs closed in this issue queue, I will tag an rc for 7.x-1.x branch and will mark it as suggested release on the project homepage. And if no new bugs will be arriving and I will see increase in the usage of the module, I will close as many feature requests as I can and then will tag a stable release of the module. That's my game plan.
Comment #49
mxtI've just tried latest DEV release and all seems work very fine: thank you very much Bucefal91!!!
As I'm the author of this thread, I'll mark this as fixed.
Comment #50
bucefal91 commentedHehe, guys, it was fun shaping up this module with you :) Most of the bugs are fixed now in the issue queue, so in the next few days I am gonna tag a release candidate for this module. I just need to merge into dev some feature requests that I have done and it's good for tagging.
By the way... I am gonna do some promotions here. I also need unit measured value functionality for one of my projects on D7, i.e. one enters value and units in which he's entering it, and for another user you may display the same value in another units - this kind of functionality. And seems like there is no any decent solution for D7 yet. I have been granted access to these 2 modules:
http://drupal.org/project/units
http://drupal.org/project/mvf
And I am currently working on the 7.x branch for those 2. Eventually I hope to introduce a new field type for Fields API, measured value (value + units), and in formatters you will be able to specify in what units you want to show the value. So, if you find yourself in need of something similar - please, just patiently wait till I publish a release, and be sure that at some point I am gonna do it, because, as I said, I need it for myself.
Comment #51
s.daniel commentedWOW bucefal91 your starting Drupal dev like a rocket! Thanks. :)
Comment #53
bucefal91 commentedJust want to post here that I first version of Measured value field type are available now for Drupal 7.
http://drupal.org/project/units
http://drupal.org/project/mvf
Get the 7.x versions of these modules and test them if you need this kind of functionality.