The functions for creating taxonomy terms during install were broken – calling a function no longer available in Drupal 7.

As soon as I saved this issue (and got an issue number) I will upload a patch fixing this, as well as allowing referencing vocabularies by machine names rather than vid or modules.

CommentFileSizeAuthor
#4 schaaf.info6.55 KBAnonymous (not verified)
#1 term_creation-1183454-1.patch2.58 KBitangalo

Comments

itangalo’s picture

Status: Active » Needs review
StatusFileSize
new2.58 KB

As promised: attached is a patch fixing this issue. The README is updated, too. :-)

q0rban’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Status: Closed (fixed) » Active
StatusFileSize
new6.55 KB

Term creation is still unsuccessful.

I've tried creating vocabularies before profiler runs (by putting the vocabulary creation task before the call to profiler_install_profile_complete). But, my terms are not populated.

Terms are defined like this:
term[advertiser][name] = "Advertiser"
term[advertiser][vocabulary_machine_name] = "type"
term[publisher][name] = "Publisher"
term[publisher][vocabulary_machine_name] = "type"

After install, the "Type" vocabulary exists, but there are no terms in it. I've attached my full profile.info file.

thedavidmeister’s picture

@FilmFnurd it should be "terms" not "term", also the link to your info file appears to be broken.

thedavidmeister’s picture

Status: Active » Fixed

I was having the same issue, where terms would not be created. I checked the taxonomy_vocabulary table right as profiler calls taxonomy_get_vocabularies() and the table was empty, I checked again after installation and the table had vocabs in it...

After spending some time poking around in Features for a bit to try and get it to do it's thing during installation I noticed that Features rc3 was released for D7 two days ago.

I installed that (was previously using rc2 for Features) and now terms are being populated in the database as expected.

Fix is to make sure you're using at least rc3 for Features.

Anonymous’s picture

I can confirm that this issue is resolved by 1. Per #5, using the proper syntax (terms[blah]...) and 2. Per #6, upgrading features to rc3. As long as the vocabulary exists (either created programmatically or by Features), then profiler will populate it with terms.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.