Closed (duplicate)
Project:
Drupal core
Version:
10.0.x-dev
Component:
entity system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Feb 2016 at 12:25 UTC
Updated:
25 Oct 2022 at 17:33 UTC
Jump to comment: Most recent
Comments
Comment #2
arielberg commentedComment #3
chrisrockwell commentedCan you add a backtrace to your patch to see where it's coming from? Best guess is that it's coming from a contrib/custom module.
Comment #4
Mikael Nord commentedSame problem here on Drupal 7.50. The workaround patch works fine for me, but this core module bug needs attention.
Comment #5
chrisrockwell commentedThere are (well, were) patches in progress to fix this #1158114: SelectQuery::fields() must be an array, null given entity.inc on line 284 SelectQuery->fields() (line 1262 select.inc.
Comment #6
senpAi95 commenteddrupal 7.23:
Hello guys,
This is my first time writing the issue. I received this error when i tried to open the page.
Catchable fatal error: Argument 2 passed to SelectQuery::fields() must be an array, null given, called in /path/drupal/htdocs/includes/entity.inc on line 317 and defined in /path/drupal/htdocs/includes/database/select.inc on line 1316
1)I thought it has something to do with modules and used a backup of htdocs and replaced /sites and .htaccess ..got same error...
2)I even tried downloading drupal7.56(current version 7.23(thought of fixing and updating the drupal core)) and replacing /sites , .htaccess and robots.txt. Got same error.
i ran update.php and it showed following warning
User warning: The following module is missing from the file system: activity. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /home/cpath/D-path/drupal/htdocs/includes/bootstrap.inc).
User warning: The following module is missing from the file system: activityhistory. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /home/cpath/D-path/drupal/htdocs/includes/bootstrap.inc).
User warning: The following module is missing from the file system: addressfield. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1143 of /home/cpath/D-path/drupal/htdocs/includes/bootstrap.inc).
.
.
.
.
203 warnings
By this i came to know that a module was missing. What can i do to solve it?
Thanks in advance.
Comment #7
Pascal- commentedUpdating from 7.63 to 7.67 an ran into this.
Patch fixed it.
Comment #8
rcodinaPatch also fixed the error for me.
Comment #9
ajayyadav commentedThanks, Fixed error.
Comment #10
bburgI ran into this while migrating a site to an updated server. This is not live yet, and we are still working on the environment, but I did get a backtrace output, so in case that is helpful. The best I can gather is that the LDAP php extension is still missing, generated some warnings, and that lead to
Here is my backtrace:
Comment #11
rcodinaGiven that
drush cc allfails when this error shows up, I tried another option which works and doesn't require the patch. I simply truncated all Drupal's cache tables via mysql client:Comment #12
markusd1984 commented@bburg how did you generate that nice documented backtrace?
Would love to know how to do the same, cheers.
Comment #13
bburgHa, I don't quite remember. I was scrambling at the time to debug the issue, so I'm not sure if it was just the normal display errors setting, or if I did something like dump the output of debug_backtrace().
Comment #14
alex_web commentedHi guys. Can you tell me how to apply this patch? With the drush module? And how to install the module without access to the site admin panel?
Comment #15
bburg@Alex_web
Here is an SO post with some tips on applying patches https://drupal.stackexchange.com/a/23356/75558
This is a bit of an older issue, and I think that patch file was for D7. So it might not apply.
In my own workflow on D8+ sites, I use composer, and with that package management tool, you can list patch files you want to apply, and it will apply them automatically.
For quick testing in my local environment though, I tend to just run something like this from inside the module directory:
This makes a curl request for the patch file, and pipes that into the patch command, which will apply the patch in the current directory. Make sure your system supports pipes though, some windows environments might not.