fixed solr configs after massive update broke it all
This commit is contained in:
@@ -134,6 +134,9 @@ export default {
|
||||
let uuid = uuids[i]
|
||||
// https://stackoverflow.com/questions/11258077/how-to-find-index-of-an-object-by-key-and-value-in-an-javascript-array
|
||||
let item_index = data.findIndex(p => p.id == uuid)
|
||||
// console.log('item_index', item_index);
|
||||
if(item_index == -1) continue;
|
||||
|
||||
let item_src = data[item_index]
|
||||
let attrs = item_src.attributes
|
||||
let relations = item_src.relationships
|
||||
@@ -149,11 +152,15 @@ export default {
|
||||
|
||||
// get images included values
|
||||
let img_src = relations.images.data
|
||||
console.log('img_src', img_src);
|
||||
// this is a temporary deactivation of images
|
||||
img_src = [];
|
||||
item.images = []
|
||||
for (var j = 0; j < img_src.length; j++) {
|
||||
item.images.push({
|
||||
title: img_src[j].meta.title,
|
||||
// meta.imageDerivatives.style.href link is provided by drupal consumers_image_styles module
|
||||
// BUG: meta.imageDerivatives does not exists
|
||||
url: img_src[j].meta.imageDerivatives.links.card_medium.href
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user