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

Error loading/viewing node pages (A valid cache entry key is required) #212

Closed
kspurgin opened this issue Jan 13, 2022 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@kspurgin
Copy link

This error occurs when you try to load/view a node page. So:

  • after you add a new content node via the form and save (when it tries to show you what you just added)
  • when you click the title links in the /admin/content view.

In the browser you just see "The website encountered an unexpected error. Please try again later."

In the logs, the error is:

FastCGI sent in stderr: "PHP message: Uncaught PHP Exception InvalidArgumentException: "A valid cache entry key is required. Use getAll() to get all table data." at /var/www/drupal/web/core/modules/views/src/ViewsData.php line 140" while reading response header from upstream

Someone also asked about this on the Islandora-ISLE listserv back in August.

I first asked about this yesterday evening in Slack. This report was based on trying to view content nodes created after a bit of mucking around with a new content type that used a new storage entity type1.

When I got the error I assumed my mucking around had messed something up.

I tried creating a new Basic page node and a new Article node and they also could not be viewed, but I still assumed I'd messed something up by installing some contrib modules.

HOWEVER, I got the same error this morning after doing the following2:

  • made sure nothing from yesterday was still running in docker
  • docker image prune -a
  • make clean
  • cp sample.env .env
  • in .env, changed TAG to 1.0.0-alpha-10 (latest release, as per Nigel's test on PR204
  • make local

Once the site was up, without changing anything, I created a Basic page node and got the same error.

Not sure if relevant, but in /admin/reports/status I see:

Errors found
Configuration sync directory
The directory /var/www/drupal/config/sync does not exist.
Trusted Host Settings
Not enabled
The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this. See Protecting against HTTP HOST Header attacks for more information.

Warnings found
Drupal core update status
No update data available
No update information available. Run cron or check manually.
Media
It is potentially insecure to display oEmbed content in a frame that is served from the same domain as your main Drupal site, as this may allow execution of third-party code. You can specify a different domain for serving oEmbed content here.
Search API
The default Drupal core Search module is still enabled. If you are using Search API, you probably want to uninstall the Search module for performance reasons. For more information see the Search API handbook.

Footnotes

  1. Details of my mucking around, though I don't think they are relevant:

    I used commit f8f6bca (HEAD -> development, origin/development, origin/HEAD)

    I ran make local without any edits to .env or adding a codebase directory

    Before attempting to create any content, I installed and enabled the following modules:

    I then:

    • created a test storage entity type (via storage module) containing 2 fields
    • created a new content type that included an entity reference field with my test storage entity type as the target
    • set up my content type form to use inline_entity_form for the entity reference to the storage entity type field
    • set up display of the storage entity type and my content type

    THEN I tried creating content and got the error.

  2. commit f8f6bca (HEAD -> development, origin/development, origin/HEAD)

@DonRichards
Copy link
Member

WOW, this one was tricky to automate a fix. 😃 Also found a simple way to trigger the error as a simplified way to test fixes. Just run drush cron should trigger the error every time until the fix is applied. The PR is a working solution. I'd call it a band-aid for now.

@DonRichards
Copy link
Member

Reviewing the build process log and I see a couple of things that needed attention. Most significantly is the Flysystem module isn't installed via the database import like it does for the make demo process.

@kspurgin
Copy link
Author

RE: Flysystem: this has been an issue with make local for a while. There's a separate issue for it still open: #136

@DonRichards DonRichards added the bug Something isn't working label Jan 14, 2022
@joecorall
Copy link
Contributor

The make local command has been replaced by documentation.

$ make local
make local has been removed. To create a demo site, please follow the instructions at https://islandora.github.io/documentation/installation/docker-local/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants