Skip to content

Commit

Permalink
as of 5.5.0 the title field is not generated automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
markhuot committed Nov 20, 2024
1 parent 7f61b23 commit 482ae61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/factories/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Composer\InstalledVersions;
use Composer\Semver\VersionParser;
use Craft;
use craft\fieldlayoutelements\entries\EntryTitleField;
use craft\helpers\StringHelper;
use craft\models\EntryType;
use craft\models\Section_SiteSettings;
Expand Down Expand Up @@ -113,6 +114,7 @@ public function inferences(array $definition = [])
'name' => $name,
'handle' => StringHelper::toHandle($name),
]);
$entryType->getFieldLayout()->prependElements([new EntryTitleField()]);

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~4.5.0, 4)

Call to an undefined method craft\models\FieldLayout::prependElements().

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~4.6.0, 4)

Call to an undefined method craft\models\FieldLayout::prependElements().

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~4.7.0, 4)

Call to an undefined method craft\models\FieldLayout::prependElements().

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~5.0.0, 5)

Call to an undefined method craft\models\FieldLayout::prependElements().

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~5.1.0, 5)

Call to an undefined method craft\models\FieldLayout::prependElements().

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~5.2.0, 5.2)

Call to an undefined method craft\models\FieldLayout::prependElements().

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~5.3.0, 5.3)

Call to an undefined method craft\models\FieldLayout::prependElements().

Check failure on line 117 in src/factories/Section.php

View workflow job for this annotation

GitHub Actions / test (~5.4.0, 5.4)

Call to an undefined method craft\models\FieldLayout::prependElements().
service(SectionsServiceInterface::class)->saveEntryType($entryType);
throw_if($entryType->errors, 'Problem saving entry type: '.implode(', ', $entryType->getFirstErrors()));
$definition['entryTypes'] = [$entryType];
Expand Down

0 comments on commit 482ae61

Please sign in to comment.