Module version(s) affected
4.2.3
Description
When a MultiLinkField is added to SiteConfig via extension and updateCMSFields() it says "Failed to load link(s)" after the SiteConfig is saved. The links are saved, it is the retrieval of the updated list of links which is failing. See screenshot below from Network tab of Chrome dev tools. Subsequent requests add more square brackets:

How to reproduce
Add extension to siteconfig
SilverStripe\SiteConfig\SiteConfig:
extensions:
- App\Extensions\SiteConfigExtension
<?php
namespace App\Extensions;
use SilverStripe\Core\Extension;
use SilverStripe\Forms\FieldList;
use SilverStripe\LinkField\Form\MultiLinkField;
use SilverStripe\LinkField\Models\Link;
class SiteConfigExtension extends Extension
{
private static array $has_many = [
'ConfigLinks' => Link::class . '.Owner',
];
private static array $owns = [
'ConfigLinks',
];
public function updateCMSFields(FieldList $fields)
{
$fields->addFieldToTab('Root.Main', MultiLinkField::create('ConfigLinks'));
}
}
Then navigate to siteconfig via {yourdomain}/admin/settings. Add a new link of any type via the Configlinks field.
Click save, you should see the error message. If you refresh the page you will see the links have been saved OK.
Possible Solution
I rolled the silverstripe/linkfield version back to 4.0.0 and this fixed the issue, so the breaking change has been introduced between 4.0.0 and 4.2.3
Validations
PRs
Module version(s) affected
4.2.3
Description
When a MultiLinkField is added to SiteConfig via extension and
updateCMSFields()it says "Failed to load link(s)" after the SiteConfig is saved. The links are saved, it is the retrieval of the updated list of links which is failing. See screenshot below from Network tab of Chrome dev tools. Subsequent requests add more square brackets:How to reproduce
Add extension to siteconfig
Then navigate to siteconfig via
{yourdomain}/admin/settings. Add a new link of any type via the Configlinks field.Click save, you should see the error message. If you refresh the page you will see the links have been saved OK.
Possible Solution
I rolled the silverstripe/linkfield version back to 4.0.0 and this fixed the issue, so the breaking change has been introduced between 4.0.0 and 4.2.3
Validations
silverstripe/installer(with any code examples you've provided)PRs