Skip to content

Taxonomy term vocabulary not working#26

Open
njt1982 wants to merge 1 commit into
olragon:masterfrom
njt1982:fix-taxonomy-vocabs
Open

Taxonomy term vocabulary not working#26
njt1982 wants to merge 1 commit into
olragon:masterfrom
njt1982:fix-taxonomy-vocabs

Conversation

@njt1982

@njt1982 njt1982 commented Oct 25, 2019

Copy link
Copy Markdown

I think the problem lies around here:

return isset($value->{$property}) ? $value->{$property} : null;

If I do this:

query {
  taxonomy_term(tid:"27074" ) {
    tid
    name
    vocabulary {
      vid
      name
    }
  }
}

I get:

  "data": {
    "taxonomy_term": [
      {
        "tid": "27074",
        "name": "",
        "vocabulary": null
      }
    ]
  },

I think this is because vocabulary is being treated as a property on a term?

@njt1982

njt1982 commented Oct 25, 2019

Copy link
Copy Markdown
Author

Hmm.. entity_get_property_info() returns vocabulary as a property on tazonomy_term...

@njt1982

njt1982 commented Oct 25, 2019

Copy link
Copy Markdown
Author

With this change, the above query works:

  "data": {
    "taxonomy_term": [
      {
        "tid": "27074",
        "name": "",
        "vocabulary": {
          "vid": "5",
          "name": "[REDACTED]"
        }
      }
    ]
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant