diff --git a/src/Fieldtypes/Bard.php b/src/Fieldtypes/Bard.php index 2869aaa232..3c27cc5282 100644 --- a/src/Fieldtypes/Bard.php +++ b/src/Fieldtypes/Bard.php @@ -9,6 +9,7 @@ use Statamic\Facades\Entry; use Statamic\Facades\GraphQL; use Statamic\Facades\Site; +use Statamic\Fields\Value; use Statamic\Fieldtypes\Bard\Augmentor; use Statamic\GraphQL\Types\BardSetsType; use Statamic\GraphQL\Types\BardTextType; @@ -245,8 +246,13 @@ public function filter() protected function performAugmentation($value, $shallow) { - if ($this->shouldSaveHtml() && is_string($value)) { - return is_null($value) ? $value : $this->resolveStatamicUrls($value); + if ($this->shouldSaveHtml()) { + if ( + is_string($value) + || ($value instanceof Value && is_string($value->value())) // This part is not under test. See https://github.com/statamic/cms/pull/10104 + ) { + return is_null($value) ? $value : $this->resolveStatamicUrls($value); + } } if ($this->isLegacyData($value)) {