diff --git a/src/classes/filter-types/taginput/Taginput.vue b/src/classes/filter-types/taginput/Taginput.vue index 05ce9ad01..1b51c3469 100644 --- a/src/classes/filter-types/taginput/Taginput.vue +++ b/src/classes/filter-types/taginput/Taginput.vue @@ -116,12 +116,12 @@ if ( this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship' ) { let query = qs.stringify({ postin: metadata.value, fetch_only: 'title,thumbnail', fetch_only_meta: '' }); - let endpoint = '/items/' + metadata.value; + let endpoint = '/items/'; if (this.relatedCollectionId != '') endpoint = '/collection/' + this.relatedCollectionId + endpoint; - axios.get(endpoint + query) + axios.get(endpoint + '?' + query) .then( res => { if (res.data.items) { this.selected = []; diff --git a/src/classes/filter-types/taxonomy/Checkbox.vue b/src/classes/filter-types/taxonomy/Checkbox.vue index 5b0a2927c..432794f97 100644 --- a/src/classes/filter-types/taxonomy/Checkbox.vue +++ b/src/classes/filter-types/taxonomy/Checkbox.vue @@ -81,13 +81,13 @@ } }, created() { - if (this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship' && - this.filter.metadatum && + if (this.filter.metadatum && this.filter.metadatum.metadata_type_object && this.filter.metadatum.metadata_type_object.options && + this.filter.metadatum.metadata_type_object.options.taxonomy && this.filter.metadatum.metadata_type_object.options.taxonomy_id) { this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id; - this.taxonomy = 'tnc_tax_' + this.taxonomyId; + this.taxonomy = this.filter.metadatum.metadata_type_object.options.taxonomy; } }, mounted(){ diff --git a/src/classes/filter-types/taxonomy/Taginput.vue b/src/classes/filter-types/taxonomy/Taginput.vue index c1d4cf1a1..7ef230929 100644 --- a/src/classes/filter-types/taxonomy/Taginput.vue +++ b/src/classes/filter-types/taxonomy/Taginput.vue @@ -44,13 +44,13 @@ export default { mixins: [ filterTypeMixin, dynamicFilterTypeMixin ], created() { - if (this.metadatumType === 'Tainacan\\Metadata_Types\\Relationship' && - this.filter.metadatum && + if (this.filter.metadatum && this.filter.metadatum.metadata_type_object && this.filter.metadatum.metadata_type_object.options && + this.filter.metadatum.metadata_type_object.options.taxonomy && this.filter.metadatum.metadata_type_object.options.taxonomy_id) { this.taxonomyId = this.filter.metadatum.metadata_type_object.options.taxonomy_id; - this.taxonomy = 'tnc_tax_' + this.taxonomyId; + this.taxonomy = this.filter.metadatum.metadata_type_object.options.taxonomy; } }, watch: { diff --git a/src/js/store/modules/search/mutations.js b/src/js/store/modules/search/mutations.js index b3e253402..31ce86310 100644 --- a/src/js/store/modules/search/mutations.js +++ b/src/js/store/modules/search/mutations.js @@ -36,7 +36,6 @@ export const addMetaQuery = ( state, filter ) => { compare: filter.compare, type: filter.type }); - console.log(state.postquery.metaquery); } };