Support » Networking WordPress » Wrong parent styles loading after migration

  • Resolved michaelware1205

    (@michaelware1205)


    This issue is with a subfolder site on a multisite install with a 8 sites, a parent theme and 7 child themes. The first 6 subsites were easy to migrate from dev to production (WP Migrate DB). But this time, the new subsite, https://www.qacps.org/mes/, will not load the parent theme style.css. Instead, it tries to load the twentytwentytwo style.css. I’ve deleted that on my server, but it still looks for that theme as the parent.

    Since all of the child themes designate and load the parent theme in the same way,

    /*!
    Theme Name:   Matapeake Elementary Child Theme
    Description:  QACPS child theme for MES
    Author:       PP
    Author URI:   
    Template:     queen-anne-main
    Version:      1.0.0
    Text Domain:  mes-child
    */

    and

    
    function mes_enqueue_styles() {
    
        $parenthandle = 'parent-style'; 
        $theme = wp_get_theme();
        wp_enqueue_style( $parenthandle, get_template_directory_uri() . '/style.css', 
            array(),  // if the parent theme code has a dependency, copy it to here
            $theme->parent()->get('Version')
        );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(),
            array( $parenthandle ),
            filemtime( get_stylesheet_directory() . '/style.css' )
        );
    
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
        
    }
    
    add_action( 'wp_enqueue_scripts', 'mes_enqueue_styles' );
    

    I think the issue might be with the allowedthemes data in the sitemeta table, as suggested in this post.

    
    a:8:{s:15:"queen-anne-main";b:1;s:8:"beschild";b:1;s:8:"ceschild";b:1;s:16:"churchhill-child";b:1;s:17:"grasonville-child";b:1;s:13:"kennard-child";b:1;s:17:"kent-i-elem-child";b:1;s:15:"matapeake-child";b:1;}
    

    I’ve tried loading the parent and child themes manually. That loads the styles correctly, but WordPress still thinks the parent is twentytwentytwo.
    Losing my mind trying to figure this one out.
    Any feedback would be greatly appreciated.
    Thanks

    The page I need help with: [log in to see the link]

  • You must be logged in to reply to this topic.