We were having issues with the module where the index process was failing, our log files were showing that there were undefined variables:
Mar 18 16:26:10 srv-6889 cyw8pci7n4bve[26512]: https://x/batch?op=start&id=34651|1||Notice: Undefined variable: exclude in SearchApiAttachmentsEntityreferenceAlterSettings->alterItems() (line 53 of /mnt/www/html/cyw8pci7n4bve/docroot/sites/all/modules/contrib/search_api_attachments/contrib/search_api_attachments_entityreference/includes/callback_attachments_entityreference_settings.inc). request_id="v-8a8117a4-499a-11e9-9ae6-2f9fc32383e6"
Mar 18 16:26:10 srv-6889 cyw8pci7n4bve[26512]: https://x/batch?op=start&id=34651|1||Notice: Undefined variable: max_file_size in SearchApiAttachmentsEntityreferenceAlterSettings->alterItems() (line 53 of /mnt/www/html/cyw8pci7n4bve/docroot/sites/all/modules/contrib/search_api_attachments/contrib/search_api_attachments_entityreference/includes/callback_attachments_entityreference_settings.inc). request_id="v-8a8117a4-499a-11e9-9ae6-2f9fc32383e6"
It looks like the following code is missing from the alterItems method in search_api_attachments_entityreference/includes/callback_attachments_entityreference_settings.inc
$exclude = explode(' ', $this->options['excluded_extensions']);
$max_file_size = parse_size($this->options['max_file_size']);
public function alterItems(array &$items) {
// Get the entity reference fields.
$entityreference_fields = $this->getEntityReferenceFields();
// Get the file fields.
$file_fields = $this->getFileFields();
$exclude = explode(' ', $this->options['excluded_extensions']);
$max_file_size = parse_size($this->options['max_file_size']);
foreach ($items as &$item) {
....
Comments
Comment #2
izus commentedhi,
good catch
actually the complete snippet here is:
i will add it
Comment #4
izus commentedThis is now merged
Thanks
Comment #5
mijpcw commentedThank you.