I am using Apachesolr module together with the Apache Solr File and File entity modules in order to be able to index and search fieldable files.
Unfortunately I stucked with the following problem. Both modules Apachesolr module and Apache Solr File implement hook_entity_info_alter. The the modules don't have specific system weight and the hooks are executed in an alphabetical order:
1. First Apachesolr module alter the entity info and mark the entity bundles (including the default file bundle called "file") that are indexable.
2. Then Apache Solr File alter the file entity info to add new bundles.
3. Now the new file bundles are not marked from the apache solr.

I suppose that similar problem is possible with other contrib modules, too,
Therefore I suggest patch in the apachesolr module. The patch is pretty simple - just to change the module weight.

Comments and suggestion are welcomed.

Comments

boyan.borisov’s picture

Status: Active » Needs review
StatusFileSize
new456 bytes

This is the patch...

Status: Needs review » Needs work

The last submitted patch, apachesolr_module_file_entity_module-1992050-1.patch, failed testing.

nick_vh’s picture

do you mean apachesolr_attachments? This patch is invalid, and most likely the custom module needs to do some adjustments.

boyan.borisov’s picture

Status: Needs work » Needs review
StatusFileSize
new437 bytes

Nope, I mean the following module apachesolr_file.
The patch was wrong because I was created from old dev version :( sorry...

I was wondering where is the appropriate place for this fix but I think that there is a plenty of modules that use hook_entity_info_alter to add new bundles. This fix will handle the situation in more common way.

boyan.borisov’s picture

Status: Needs review » Needs work

I forgot to add the sql update in the install hook too...

boyan.borisov’s picture

Upload a patch with fixed install hook

boyan.borisov’s picture

Status: Needs work » Needs review
nick_vh’s picture

Project: Apache Solr Search » Apache Solr File
Component: Contrib » Code
Status: Needs review » Needs work

This should not be solved like this in the apachesolr module. It's the responsibility of the apachesolr_file to make sure it has everything it needs to function. Changing weights like this might cause other problems for other websites.