Closed (fixed)
Project:
Search API Solr
Version:
8.x-1.0-alpha5
Component:
Miscellaneous
Priority:
Major
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Jul 2016 at 08:22 UTC
Updated:
6 Dec 2016 at 13:22 UTC
Jump to comment: Most recent
Comments
Comment #2
mkalkbrennerHow did you install solarium exactly?
Where is the vendor folder containing solarium located?
Comment #3
jagmitg commentedI installed it through the composer builder on the docroot folder composer update and also on the module itself.
There is a folder called vendor under the module folder and in that, there is a folder called search_api_solr/vendor/solarium/solarium/ with all the relevant files.
Comment #4
berdirThat's not correct, it must be part of the main vendor folder. See https://www.drupal.org/node/2404989 and specifically https://www.drupal.org/node/2718229.
Comment #5
jagmitg commentedI have just checked the main vendor folder as well, that also has an instance of solarium/solarium in it.
What else could be the issue?
Comment #6
mkalkbrennerI highly recommend to do a fresh install following the instructions on https://www.drupal.org/node/2718229
That's how we do it in our automated tests as well.
Comment #7
mac_weber commentedSimpler instructions can also be found here: Search API Solr - Drupal 8 Server setup
This page is specific for Search API Solr using Composer Manager
Comment #8
frankcarey commentedShouldn't there be some checking and a proper error created from the code instead of allowing a fatal php error?
Comment #9
jagmitg commentedI have now removed all installation, removed the current implementation of solarium on both vendor folders (root and module), removed the module and did a fresh update of composer. yet i am still getting the issue. I was on the server page this time and under the server status, i was getting a solarium not found (on my current drupal installation).
I have also installed composer manager as well and that specifically lists that solarium is installed and its `Required by: Solr search`. However, still getting the result.
I dont really want to do a fresh installation but here are some of the logs:
Notice: Undefined index: /replication in Drupal\search_api_solr\Solr\SolrHelper->getStatsSummary() (line 513 of /docroot/modules/search_api_solr/src/Solr/SolrHelper.php).
Notice: Undefined index: autocommit maxTime in Drupal\search_api_solr\Solr\SolrHelper->getStatsSummary() (line 504 of /docroot/modules/search_api_solr/src/Solr/SolrHelper.php).
and then the fatal error.
Comment #10
mkalkbrennerNo. This problem isn't specific to Search API Solr but affects any module with composer managed dependencies. There's a core issue to deal with that: #2494073: Prevent modules which have unmet Composer dependencies from being installed.
In the past there were different approaches about how to deal with third party libraries, which isn't only a technical issue but also legal one regarding incompatible licenses. The way to go is described at https://www.drupal.org/node/2718229 and I don't think that we should support anything else.
Don't do that! The reason is stated on the composer manager's project page:
The Drupal 8 version of this module is deprecated and no longer needed, due to improvements in Drupal 8.1. Use Composer directly to get the needed modules, which will also download their required libraries.@jagmitg:
drush updbAs already said in #2687197: Verify the composer managed dependencies using hook_requirements() we'll adjust our installation instructions accordingly. I think that this will happen when we turn beta here.
Comment #11
jagmitg commented@mkalkbrenner Very good call. Worked perfectly when going through all composer setup. It was due to the cache refreshing but i will keep my installation all on composer now.
Thanks :)
Comment #12
mkalkbrennerGreat to hear :-)
Thanks for reporting back.
Comment #13
mac_weber commented@mkalkbrenner thanks for pointing that. I updated the instructions there: https://www.drupal.org/node/2763131
Comment #14
mkalkbrenner@Mac_Weber: Thanks for contributing documentation!
Comment #16
criscomHi Michael,
I tried your approach in #10. It worked perfectly for me.
Some issues I found:
- I had to re-create all my pages built with panels and page_manager (no big deal)
- I had been getting Warning: mkdir(): Permission denied in Drupal\Component\PhpStorage\FileStorage->createDirectory() - so fixing the file permissions took some time.
Overall, all went well! Thanks a lot!
Comment #17
criscomIt turned out that the fix in #10 broke the translation functionality on the site. I can no longer translate nodes, getting an unexpected error like:
Drupal\Core\Entity\EntityStorageException: Invalid translation language (de) specified. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 770 of /var/www/bibliothek0.medunigraz.at/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).
Comment #18
hanmant.sapkal commentedThis is what helped me... https://www.drupal.org/node/2763131
Use composer to download both search_api and search_api_solr modules. This will ensure dependency downloads too. And then use drush to enable modules. The Solarium library needs to be in root vendor directory.
Comment #19
ressaUsing Composer does help getting all dependencies. The slightly annoying thing is that the modules are put in the
modulesfolder, notmodules/contrib, where I keep modules from d.o. I don't know if there is a way to define this?Comment #20
berdirThat's described on the linked page: https://www.drupal.org/node/2718229
Look for "Define the directories to which Drupal projects should be downloaded"
Comment #21
ressaThanks @Berdir, I should probably have written that I use a make file, and not Composer to manage my project, so I can't use that solution.
Comment #22
alexmoreno commentedno need to reinstall anything, simply this should do the trick:
composer require drupal/search_api_solr