Hi,
Thanks for the feedback. I’ll try to reproduce the fault and fix. Hopefully a straight forward issue.
I assume you’re creating the sites using the standard network admin pages.
Alex
Yes, according to my site builders they use the built-in standard network admin pages. Thanks much!
Hi – So I’ve got debugging turned on for my multisite and tried creating a new site here:
Network Admin > Sites > Add new
And the site was created successfully and it added the info to the DB without a problem / error.
So I’m not sure whats going on, but I’ll modify the code so it won’t fail and then update the plugin version. I’ll let you know when its done so you can test.
Alex
Just an FYI: We were able to resolve it (in an extremely hacky way) on our installation.
we noticed that $this was returning NULL on line 84. So we just pulled the entire MSA_addThemetoDB up into the MSA_updateThemeNewBlog function.
public static function MSA_updateThemeNewBlog($blogID)
{
$blogInfo = MSA_functions::getBlogInfo($blogID);
// $this->MSA_addThemeToDB($blogInfo); <-- was NULL here
global $wpdb;
$blogID = $blogInfo['blogID'];
$themeName = $blogInfo['themeName'];
$blogName = $blogInfo['blogName'];
$blogURL = $blogInfo['blogURL'];
$dateCreated = $blogInfo['dateCreated'];
$myDate= date('Y-m-d h:i:s');
// Delete from theme database any old data about this blog
$table_name = $wpdb->base_prefix . "MSA_themes";
$deleteSQL = 'DELETE FROM '.$table_name.' WHERE blogID = %d';
$RunQry = $wpdb->query( $wpdb->prepare( $deleteSQL, $blogID ));
$myFields="INSERT into ".$table_name." (blogID, themeName, blogName, blogURL, dateCreated, activateDate) ";
$myFields.="VALUES (%u, '%s', '%s', '%s', '%s', '%s')";
$RunQry = $wpdb->query( $wpdb->prepare($myFields,
$blogID,
$themeName,
$blogName,
$blogURL,
$dateCreated,
$myDate
));
}
Hacky? Heck yeah. But it works!
Great, as long as it works!
Will try to sort a more permanent solution going forward…
Alex