drz
By:
drz

I am running Drupal 8.3.3 multisite. One of the sites has a problem that was first intermittent but then always. The nginx error below:

May 13, 2017 699 views
Drupal Ubuntu

2017/05/13 08:36:40 [error] 960#0: *4817 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception InvalidArgumentException: "Field is unknown." at /var/www/html/drupal/core/lib/Drupal/Core/Entity/ContentEntityBase.php line 509" while reading response header from upstream, client: 72.80.138.114, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.archiveofdisability.org"

3 Answers
paulmckibben May 14, 2017
Accepted Answer

In a typical Drupal multisite, each site shares the codebase but has its own database. The site that is experiencing the issue may still need to run database updates after you updated the codebase to Drupal 8.3.3. You can do one of the following:

  1. From the command line, in your Drupal docroot, type: drush updb --uri=http://[your site URL]

  2. Log into the affected site as an administrator, if you can, and point your browser to [your site URL]/update.php

Hope that helps.

  • That solved the problem and has given me a new tool. Thanx.

@drz

An InvalidArgumentException is thrown when a class, function, or closure (for example) does not receive an expected argument type.

The error being logged is stating that, on line 509 of ContentEntityBase.php, this exception is being thrown for one reason or another. It could be an error in core, an issue with a plugin/module, or some other piece of code (if you've added anything on your own).

From what I can see, some are reporting that running drush updatedb fixes the issue, which means that it very well could be a database issue, which would make sense since you're also getting:

Field is unknown

Others state that you may need to update to another version, or downgrade depending on the version you're currently using.

https://www.drupal.org/node/2861863

  • The site is part of a Drupal mulitisite. All sites share the core. It is the only one with this problem. It must be something in the ~sites directories of the site. Any suggestions?

    • @drz

      Drupal is one CMS that I'm not very familiar with unfortunately, so most of what I'm finding is via Google.

      It seems the vast majority of the Field Unknown errors result in updatedb needing to be ran again. Others suggest enabling dev mode and debugging to get a more verbose output.

      • Thanx for the effort. Drupal multisite is crazy.

        • @drz

          That's what I'm seeing based on comments :-). I've always used WordPress and it's Multisite functionality when I needed a platform to easily setup sites. Even it can be a hassle from time to time depending on plugins, so it's not without issue either.

          Enabling some level of debugging should help iron out at least something a bit more specific. The exception being thrown looks pretty generic in terms of not providing more information on what was expected.

          Only seeing "Field Unknown" without the name of the field is about as generic as you can get.

          ...

          One thing I'd so is simply add a test site, see if it happens again -- just as a way of trying to troubleshoot. Beyond that, was anything new recently added that the affected site specifically uses that others do not?

Have another answer? Share your knowledge.