Body: <p>We've had CiviCRM Version 5.61.2 for WordPress installed on a Staging site for a week to determine if we can run it on our production environment.</p>
  <p>The debug.log file for this website is as follows:</p>
  <pre><code>[16-Jun-2023 04:38:06 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [16-Jun-2023 04:38:10 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [16-Jun-2023 04:38:13 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [16-Jun-2023 04:38:15 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:15:59 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:16:03 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:16:05 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:16:07 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 00:40:20 UTC] auditor:event=wp_login {&quot;user_id&quot;:1,&quot;blog_id&quot;:1,&quot;event&quot;:&quot;wp_login&quot;,&quot;current_user_id&quot;:0,&quot;remote_addr&quot;:&quot;122.199.33.74&quot;}
  [20-Jun-2023 04:11:54 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 04:11:57 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 04:12:00 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 04:12:02 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:50 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:54 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:56 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:58 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:19 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:25 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:27 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:29 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:32:39 UTC] PHP Warning:  file_put_contents(/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedExtLoader.d798c88b1da2dfdd65684e016c65ef77.php): failed to open stream: Permission denied in /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 87
  [23-Jun-2023 00:32:40 UTC] PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename &quot;/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedCiviContainer.d798c88b1da2dfdd65684e016c65ef77.phpTnZb1v&quot; to &quot;/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedCiviContainer.d798c88b1da2dfdd65684e016c65ef77.php&quot;. in /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php:290
  Stack trace:
  #0 /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php(696): Symfony\Component\Filesystem\Filesystem-&gt;rename('/nas/content/li...', '/nas/content/li...', true)
  #1 /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/vendor/symfony/config/ResourceCheckerConfigCache.php(124): Symfony\Component\Filesystem\Filesystem-&gt;dumpFile('/nas/content/li...', '&lt;?php\n\nuse Symf...')
  #2 /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/Civi/Core/Container.php(83): Symfon in /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php on line 290
  [23-Jun-2023 00:33:36 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:33:40 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:33:42 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:33:45 UTC] auditor:event=upgrader_process_complete_plugin {&quot;plugin&quot;:&quot;akismet/akismet.php&quot;,&quot;type&quot;:&quot;plugin&quot;,&quot;action&quot;:&quot;update&quot;,&quot;blog_id&quot;:1,&quot;event&quot;:&quot;upgrader_process_complete_plugin&quot;,&quot;current_user_id&quot;:3,&quot;remote_addr&quot;:&quot;35.245.50.252&quot;}
  [23-Jun-2023 00:34:07 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:34:09 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:34:13 UTC] auditor:event=upgrader_process_complete_plugin {&quot;plugin&quot;:&quot;gravityforms/gravityforms.php&quot;,&quot;type&quot;:&quot;plugin&quot;,&quot;action&quot;:&quot;update&quot;,&quot;blog_id&quot;:1,&quot;event&quot;:&quot;upgrader_process_complete_plugin&quot;,&quot;current_user_id&quot;:3,&quot;remote_addr&quot;:&quot;35.245.50.252&quot;}
  [23-Jun-2023 00:36:21 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:36:24 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:36:27 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:36:29 UTC] PHP Notice:  Function WP_User_Query::query was called &lt;strong&gt;incorrectly&lt;/strong&gt;. User queries should not be run before the &lt;code&gt;plugins_loaded&lt;/code&gt; hook. Please see &lt;a href=&quot;https://wordpress.org/documentation/article/debugging-in-wordpress/&quot;&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  </code></pre>
  <p>Can someone please advise me what the issue may be? It's only a few times but I want to get to the bottom of it.</p>
  <p>The site has HTTP authenticated configured to limit public access.</p>
  <p>I've attached the system status screen within the plugin too for reference:</p>
  <p><a href="https://i.sstatic.net/kbz8u.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/kbz8u.jpg" alt="enter image description here" /></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-09T09:13:37.690Z
Comments.Text: It would be useful if you post the error that triggered the backtrace.
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-15T01:26:47.883Z
Comments.Text: Hi Christian, There is only one other log entry prior to the PHP Fatal error, which is as follows:  PHP Warning:  file_put_contents(/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedExtLoader.d798c88b1da2dfdd65684e016c65ef77.php): failed to open stream: Permission denied in /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 87
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-15T09:04:55.670Z
Comments.Text: What I meant was that you haven't posted the fatal error itself - just the backtrace.
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-20T00:43:47.373Z
Comments.Text: I had to get our hosting provider to activate the debug logs. I havn't been able to replicate the error as yet, but will let you know when I do and send the debug log file here - Adam
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-23T01:05:41.707Z
Comments.Text: Hi Christian, the site has emailed me an error with the CiviCRM plugin this morning: 
  debug.log file as follows:
  https://boylenadelaide-my.sharepoint.com/:u:/g/personal/support_boylen_com_au/EcrhmgVixndFk_P5HLAvR-YBneerpMZuj8kkLsc4jgXR8w?e=D51QTU
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-23T02:49:09.900Z
Comments.Text: Please edit your question to include the error rather than sticking a link to a file in a comment. It will make it much easier to help you.
Comments.UserDisplayName: kapn
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-26T03:43:30.560Z
Comments.Text: Hi Kapn - done! Thank you - Adam
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-27T12:09:07.103Z
Comments.Text: Hi Adam, looks like you should check that your web user has the correct permissions on your `wp-content/uploads/civicrm` folder and sub-folders.
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-29T00:52:05.243Z
Comments.Text: Hi Christian, it looks like its a 775 for the permissions on that folder, I also verified uploads and wp-content have the correct permissions too. Our hosting provider has mentioned that because the site has http authentication on it (password protected) that would cause a 401 error if there is an outside source trying to ping the site. Would this be the problem? I will remove the http authentication and see if we continue to get this error - Adam
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-29T16:52:41.260Z
Comments.Text: @Boylen You mentioned the permissions but not the file owner - confirm that the user that the PHP process runs as owns the `templates_c` folder and is able to traverse all parent folders to reach `templates_c`?
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-30T00:22:51.620Z
Comments.Text: Hey, our hosting provider has mentioned that it should be able to traverse all parent folders to reach templates_c, the site provided another php error this morning, as mentioned above even after I have turned off the http authentication (password protection). This error occurs when were not on the site, so I cant determine whats causing it, it must be something that automatically runs from the CiviCRM plugin. Can we connect on a different forum somewhere were we can provide you the full debug log and perform troubleshooting please?
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-30T00:54:58.507Z
Comments.Text: I also forgot to mention our hosting partner has applied the following web rule for requests from the user agent civicrm to not be blocked - sometimes our cloudflare proxy could block requests so we've put in the web rule as a precautionary measure. not sure it will fix the above issue though
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-07-13T02:23:16.830Z
Comments.Text: Hi all- can I get an update on this one? Thank you.
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-01T05:03:10.907Z
Comments.Text: Hi CiviCRM- I have updated the plugin to civicrm v5.63.2, Can I please get an update on this fatal error? It's still on going and occurs a few times a week without us navigating to the website.
Comments.UserDisplayName: Boylen
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-08-29T23:59:51.283Z
Comments.Text: Hi CiviCRM - I've looked at other articles and have come across this one:
  https://civicrm.stackexchange.com/questions/26424/new-install-civi-5-4-0-getting-uncaught-symfony-rename-error-and-blank-screen
  
  Would this be a solution to my problem?
Comments.UserDisplayName: Boylen
Tags: <wordpress><error>
Title: Uncaught exception - WordPress Site
ThreadText: # Uncaught exception - WordPress Site
  
  (Asked by: username_0 on 2023-06-09)
  
  We've had CiviCRM Version 5.61.2 for WordPress installed on a Staging site for a week to determine if we can run it on our production environment.
  The debug.log file for this website is as follows:
  [16-Jun-2023 04:38:06 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [16-Jun-2023 04:38:10 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [16-Jun-2023 04:38:13 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [16-Jun-2023 04:38:15 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:15:59 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:16:03 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:16:05 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [19-Jun-2023 01:16:07 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 00:40:20 UTC] auditor:event=wp_login {"user_id":1,"blog_id":1,"event":"wp_login","current_user_id":0,"remote_addr":"122.199.33.74"}
  [20-Jun-2023 04:11:54 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 04:11:57 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 04:12:00 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [20-Jun-2023 04:12:02 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:50 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:54 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:56 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [21-Jun-2023 03:13:58 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:19 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:25 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:27 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:30:29 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:32:39 UTC] PHP Warning:  file_put_contents(/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedExtLoader.d798c88b1da2dfdd65684e016c65ef77.php): failed to open stream: Permission denied in /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 87
  [23-Jun-2023 00:32:40 UTC] PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedCiviContainer.d798c88b1da2dfdd65684e016c65ef77.phpTnZb1v" to "/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedCiviContainer.d798c88b1da2dfdd65684e016c65ef77.php". in /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php:290
  Stack trace:
  #0 /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/vendor/symfony/filesystem/Filesystem.php(696): Symfony\Component\Filesystem\Filesystem->rename('/nas/content/li...', '/nas/content/li...', true)
  #1 /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/vendor/symfony/config/ResourceCheckerConfigCache.php(124): Symfony\Component\Filesystem\Filesystem->dumpFile('/nas/content/li...', 'incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:33:40 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:33:42 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:33:45 UTC] auditor:event=upgrader_process_complete_plugin {"plugin":"akismet/akismet.php","type":"plugin","action":"update","blog_id":1,"event":"upgrader_process_complete_plugin","current_user_id":3,"remote_addr":"35.245.50.252"}
  [23-Jun-2023 00:34:07 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:34:09 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:34:13 UTC] auditor:event=upgrader_process_complete_plugin {"plugin":"gravityforms/gravityforms.php","type":"plugin","action":"update","blog_id":1,"event":"upgrader_process_complete_plugin","current_user_id":3,"remote_addr":"35.245.50.252"}
  [23-Jun-2023 00:36:21 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:36:24 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:36:27 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  [23-Jun-2023 00:36:29 UTC] PHP Notice:  Function WP_User_Query::query was called incorrectly. User queries should not be run before the plugins_loaded hook. Please see Debugging in WordPress for more information. (This message was added in version 6.1.1.) in /nas/content/live/staloysiuscstg/wp-includes/functions.php on line 5865
  
  Can someone please advise me what the issue may be? It's only a few times but I want to get to the bottom of it.
  The site has HTTP authenticated configured to limit public access.
  I've attached the system status screen within the plugin too for reference:
  
  **Tags:** wordpress, error
  
  > **Comments:**
  > **username_1**: It would be useful if you post the error that triggered the backtrace.  
  > **username_0**: Hi Christian, There is only one other log entry prior to the PHP Fatal error, which is as follows:  PHP Warning:  file_put_contents(/nas/content/live/staloysiuscstg/wp-content/uploads/civicrm/templates_c/CachedExtLoader.d798c88b1da2dfdd65684e016c65ef77.php): failed to open stream: Permission denied in /nas/content/live/staloysiuscstg/wp-content/plugins/civicrm/civicrm/CRM/Extension/ClassLoader.php on line 87  
  > **username_1**: What I meant was that you haven't posted the fatal error itself - just the backtrace.  
  > **username_0**: I had to get our hosting provider to activate the debug logs. I havn't been able to replicate the error as yet, but will let you know when I do and send the debug log file here - Adam  
  > **username_0**: Hi Christian, the site has emailed me an error with the CiviCRM plugin this morning:  debug.log file as follows: https://boylenadelaide-my.sharepoint.com/:u:/g/personal/support_boylen_com_au/EcrhmgVixndFk_P5HLAvR-YBneerpMZuj8kkLsc4jgXR8w?e=D51QTU  
  > **username_2**: Please edit your question to include the error rather than sticking a link to a file in a comment. It will make it much easier to help you.  
  > **username_0**: Hi Kapn - done! Thank you - Adam  
  > **username_1**: Hi Adam, looks like you should check that your web user has the correct permissions on your `wp-content/uploads/civicrm` folder and sub-folders.  
  > **username_0**: Hi Christian, it looks like its a 775 for the permissions on that folder, I also verified uploads and wp-content have the correct permissions too. Our hosting provider has mentioned that because the site has http authentication on it (password protected) that would cause a 401 error if there is an outside source trying to ping the site. Would this be the problem? I will remove the http authentication and see if we continue to get this error - Adam  
  > **username_3**: @username_0 You mentioned the permissions but not the file owner - confirm that the user that the PHP process runs as owns the `templates_c` folder and is able to traverse all parent folders to reach `templates_c`?  
  > **username_0**: Hey, our hosting provider has mentioned that it should be able to traverse all parent folders to reach templates_c, the site provided another php error this morning, as mentioned above even after I have turned off the http authentication (password protection). This error occurs when were not on the site, so I cant determine whats causing it, it must be something that automatically runs from the CiviCRM plugin. Can we connect on a different forum somewhere were we can provide you the full debug log and perform troubleshooting please?  
  > **username_0**: I also forgot to mention our hosting partner has applied the following web rule for requests from the user agent civicrm to not be blocked - sometimes our cloudflare proxy could block requests so we've put in the web rule as a precautionary measure. not sure it will fix the above issue though  
  > **username_0**: Hi all- can I get an update on this one? Thank you.  
  > **username_0**: Hi CiviCRM- I have updated the plugin to civicrm v5.63.2, Can I please get an update on this fatal error? It's still on going and occurs a few times a week without us navigating to the website.  
  > **username_0**: Hi CiviCRM - I've looked at other articles and have come across this one: https://civicrm.stackexchange.com/questions/26424/new-install-civi-5-4-0-getting-uncaught-symfony-rename-error-and-blank-screen  Would this be a solution to my problem?  
  
  ---
  
  ## 0 answers
  
  