Term export is not coded yet. As I really need it for my project's need, I can work on it and then propose it.
However, Makara, if you're working on it and going to propose it soon, I can wait, you might code it better ;)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

raphael waeselynck’s picture

Category: task » feature
FileSize
5.95 KB

I 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.

sdelbosc’s picture

Just to track the issue...

xurizaemon’s picture

Testing this (a reminder for me to post feedback after the next rollout to staging).

xurizaemon’s picture

Status: Active » Needs work

Tested this on a rollout, but the terms were not added to the created taxonomy as hoped.

Marking needs work for now (sorry).

sdelbosc’s picture

Thank 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:

  • the version of features_extra you use
  • any error messages you saw or written in the logs files
  • the test you did and the expected results
pacproduct’s picture

Status: Needs work » Needs review
FileSize
4.68 KB

Hi,

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.

raphael waeselynck’s picture

Indeed 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.

ronald_istos’s picture

Tried 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.

jmseigneur’s picture

Successfully 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.

marcrobinsone’s picture

(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...

Simon Georges’s picture

Status: Needs review » Reviewed & tested by the community

@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.

acouch’s picture

FileSize
5.97 KB

I'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.

acouch’s picture

Status: Reviewed & tested by the community » Needs work

updated status

acouch’s picture

Status: Needs work » Needs review
FileSize
7.33 KB

I 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.

acouch’s picture

FileSize
11.64 KB

I 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.

aschiwi’s picture

Some 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!

wonder95’s picture

I 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:

    if ($vid) {
      db_query("DELETE FROM {vocabulary} WHERE tid = %d", $vid);
    }

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.

wizonesolutions’s picture

Assigned: raphael waeselynck » Unassigned
Status: Needs review » Needs work

Waiting for wonder95's patch. Thank you for fixing this up, guys.

fuerst’s picture

Status: Needs work » Needs review
FileSize
10.94 KB

Here we go: Patch #15 + #17.

pfrenssen’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Drupal 6 is no longer supported. Closing.