Closed (outdated)
Project:
Features Extra
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2010 at 09:35 UTC
Updated:
24 Mar 2020 at 07:22 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
raphael waeselynck commentedI realized the term export functionality...I mostly used functions already prepared by makara.
Tested on tags terms and hierarchised terms, seems to work fine, so please tell me if anything 's also working fine for you.
This patch also solve part the issue http://drupal.org/node/750802 (thanks Pierre Antoine) to avoid loosing taxonomy machine name when adding a term.
Comment #2
sdelbosc commentedJust to track the issue...
Comment #3
xurizaemonTesting this (a reminder for me to post feedback after the next rollout to staging).
Comment #4
xurizaemonTested this on a rollout, but the terms were not added to the created taxonomy as hoped.
Marking needs work for now (sorry).
Comment #5
sdelbosc commentedThank you for your feedback Chris and really sorry that the patch didn't work as expected.
Could you please provide us with the following information:
Comment #6
pacproduct commentedHi,
I tested the terms import when running a complete install of Drupal, and it did not work for me neither. I checked the source code and corrected a little something in Raphael's patch. Now, it works just fine for me.
See my correction suggestion in the attached file.
Comment #7
raphael waeselynck commentedIndeed our tests were run on an update task, not on a "from scratch" install. Thus, terms import was working only when vocabulary exists.
My apologies, tested code from PAC, it works fine for us now.
Comment #8
ronald_istos commentedTried this on two taxonomies - one was about 15 terms and it worked great. The other has 9180 terms and it timed out after 300s - will try and have a look at the code and see if it can be optimized but keep in mind that as is it can't handle huge taxonomies.
Comment #9
jmseigneur commentedSuccessfully applied patch #6 for two vocabularies of around 200 terms. However, I had Views with terms-based filters and the filters were not synchronised correctly.
Comment #10
marcrobinsone commented(after applying the patch at #6):
I just want to note that if you delete a vocabulary -- and then revert it via features, it will recreate the vocabulary & term structure with a new Vocabulary ID.
So if my original vocabulary lived with VID 1, reverting it will recreate the vocab & terms with VID 2 (incremented, depending on the current vid counter).
While this is not a biggie, it might be a concern for those who implement their Views fields / filters that reference Vocabulary IDs.
This is where it gets tricky...
Comment #11
simon georges commented@marcrobinsone, the issue is located in Features module, see #789674: Support vocabulary[module] field.
@everybody, as several people stated the patch works (at least for a few terms), I'm changing the status, and hope it can be released in next version, while the other issues are being worked out ?
We can start by stating on the project page that there is a limitation in terms of volumetry, it would still be a plus functionnality for some people, don't you think ?
Just change the status back if you disagree with me.
Comment #12
acouch commentedI'd like to use this so I re-rolled the above patches against the current dev as the above patches failed.
There is still the problem with #10 above but this will at least allow folks to start with a patch that doesn't fail (for now).
I will try and work on the issue above if time permits.
Comment #13
acouch commentedupdated status
Comment #14
acouch commentedI got this working fixing the issue with #10. It keeps track of the vid now so if that vocabulary is deleted it or was never created it adds it.
The only caveat is that if there is another vocabulary with that vid it will override it.
Comment #15
acouch commentedI took this one step further and kept track of vid and tid.
This will overwrite existing Vocabularies or Terms if they have the same vid or tid.
This is the logical conclusion if you are going to treat terms as structure. If the tid is not maintained than the rest of the site that is using them will break (ie views).
The one term table that is not captured or overwritten by this patch is term_node. It is debatable but I think even if you are treating terms as structure the nodes associated with terms would still be content and this would be lost overwritting term_node.
Comment #16
aschiwi commentedSome feedback from me: I used the patch from #15 successfully for a rather small vocabulary that includes a flat hierarchy of only a few terms (no more than 20). It works really well so far (have had it in use for about a week of development time). Thanks!
Comment #17
wonder95 commentedI was able get this to work for me on a small vocabulary with a couple terms. My vocabulary already existed, but the terms didn't, and it added them. I did get an error that it tried to create the same vocabulary even though it already existed (when trying to update the vocabulary table), and looking at the code, I noticed an error. In lines 175-177, it (supposedly) checks to see if a vocabulary with that tid exists, and then deletes it and re-adds the new one if it does exist:
The problem is, the vocabulary table has a vid column, not tid, so this check will fail every time. In my case, I had created the vocabulary via the feature before applying this patch, so everything worked out fine, but it explains why I got the error when I tried to insert the vocabulary.
I'll try to re-roll with that fix if and when I get a chance. Other than that, this works great.
Comment #18
wizonesolutionsWaiting for wonder95's patch. Thank you for fixing this up, guys.
Comment #19
fuerst commentedHere we go: Patch #15 + #17.
Comment #20
pfrenssenDrupal 6 is no longer supported. Closing.