Project

General

Profile

Actions

Bug #20439

open

Critical Error during site creation

Added by Laurie Hurson 6 months ago. Updated 4 months ago.

Status:
New
Priority name:
Normal
Assignee:
Category name:
-
Target version:
Start date:
2024-06-04
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Hi All, I just received this messge from a user:

" I just tried to create a site with a faculty member and we are getting the error below and I’m not sure why.

The site is - https://blackfeminisms.commons.gc.cuny.edu/wp-admin/"

I am getting the same error page, see screenshot.


Files


Related issues

Related to CUNY Academic Commons - Support #21140: critical errorNewRaymond Hoh2024-10-01

Actions
Actions #1

Updated by Boone Gorges 6 months ago

The fatal error was coming from the Ashe theme, which was using get_parent_theme_file_path() to load some required libraries. But something in the site creation process had caused the 'template' option to be set to 'twentytwelve' (incorrectly, since twentytwelve is not the parent of ashe). The twentytwelve directory doesn't have the files in question, triggering the fatal error.

I've changed this database value for the site in question, and it now appears to be loading properly.

Ray, do you have any ideas why this might have happened? Could it have something to do with the cac-site-templates cloning process?

Actions #2

Updated by Laurie Hurson 6 months ago

Thanks for the quick fix, Boone!

Actions #3

Updated by Raymond Hoh 6 months ago

This is a long-occurring bug. See https://redmine.gc.cuny.edu/issues/18235#note-1, #19083.

Unfortunately, I haven't nailed down what is causing this. My theme option logger did not catch the blackfeminisms 'template' change. Here's what I'm using for the logger:

add_filter( 'pre_update_option_template', function( $retval, $old_value, $option ) {
    if ( $retval !== $old_value ) {
        ray_log( $old_value . ' switched to ' . $retval . ' for site ID ' . get_current_blog_id() . ': ' . wp_debug_backtrace_summary() );
    }

    return $retval;
}, 10, 3) ;

My logger did catch the blog ID following blackfeminisms:

[04-Jun-2024 16:13:39] twentytwelve switched to ashe for site ID 34485: require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/bp-nelo/buddypress.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, bp_replace_the_content, apply_filters('bp_replace_the_content'), WP_Hook->apply_filters, BP_Blogs_Theme_Compat->create_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require('/themes/bp-nelo/blogs/create.php'), cac_show_blog_signup_form, cac_blogs_validate_blog_signup, wpmu_create_blog, wp_insert_site, do_action_deprecated, do_action_ref_array('wpmu_new_blog'), WP_Hook->do_action, WP_Hook->apply_filters, CAC\SiteTemplates\Frontend::process_site_template, CAC\SiteTemplates\Template\Template->clone_to_site, CAC\SiteTemplates\Template\Cloner->go, CAC\SiteTemplates\Template\Cloner->migrate_site_settings, update_option, apply_filters('pre_update_option_template'), WP_Hook->apply_filters, {closure}

And that site appears to work fine.

Also, the Cavalcade thing I mention in the previous tickets doesn't seem to be related to this specific instance. All signs point to something during the site creation process, but I'm not sure what is causing it. Could be cache-related, but it doesn't explain how it is triggered during other user's site creations.

Actions #4

Updated by Boone Gorges 4 months ago

  • Assignee set to Raymond Hoh
  • Target version set to Not tracked
Actions #5

Updated by Boone Gorges about 2 months ago

Actions

Also available in: Atom PDF