Project

General

Profile

Actions

Support #19083

closed

tarrelleng110.commons.gc.cuny.edu/

Added by Marilyn Weber 6 months ago. Updated 6 months ago.

Status:
Duplicate
Priority name:
Normal
Assignee:
Category name:
Blogs (BuddyPress)
Target version:
Start date:
2023-10-23
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Via ZD, user Tarrell K Browne reports that tarrelleng110.commons.gc.cuny.edu is throwing a "There has been a critical error on this website" error. I'm getting the same result.


Related issues

Related to CUNY Academic Commons - Bug #18235: Lots of failed Cavalcade tasks as of 2023-05-13HoldRaymond Hoh2023-05-16

Actions
Related to CUNY Academic Commons - Bug #19118: Created New Site --> Critical ErrorResolvedRaymond Hoh2023-10-27

Actions
Actions #1

Updated by Raymond Hoh 6 months ago

  • Related to Bug #18235: Lots of failed Cavalcade tasks as of 2023-05-13 added
Actions #2

Updated by Raymond Hoh 6 months ago

This is a reoccurence of this bug: https://redmine.gc.cuny.edu/issues/18235#note-1 .

In this instance, the 'stylesheet' option for the tarrelleng110.commons.gc.cuny.edu site was set to 'twentytwenty', but the 'template' option was set to 'twentytwelve'.

I just set the 'template' option back to 'twentytwenty' with the following WP-CLI command:

wp option update template twentytwenty --url=tarrelleng110.commons.gc.cuny.edu --skip-themes=twentytwenty,twentytwelve

And Tarrell's site should be back and up-and-running.


Boone, based on some clues from #18235, I looked at the past 50 failed Cavalcade logs:

mysql> select * from wp_cavalcade_jobs where status = 'failed' order by start desc limit 50;                                            
+---------+-------+--------------------------------+--------+---------------------+---------------------+----------+----------+--------+
| id      | site  | hook                           | args   | start               | nextrun             | interval | schedule | status |
+---------+-------+--------------------------------+--------+---------------------+---------------------+----------+----------+--------+
| 3183112 | 29832 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182874 | 29829 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3183140 | 29833 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3183222 | 29834 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182727 | 29822 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182731 | 29823 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182752 | 29824 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182785 | 29825 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3183046 | 29830 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3183302 | 29835 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182802 | 29826 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3183062 | 29831 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182824 | 29827 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182831 | 29828 | akismet_scheduled_delete       | a:0:{} | 2023-10-23 22:01:47 | 2023-10-23 22:01:47 |    86400 | daily    | failed |
| 3182697 |    15 | akismet_scheduled_delete       | a:0:{} | 2023-10-22 22:04:14 | 2023-10-22 22:04:14 |    86400 | daily    | failed |
| 3182298 | 29817 | akismet_scheduled_delete       | a:0:{} | 2023-10-22 21:54:34 | 2023-10-22 21:54:34 |    86400 | daily    | failed |
| 3182557 | 29820 | akismet_scheduled_delete       | a:0:{} | 2023-10-22 21:54:34 | 2023-10-22 21:54:34 |    86400 | daily    | failed |
| 3182325 | 29818 | akismet_scheduled_delete       | a:0:{} | 2023-10-22 21:54:34 | 2023-10-22 21:54:34 |    86400 | daily    | failed |
| 3182583 | 29821 | akismet_scheduled_delete       | a:0:{} | 2023-10-22 21:54:34 | 2023-10-22 21:54:34 |    86400 | daily    | failed |
| 3182470 |   886 | akismet_scheduled_delete       | a:0:{} | 2023-10-22 12:03:44 | 2023-10-23 12:08:40 |    86400 | daily    | failed |
| 3181804 | 29816 | akismet_scheduled_delete       | a:0:{} | 2023-10-21 21:46:20 | 2023-10-21 21:46:20 |    86400 | daily    | failed |
| 3181631 | 29814 | delete_expired_transients      | a:0:{} | 2023-10-21 13:23:55 | 2023-10-21 13:23:55 |    86400 | daily    | failed |
| 3181630 | 29814 | wp_scheduled_delete            | a:0:{} | 2023-10-21 12:59:17 | 2023-10-21 12:59:17 |    86400 | daily    | failed |
| 3181629 | 29814 | wp_scheduled_auto_draft_delete | a:0:{} | 2023-10-21 01:49:28 | 2023-10-21 01:49:28 |   604800 | weekly   | failed |
| 3180903 | 29796 | wp_scheduled_auto_draft_delete | a:0:{} | 2023-10-21 01:49:28 | 2023-10-21 01:49:28 |   604800 | weekly   | failed |
| 3180182 | 29778 | wp_scheduled_auto_draft_delete | a:0:{} | 2023-10-21 01:49:28 | 2023-10-21 01:49:28 |   604800 | weekly   | failed |
| 3181610 | 29813 | akismet_scheduled_delete       | a:0:{} | 2023-10-20 21:42:53 | 2023-10-20 21:42:53 |    86400 | daily    | failed |
| 3181696 | 29815 | akismet_scheduled_delete       | a:0:{} | 2023-10-20 21:42:53 | 2023-10-20 21:42:53 |    86400 | daily    | failed |
| 3181209 | 29808 | akismet_scheduled_delete       | a:0:{} | 2023-10-20 21:42:53 | 2023-10-20 21:42:53 |    86400 | daily    | failed |
| 3181213 | 29809 | akismet_scheduled_delete       | a:0:{} | 2023-10-20 21:42:53 | 2023-10-20 21:42:53 |    86400 | daily    | failed |
| 3181503 | 29810 | akismet_scheduled_delete       | a:0:{} | 2023-10-20 21:42:53 | 2023-10-20 21:42:53 |    86400 | daily    | failed |
| 3181628 | 29814 | akismet_scheduled_delete       | a:0:{} | 2023-10-20 21:14:02 | 2023-10-20 21:14:02 |    86400 | daily    | failed |
| 3180902 | 29796 | delete_expired_transients      | a:0:{} | 2023-10-20 13:20:32 | 2023-10-20 13:20:32 |    86400 | daily    | failed |
| 3180901 | 29796 | wp_scheduled_delete            | a:0:{} | 2023-10-20 12:55:54 | 2023-10-20 12:55:54 |    86400 | daily    | failed |
| 3181645 |    15 | wdev_logger_clear_logs         | a:0:{} | 2023-10-20 00:00:00 | 2023-10-22 18:06:59 |    86400 | daily    | failed |
| 3180557 | 29785 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180565 | 29786 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3181086 | 29806 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3181090 | 29807 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180600 | 29787 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180858 | 29794 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180908 | 29797 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180912 | 29798 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180916 | 29799 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180924 | 29800 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180417 | 29781 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180935 | 29801 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180463 | 29783 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180976 | 29802 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
| 3180981 | 29803 | akismet_scheduled_delete       | a:0:{} | 2023-10-19 21:36:54 | 2023-10-19 21:36:54 |    86400 | daily    | failed |
+---------+-------+--------------------------------+--------+---------------------+---------------------+----------+----------+--------+
50 rows in set (0.04 sec)                                                                                                               

And Tarrell's site is listed (site 29835). I did some further checking from this list and many of these sites have the same wrong 'template' fatal error problem. I wrote a quick WP-CLI script to fix sites affected by the wrong 'template' option:

// Pass blog IDs delimited by space. Otherwise bail.
if ( empty( $args ) ) {
    exit;
}

// This is due to wp-content/plugins/cac-bp-custom-includes/root-blog.php
// TODO: Omit the 'option_template' filter for WP-CLI
remove_all_filters( 'option_template' );

$args = array_unique( $args );

foreach ( $args as $site_id ) {
    $template   = get_blog_option( $site_id, 'template' );
    $stylesheet = get_blog_option( $site_id, 'stylesheet' );

    // Do explicit check for 'twentytwelve' template before updating 'stylesheet' option.
    if ( 'twentytwelve' === $template && 'twentytwelve' !== $stylesheet ) {
        update_blog_option( $site_id, 'template', $stylesheet );
    } else {
        echo "Did nothing for site ID {$site_id}\n";
    }
}

The majority of the sites were using the 'twentytwenty' theme for the stylesheet, while a couple were using the 'ashe' theme. Since the 'twentytwenty' theme is part of the Default Site Template and the 'ashe' theme is part of the Teaching Template, this leads me to believe that something in the site template cloning script might be causing this bug. I'm going to stop for now and will continue tomorrow.

Actions #3

Updated by Boone Gorges 6 months ago

Thanks, Ray. I saw this issue recently myself on a test site. I took a brief look at the code in cac-site-templates that's used for site cloning, and I don't see an immediate problem. But perhaps there's something else in the Commons codebase that's causing certain default settings to be set, and perhaps it's happening in a race condition with the template-cloning process. Thanks for having a closer look.

Actions #4

Updated by Marilyn Weber 6 months ago

Tarrell reports that his site is fine. Thanks for the speedy fix!

Actions #5

Updated by Raymond Hoh 6 months ago

  • Related to Bug #19118: Created New Site --> Critical Error added
Actions #6

Updated by Raymond Hoh 6 months ago

  • Category name set to Blogs (BuddyPress)
  • Status changed from New to Duplicate
  • Assignee set to Raymond Hoh
  • Target version set to 2.2.2

This specific instance of this bug occurred during the release of Commons v2.2.0 and should be fixed now. See https://redmine.gc.cuny.edu/issues/19118#note-6 .

This doesn't explain this instance (https://redmine.gc.cuny.edu/issues/18235#note-1), but it should be less of a concern now.

Actions

Also available in: Atom PDF