Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error after adding any type of content in any way #191

Open
RaspberryProgramming opened this issue Oct 29, 2021 · 6 comments
Open

Comments

@RaspberryProgramming
Copy link

Description

I've been trying to get a local environment setup with Islandora. I found this repository and the tutorial on islandora.ca for installing on docker. I was able to get this all setup via the local setup, and when I add content it would basically give me a

The website encountered an unexpected error. Please try again later.

error. My goal is to get this to sync with an archivesspace instance which I got to work under the demo environment for islandora (Using "make demo", etc.) which works, although I can't use the demo version as its unofficial and I have some custom configuration like hostname and certs to add to the instance. I was able to find the error message as described below within islandora's reports page, which still works afterwards.

I've gotten this to happen when I ran the install on windows, and ubuntu 21.10.

Error Messages

Sourced from https://islandora.traefik.me/admin/reports/dblog on local instance

Error 1

Notice: Undefined index: base in Drupal\views\Plugin\views\query\QueryPluginBase->getEntityTableInfo() (line 292 of /var/www/drupal/web/core/modules/views/src/Plugin/views/query/QueryPluginBase.php)
#0 /var/www/drupal/web/core/includes/bootstrap.inc(312): _drupal_error_handler_real()
#1 /var/www/drupal/web/core/modules/views/src/Plugin/views/query/QueryPluginBase.php(292): _drupal_error_handler()
#2 /var/www/drupal/web/core/modules/views/src/Plugin/views/query/Sql.php(1344): Drupal\views\Plugin\views\query\QueryPluginBase->getEntityTableInfo()
#3 /var/www/drupal/web/core/modules/views/src/Plugin/views/query/Sql.php(1453): Drupal\views\Plugin\views\query\Sql->query()
#4 /var/www/drupal/web/core/modules/views/src/ViewExecutable.php(1321): Drupal\views\Plugin\views\query\Sql->build()
#5 /var/www/drupal/web/core/modules/views/src/ViewExecutable.php(1391): Drupal\views\ViewExecutable->build()
#6 /var/www/drupal/web/core/modules/views/src/ViewExecutable.php(1454): Drupal\views\ViewExecutable->execute()
#7 /var/www/drupal/web/modules/contrib/eva/src/Plugin/views/display/Eva.php(380): Drupal\views\ViewExecutable->render()
#8 /var/www/drupal/web/core/modules/views/src/ViewExecutable.php(1630): Drupal\eva\Plugin\views\display\Eva->execute()
#9 /var/www/drupal/web/core/modules/views/src/Element/View.php(81): Drupal\views\ViewExecutable->executeDisplay()
#10 [internal function]: Drupal\views\Element\View::preRenderViewElement()
#11 /var/www/drupal/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(101): call_user_func_array()
#12 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(786): Drupal\Core\Render\Renderer->doTrustedCallback()
#13 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(377): Drupal\Core\Render\Renderer->doCallback()
#14 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(449): Drupal\Core\Render\Renderer->doRender()
#15 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(201): Drupal\Core\Render\Renderer->doRender()
#16 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(157): Drupal\Core\Render\Renderer->render()
#17 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(578): Drupal\Core\Render\Renderer->Drupal\Core\Render{closure}()
#18 /var/www/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(158): Drupal\Core\Render\Renderer->executeInRenderContext()
#19 /var/www/drupal/web/core/modules/node/src/Plugin/Search/NodeSearch.php(525): Drupal\Core\Render\Renderer->renderPlain()
#20 /var/www/drupal/web/core/modules/node/src/Plugin/Search/NodeSearch.php(489): Drupal\node\Plugin\Search\NodeSearch->indexNode()
#21 /var/www/drupal/web/core/modules/search/search.module(121): Drupal\node\Plugin\Search\NodeSearch->updateIndex()
#22 [internal function]: search_cron()
#23 /var/www/drupal/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(392): call_user_func_array()
#24 /var/www/drupal/web/core/lib/Drupal/Core/Cron.php(250): Drupal\Core\Extension\ModuleHandler->invoke()
#25 /var/www/drupal/web/core/lib/Drupal/Core/Cron.php(136): Drupal\Core\Cron->invokeCronHandlers()
#26 /var/www/drupal/web/core/lib/Drupal/Core/ProxyClass/Cron.php(75): Drupal\Core\Cron->run()
#27 /var/www/drupal/web/core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php(65): Drupal\Core\ProxyClass\Cron->run()
#28 [internal function]: Drupal\automated_cron\EventSubscriber\AutomatedCron->onTerminate()
#29 /var/www/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#30 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(100): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#31 /var/www/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate()
#32 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(687): Stack\StackedHttpKernel->terminate()
#33 /var/www/drupal/web/index.php(22): Drupal\Core\DrupalKernel->terminate()
#34 {main}

Error 2

InvalidArgumentException: A valid cache entry key is required. Use getAll() to get all table data. in Drupal\views\ViewsData->get() (line 140 of /var/www/drupal/web/core/modules/views/src/ViewsData.php).

Affected Links

/node/*
/

Reproducing the error

Clone Repo
git clone https://github.com/Islandora-Devops/isle-dc

Enter folder
cd isle-dc

copy sample.env to .env
cp sample.env .env

edit .env such that ENVIRONMENT=local
nano .env
ENVIRONMENT=demo -> ENVIRONMENT=local

Save, then run make local
make local

Wait for it to setup then add hostname to /etc/hosts file
sudo nano /etc/hosts

add line such that
127.0.0.1 islandora.traefik.me

Once saved, enter the url into your browser and login using
https://islandora.traefik.me/user/login
USER: admin
PASS: password

Enter the content tab
https://islandora.traefik.me/admin/content

Add content, anything

Once it's added, you should be directed to a https://islandora.traefik.me/node/... page with the same error.
You can also go to the root of the website and the error will persist. If you got to for example, https://islandora.traefik.me/admin, you will be fine.

Thank you for any help.

@RaspberryProgramming
Copy link
Author

RaspberryProgramming commented Oct 31, 2021

I noticed that there were a few modules missing. I had to do the following once islandora was successfully installed.

Once the isle-dc repo install is done, there is a few steps before you can get it fully functional. You MUST install a few modules via commands

First find the container id by running
docker container ls
You'll get a list of docker containers, select the one that says islandora/drupal... and copy the random characters and numbers on the left of that

Open the container's terminal with
docker exec -it CONTAINERID bash

You'll be met with a bash terminal where you'll install modules with the following commands

cd /var/www/drupal

composer require zaporylie/composer-drupal-optimizations:^1.0
composer require islandora/islandora_defaults:dev-8.x-1.x
composer require drupal/pdf:1.x-dev
composer require drupal/rest_oai_pmh:^1.0
composer require drupal/facets:^1.3
composer require drupal/restui:^1.16
composer require drupal/rdfui:^1.0-beta1
composer require drupal/content_browser:^1.0@alpha
composer require drupal/search_api_solr
composer require drupal/search_api_solr_defaults

Next, enable the modules via
drush -y en rdf responsive_image syslog serialization basic_auth rest restui search_api_solr search_api_solr_defaults facets content_browser pdf islandora_defaults controlled_access_terms_defaults islandora_breadcrumbs islandora_iiif islandora_oaipmh

drush -y cr

Once this is run, if you haven't already, add the following line to your hosts file on your main computer. You'll need to open these files with a text editor, and will no longer need the terminal

Windows: C:\Windows\System32\drivers\etc\hosts
Linux: /etc/hosts

127.0.0.1 islandora.traefik.me

Although this does fix the issue, I need to still find how to fix this in the process without doing this workaround

Edit: added the following lines

composer require drupal/search_api_solr
composer require drupal/search_api_solr_defaults

@ajstanley
Copy link
Contributor

@RaspberryProgramming - check to see if you have a Solr core (Mine has been failing on recent builds) If you navigate to http://islandora.traefik.me:8983/solr/#/ and there are no cores there you can grab this - https://github.com/ajstanley/Islandora-SOLR-Core-Builder.git, stick it anywhere on your server and run it. (Instructions are in the README)
It builds the ISLANDORA Solr core for you.

@RaspberryProgramming
Copy link
Author

@RaspberryProgramming - check to see if you have a Solr core (Mine has been failing on recent builds) If you navigate to http://islandora.traefik.me:8983/solr/#/ and there are no cores there you can grab this - https://github.com/ajstanley/Islandora-SOLR-Core-Builder.git, stick it anywhere on your server and run it. (Instructions are in the README) It builds the ISLANDORA Solr core for you.

Thank you for the suggestion, but for some reason that doesn't fix it. Although I did notice there was a missing solr core, I'm still getting the same error, and the same logs in islandora. I noticed that solr doesn't have any logs either so I suspect that islandora doesn't even get to communicate with solr. Hopefully this will prevent further problems once I figure out how to fix the current issue.

@ajstanley
Copy link
Contributor

ajstanley commented Nov 1, 2021 via email

@RaspberryProgramming
Copy link
Author

RaspberryProgramming commented Nov 3, 2021

So far, I was able to get it installed to be fully functional. I'll see if there is any way for me to modify my fork so I won't need to install the docker modules manually. so far, running https://github.com/ajstanley/Islandora-SOLR-Core-Builder after I installed the solr api modules in the drupal container fixed my solr issues, but did not fix all of the missing modules which I still need to run the instructions within the following manual installation instructions
https://islandora.github.io/documentation/installation/manual/configuring_drupal/

@ajstanley
Copy link
Contributor

ajstanley commented Nov 3, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants