You can resolve the issue by editing line 16 of the Data Fetch Script to pass in the catalog value which is set earlier in the script, from: if (!catalog_item.canViewOnSearch() || !catalog_item.getFirstAccessibleCategoryForSearch()) {