I'm getting an array to string conversion error when trying to save a page with a Bard field. Fieldset is setup through the GUI, results in:

sections:
  content:
    display: Content
    fields:
      title:
        display: Title
        type: text
        width: 66
        localizable: true
      slug:
        type: text
        width: 33
        display: Slug
      content:
        spellcheck: true
        allow_source: true
        autoLink: false
        target_blank: false
        link_validation: false
        force_plain_text: true
        clean_pasted_html: false
        restrict_assets: false
        type: bard
        display: Content
        sets:
          set_1:
            display: 'Set 1'
            fields:
              field_1:
                container: site_assets
                folder: /
                restrict: false
                type: assets
                display: 'Field 1'
title: Default
hide: true

From here when I go to create a new page it picks up the fieldset but throws the error when saving. If I remove the set_1 from the fieldset it will save cleanly. Saved page, without set_1 in the bard sets looks like:

---
title: Test
fieldset: default
id: a47d0bc0-0c00-4851-9334-e6f0baff9067
---
<p>test</p

Running 2.11.2. Any ideas?

First few logs:

[2018-11-12 02:36:41] production.ERROR: ErrorException: Array to string conversion in /Users/user/Repos/website/statamic/core/API/YAML.php:68
Stack trace:
#0 /Users/user/Repos/website/statamic/core/API/YAML.php(68): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Array to string...', '/Users/user/R...', 68, Array)
#1 /Users/user/Repos/website/statamic/core/Data/Content/Content.php(284): Statamic\API\YAML::dump(Array, Array)
#2 /Users/user/Repos/website/statamic/vendor/laravel/framework/src/Illuminate/Support/Collection.php(135): Statamic\Data\Content\Content->Statamic\Data\Content\{closure}(Array, 0)
#3 /Users/user/Repos/website/statamic/core/Data/Content/Content.php(297): Illuminate\Support\Collection->each(Object(Closure))
#4 /Users/user/Repos/website/statamic/core/Data/Content/Content.php(226): Statamic\Data\Content\Content->writeFiles()
#5 /Users/user/Repos/website/statamic/core/CP/Publish/Publisher.php(366): Statamic\Data\Content\Content->save()
#6 /Users/user/Repos/website/statamic/core/CP/Publish/Publisher.php(114): Statamic\CP\Publish\Publisher->save()
#7 /Users/user/Repos/website/statamic/core/Http/Controllers/PublishController.php(101): Statamic\CP\Publish\Publisher->publish()
Answered by Jason Varga! Go to answer.