There is some support for running without project_release_api_vocabulary defined, but it is incomplete. I have written a couple of patches that, at least for me, make things work again. These are all against the current 7.x dev version (20140621).

The first patch removes warnings on many pages. If the project_release_api_vocabulary is not defined, the variable_get currently defaults to the empty string. It is better to let it return a 0 instead; the taxonomy_vocabulary_load that is done afterwards then returns nothing without generating a type warning.

The second patch handles the fact that some parts of the code expect, if project_release_api_vocabulary is not defined, an empty string, while others expect a NULL.

The third patch changes the views relation to not add vocabulary handling to the views SQL query if project_release_api_vocabulary is not defined.

None of the patches should change anything if project_release_api_vocabulary is defined and contains a valid vid (vocabulary id).

With these patches, I get no more warnings when creating releases, records are inserted into project_release_supported_versions on creating a new release and the main project page renders the list of available releases correctly.

Comments

Frodo Looijaard’s picture

Status: Active » Needs review

drumm’s picture

Status: Needs review » Fixed

Thanks! Committed with some minor code style changes.

Status: Fixed » Closed (fixed)

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

Frodo Looijaard’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new814 bytes

Regrettably, there is still an issue left.

I wrote:

The second patch handles the fact that some parts of the code expect, if project_release_api_vocabulary is not defined, an empty string, while others expect a NULL.

It turns out that it is also possible for this to be false. My original patch tested for $tid == ""; this actually returns true if $tid is false. As applied, the test is $tid === "", which of course does not evaluate to true if $tid is false.

Attached a patch against the current version to solve this.

  • drumm committed 2703169 on 7.x-2.x
    #2316077 Running without project_release_api_vocabulary - $api_tid can...
drumm’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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