Bug description
This was introduced in Beta 5 with PR #13427.
Feedamic uses the new Settings in Statamic 6, and has a Blueprint that includes the required config.
After a new install, going to the Addon Settings, there is a Replicator visible with an "Add Feed" button.
Clicking this button shows a validation error in the console:
{
"message": "The given data was invalid.",
"errors": {
"blueprint": [
"This field is required."
]
}
}
The POST for this request is
{
"blueprint": null,
"field": "feeds",
"set": "feed"
}
The endpoint is
http://feedamic-test.test/cp/fieldtypes/replicator/set
Looking at the AddonSettingsController, if we dump the settingsBlueprint to the publish array, we get:
array:5 [▼ // vendor/statamic/cms/src/Http/Controllers/CP/Addons/AddonSettingsController.php:24
"title" => "feedamic::settings.title"
"handle" => null
"tabs" => array:2 [▶]
"empty" => false
"fqh" => null
]
Comparing this to the EntriesController, dumping the blueprint to the publish array, we get:
array:5 [▼ // vendor/statamic/cms/src/Http/Controllers/CP/Collections/EntriesController.php:116
"title" => "Page"
"handle" => "page"
"tabs" => array:2 [▶]
"empty" => false
"fqh" => "collections.pages.page"
]
Notice that the fqh is null for the Addon Settings.
Looking in resources/js/components/fieldtypes/replicator/Replicator.vue, you can see the fqh is used here (note, Bard uses it too).
For Addon Settings, the fqh is null, and this is used with the next POST to the ReplicatorSetController as the blueprint property - and this is what is causing the 422 with the ReplicatorSetController's validation.
How to reproduce
- Install Statamic 6
- Install Feedamic (
composer require mitydigital/feedamic) - Log in to the CP, and go to Addons, then Settings
- Click the "Add Feed" button
You will get a "Something went wrong" toast bottom left.
Logs
Environment
EnvironmentApplication Name: StatamicLaravel Version: 12.51.0PHP Version: 8.4.17Composer Version: 2.9.3Environment: localDebug Mode: ENABLEDURL: feedamic-test.testMaintenance Mode: OFFTimezone: UTCLocale: enCacheConfig: NOT CACHEDEvents: NOT CACHEDRoutes: NOT CACHEDViews: NOT CACHEDDriversBroadcasting: logCache: fileDatabase: sqliteLogs: stack / singleMail: logQueue: syncSession: fileStoragepublic/storage: NOT LINKEDStatamicAddons: 1Sites: 1Stache Watcher: Enabled (auto)Static Caching: DisabledVersion: 6.3.0 PROStatamic Addonsmitydigital/feedamic: 3.0.9
Installation
Fresh statamic/statamic site via CLI
Additional details
No response
Bug description
This was introduced in Beta 5 with PR #13427.
Feedamic uses the new Settings in Statamic 6, and has a Blueprint that includes the required config.
After a new install, going to the Addon Settings, there is a Replicator visible with an "Add Feed" button.
Clicking this button shows a validation error in the console:
The POST for this request is
The endpoint is
Looking at the
AddonSettingsController, if we dump thesettingsBlueprintto the publish array, we get:Comparing this to the
EntriesController, dumping theblueprintto the publish array, we get:Notice that the
fqhis null for the Addon Settings.Looking in
resources/js/components/fieldtypes/replicator/Replicator.vue, you can see thefqhis used here (note, Bard uses it too).For Addon Settings, the
fqhis null, and this is used with the nextPOSTto theReplicatorSetControlleras theblueprintproperty - and this is what is causing the 422 with theReplicatorSetController's validation.How to reproduce
composer require mitydigital/feedamic)You will get a "Something went wrong" toast bottom left.
Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
No response