Closed tomjn closed 2 years ago
Some notes:
amf-select
AJAX action which is triggered from the clickhandler, it does not appear to happen when galleries are selected or createdWhen selecting items to add to a gallery the following errors where returned by query monitor in the AJAX response:
{
"key": "b30a06da64c986677cd88b96533a6b98",
"type": "notice",
"message": "Undefined index: meta",
"file": "content/plugins/asset-manager-framework/inc/namespace.php",
"line": 156,
"stack": [
"AssetManagerFramework\\ajax_select()",
"do_action('wp_ajax_amf-select')"
],
"component": "Plugin: asset-manager-framework"
}
and
{
"key": "8bb53d2b18bdb3bfbe3420bf209b11b9",
"type": "warning",
"message": "Invalid argument supplied for foreach()",
"file": "wp-includes/post.php",
"line": 4304,
"stack": [
"wp_insert_post()",
"wp_insert_attachment()",
"AssetManagerFramework\\ajax_select()",
"do_action('wp_ajax_amf-select')"
],
"component": "Plugin: asset-manager-framework"
}
Inserting this code eliminates all the options from the provider dropdown on the edit gallery screen:
var MediaLibraryProviderFilter = wp.media.view.AttachmentFilters.extend({
id: 'media-attachment-provider-filter',
createFilters: function() {
if ( this.options.controller._state === 'gallery-edit' ) {
return;
}
This succesfully hid the dropdown on the edit gallery screen:
if ( this.options.controller._state === 'gallery-edit' ) {
this.$el.hide();
} else {
this.$el.show();
}
Noting that local testing of #63 results in working galleries. I'm suspicious of this as the changes are small and I expected more work to be necessary. I'd very much like independent confirmation
Solved in #63
AMF doesn't currently support galleries officially ( v0.13 )