Conversation
supportHello, we are getting warnings every time the media library is accessed on “Grid” mode. Debugging further I’ve realized where the bug is introduced. $args is lost after get_media_item_args is called, and the warning happens when next lines try to access $args[‘in_modal’] /** This filter is documented in wp-admin/includes/media.php */ $args = apply_filters( 'get_media_item_args', $args ); in init.php, line 582, you introduce a filter: // Force 'Insert into Post' button from Media Library. add_filter( 'get_media_item_args', 'bsf_force_send' ); function bsf_force_send( $args ) { if ( ! isset( $_GET['bsf_file_upload_nonce'] ) || ! wp_verify_nonce( $_GET['bsf_file_upload_nonce'], 'ajax_nonce' ) ) { return ; // <- Here is the bug, you should return $args } The plugin is breaking the filter, returning nothing instead of returning the original $args.
Hi @furi3r , Thanks for your question. I am not sure why this happens. Would you mind creating a ticket through the plugin so that we can debug that? Here is the screenshot that would help. This reply was modified 3 years, 1 month ago by deepakl . This reply was modified 3 years, 1 month ago by Jan Dembowski .
@deepakl Do not use short links in these forums, that has been abused in the past and is expanded when found. I have expanded yours.
Hi @jdembowski , Thanks for the heads up! Noted!
Hi @furi3r , Thanks for your question. I am not sure why this happens. Would you mind creating a ticket through the plugin so that we can debug that? Here is the screenshot that would help. This reply was modified 3 years, 1 month ago by deepakl . This reply was modified 3 years, 1 month ago by Jan Dembowski .
@deepakl Do not use short links in these forums, that has been abused in the past and is expanded when found. I have expanded yours.
Hi @jdembowski , Thanks for the heads up! Noted!