Skip to content

Commit

Permalink
Merge pull request #1503 from craftcms/bugfix/1499-inner-element-fields
Browse files Browse the repository at this point in the history
Bugfix/1499 inner element fields
  • Loading branch information
angrybrad authored Sep 25, 2024
2 parents 73a3df8 + 410860d commit 504ce4f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/web/twig/variables/FeedMeVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@
use craft\feedme\Plugin;
use craft\fields\Checkboxes;
use craft\fields\Color;
use craft\fields\Country;
use craft\fields\Date;
use craft\fields\Dropdown;
use craft\fields\Email;
use craft\fields\Lightswitch;
use craft\fields\Money;
use craft\fields\MultiSelect;
use craft\fields\Number;
use craft\fields\PlainText;
use craft\fields\RadioButtons;
use craft\fields\Time;
use craft\fields\Url;
use craft\helpers\DateTimeHelper;
use craft\helpers\Html;
Expand Down Expand Up @@ -230,7 +233,7 @@ public function getElementLayoutByField($type, $field): ?array
$section = $this->getEntrySourcesByField($field)[0] ?? null;

if ($section) {
$source = Craft::$app->getSections()->getEntryTypeById($section->id);
$source = $section->getEntryTypes()[0] ?? null;
}
} elseif ($type === 'craft\fields\Tags') {
$source = $this->getTagSourcesByField($field);
Expand Down Expand Up @@ -344,13 +347,18 @@ public function supportedSubField($class): bool
$supportedSubFields = [
Checkboxes::class,
Color::class,
Country::class,
Date::class,
Dropdown::class,
Email::class,
Lightswitch::class,
Money::class,
MultiSelect::class,
Number::class,
PlainText::class,
RadioButtons::class,
Time::class,
Url::class,
'craft\ckeditor\Field',
'craft\redactor\Field',
];
Expand Down

0 comments on commit 504ce4f

Please sign in to comment.