diff --git a/src/Modules/hosting_site/src/Form/CreateSiteForm.php b/src/Modules/hosting_site/src/Form/CreateSiteForm.php index 8830ad0..4e6f33f 100644 --- a/src/Modules/hosting_site/src/Form/CreateSiteForm.php +++ b/src/Modules/hosting_site/src/Form/CreateSiteForm.php @@ -6,6 +6,7 @@ use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; +use Drupal\hosting_site\Entity\SiteEntity\HostedDrupalSite; use Drupal\hosting_site\Entity\SiteEntity\HostedSite; use Drupal\site\Entity\SiteEntity; @@ -59,7 +60,7 @@ public function validateForm(array &$form, FormStateInterface $form_state): void $form_state->setErrorByName('code', $this->t('The site name %name is not available.', ['%name' => $form_state->getValue('name')])); } - $site = HostedSite::create([ + $site = HostedDrupalSite::create([ 'type' => 'hosted_drupal_site', 'site_uri' => $full_url, ]); diff --git a/web/sites/default/settings.php b/web/sites/default/settings.php index d1ba591..478ccba 100644 --- a/web/sites/default/settings.php +++ b/web/sites/default/settings.php @@ -921,7 +921,7 @@ // Lookup site based on URI. $conn = new PDO("mysql:host=$database_hostname;dbname=$database", $username, $password); - $sql = "SELECT * FROM site__site_uri s LEFT JOIN operations_site os ON s.entity_id = os.sid WHERE site_uri_value IN (:site_url, :site_url_https) AND s.bundle = 'hosted_site' ORDER BY entity_id DESC"; + $sql = "SELECT * FROM site__site_uri s LEFT JOIN operations_site os ON s.entity_id = os.sid WHERE site_uri_value IN (:site_url, :site_url_https) AND s.bundle = 'hosted_drupal_site' ORDER BY entity_id DESC"; $query = $conn->prepare($sql, []); $query->execute([