Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Running Drupal 7.23, Rich Snippets 7.x-1.0-beta3+0-dev, and ApacheSolr 7.x-1.5.
When attempting to visit /search/site or /search/node or /search/user, result is an error 500 and the following entry in the apache error log:
PHP Fatal error: Call to undefined function apachesolr_get_index_key_map() in /[$SITEROOT]/sites/all/modules/rich_snippets/rich_snippets.apachesolr.inc on line 133
I couldn't find anything relevant in Google, SO, or d.o. Any recommendations? Thanks!
Comment | File | Size | Author |
---|---|---|---|
#12 | rich_snippets-legacy-fix-2124233-12.patch | 10.52 KB | samuel.mortenson |
Comments
Comment #1
JimCraner CreditAttribution: JimCraner commentedDowngrading apachesolr from 7.x-1.5 to 7.x-1.4 is a workaround for this problem for now. Please let me know if this issue should be reported in that queue instead. Thanks!
Comment #2
cpliakas CreditAttribution: cpliakas commentedLooks like Apache Solr Search Integration changed it's APIs. We should fix here, but let's also post an issue to Apache Solr Search Integration so it can be more cognizant of function changes or reorganization of files containing these functions.
Comment #3
almc CreditAttribution: almc commentedDue to this issue the module is basically not working with the current version of Apachesolr, and moreover not allowing Apachesolr search to function, so updated priority to major (critical for search with Apachesolr).
Comment #4
cpliakas CreditAttribution: cpliakas commentedI think it is critical. Discussed with Nick_vh, and it looks like there is logic we could add to this module to resolve and be backwards compatible with older versions of the Apache Solr Search Integration module.
Comment #5
weiteh CreditAttribution: weiteh commentedSame issue here. I am using apachesolr 7.x-1.6 and drupal failed on exactly the same line. Are there any workaround at this point?
Comment #6
RealGecko CreditAttribution: RealGecko commentedApachesolr 7.x-1.6
Schema.org 7.x-1.0-beta4
Rich Snippets 7.x-1.0-beta3 (or 7.x-1.0-beta3+0-dev)
Drupal 7.26
Still an issue :(
Comment #7
navalogan CreditAttribution: navalogan commentedHi everybody i had the same problem! any solution?
Comment #8
capellicI just ran into this problem with Apachesolr 1.6. Any progress? I checked the issue queue for Apache Solr Search and I don't see the case said to have been reported in comment #2 above. I tried the Dev version but that didn't work. Downgrading per comment #1 worked.
Comment #9
cpliakas CreditAttribution: cpliakas commentedI see 4 potential contributors above to help identify and resolve the issue. Would love to have your first credited commit to be against this project!
I am assuming that this is due to one of the functions in the rich_snippets.apachesolr_legacy.inc file being defined in the latest version of the Apache Solr Search module.
There is a condition in the rich_snippets.apachesolr.inc file that loads the rich_snippets.apachesolr_legacy.inc file.
I would love to get some more people contributing, this is a great way to dive in. Happy to provide any additional guidance that is required whether it is on the code or how to contribute.
Comment #10
samuel.mortensonI ran into this too, and have two ideas for fixes. Do the module maintainers have a preference between the two? I can whip up a patch for either.
Comment #11
cpliakas CreditAttribution: cpliakas commentedHi samuel.mortenson .
Thanks for offering to help. I personally like #2, but I will leave it up to you and will accept either technique.
Thanks!
Chris
Comment #12
samuel.mortensonAlright, I've made a patch that separates the legacy functions into different files/if statement blocks. apachesolr_get_index_key_map is checked after apachesolr_get_field_mappings as it makes calls to apachesolr_get_field_mappings. I've tested this patch and it seems to work for me, but someone else in the thread should try it out too.
Comment #13
cpliakas CreditAttribution: cpliakas commentedGreat work! Thanks for the contribution.
Comment #15
cpliakas CreditAttribution: cpliakas commented