You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running ./craft migrate/up with this code and uriFormat is blank for homepage. It fails to run the migration. Setting null does not work either. However if I set something random in the uriFormat field it works.
Is this a bug or am I missing something?
Thanks!
Error message below:
*** failed to apply m180304_095011_entry_homepage (time: 0.021s)
0 from 1 migrations were applied.
Migration failed. The rest of the migrations are canceled.
Migration:
// Get the primary site ID
$siteId = Craft::$app->sites->getPrimarySite()->id;
//
// Create Home
//
$homepage = new Section([
'name' => 'Home',
'handle' => 'homepage',
'enableVersioning' => 1,
'type' => 'single',
'siteSettings' => [
new Section_SiteSettings([
'siteId' => $siteId,
'uriFormat' => '',
'template' => 'index',
'hasUrls' => 1,
])
]
]);
return Craft::$app->sections->saveSection($homepage);
Description
When running ./craft migrate/up with this code and uriFormat is blank for homepage. It fails to run the migration. Setting null does not work either. However if I set something random in the uriFormat field it works.
Is this a bug or am I missing something?
Thanks!
Error message below:
Migration:
Steps to reproduce
./craft migrate/up
Additional info
The text was updated successfully, but these errors were encountered: