Title: plugin doesn&#039;t work with wordpress 4.3
Last modified: August 30, 2016

---

# plugin doesn't work with wordpress 4.3

 *  [crossi72](https://wordpress.org/support/users/crossi72/)
 * (@crossi72)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/)
 * I used Media Rename for une year but after updating wordpress to release 4.3 
   the plugin has stopped working.
    Someone found a way to repair the plugin?
 * [https://wordpress.org/plugins/media-rename/](https://wordpress.org/plugins/media-rename/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/page/2/?output_format=md)

 *  [Jose Luis Cruz](https://wordpress.org/support/users/joseluiscruz/)
 * (@joseluiscruz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519871)
 * Same here, I had to disable it in order to be able to use the media library
 *  Thread Starter [crossi72](https://wordpress.org/support/users/crossi72/)
 * (@crossi72)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519901)
 * I found a solution, in plugins/media-rename/js/scripts.js replace:
    $(document).
   ready(function() { $form = $(‘.wrap form’); is_media_single = !$(‘.wp-list-table’).
   length; if (!is_media_single) { $(‘.tablenav select[name^=action]’).each(function(){
   for (label in MRSettings.labels) { $(‘option:last’, this).before( $(‘<option>’).
   attr(‘value’, label).text( decodeURIComponent(MRSettings.labels[label].replace(/\
   +/g, ‘%20’)) ) ); } }); } $(‘#post’).submit(process_form_submit); $(‘.tablenav.
   button.action’).click(process_form_submit); });
 * with:
    $(document).ready(function() { $form = $(‘.wrap form’);
 *  if ($(‘.wp_attachment_holder .thumbnail’).length == 1){
    is_media_single = true;}
   else{ is_media_single = false; }
 *  if (!is_media_single) {
    $(‘.tablenav select[name^=action]’).each(function(){
   for (label in MRSettings.labels) { $(‘option:last’, this).before( $(‘<option>’).
   attr(‘value’, label).text( decodeURIComponent(MRSettings.labels[label].replace(/\
   +/g, ‘%20’)) ) ); } }); }
 *  $(‘#post’).submit(process_form_submit);
    $(‘.tablenav .button.action’).click(
   process_form_submit); });
 *  [jostwind](https://wordpress.org/support/users/jostwind/)
 * (@jostwind)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519918)
 * Hello,
    I have replaced the part of the script as you have indicated, but for
   me it’s still not working. For you it really works?
 * Best regards
 *  Thread Starter [crossi72](https://wordpress.org/support/users/crossi72/)
 * (@crossi72)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519919)
 * Yes, runs like a charm on three test sites (I’m still testing it before releasing
   on customers servers ^^).
    This is the complete js file:
 *     ```
       (function($) {
       	var $form, $fields, type, is_media_single, fields_count, current_field = 0;
   
       	$.fn.do_rename = function() {
       		var $field = this;
   
       		$.post(
       			ajaxurl, {
       				action: 'media_rename',
       				type: type,
       				_wpnonce: $('input[name=_mr_wp_nonce]', $form).val(),
       				new_filename: $('input', $field).val(),
       				post_id: $('input', $field).data('post-id')
       			}, function (response) {
       				$('.loader', $field).hide();
   
       				if (response != '1') {
       					$('.error', $field).text(response).css('display', 'inline-block');
       				} else {
       					$('input[type=text]', $field).attr('title', $('input[type=text]', $field).val());
       					$('.success', $field).css('display', 'inline-block');
       				}
   
       				if (++current_field == fields_count) {
       					current_field = 0;
   
       					if (!$form.find('.error:visible').length) {
       						$form.submit();
       					}
       				} else {
       					$fields.eq(current_field).do_rename();
       				}
       			}
       		);
       	}
   
       	$(document).ready(function() {
       		$form = $('.wrap form');
   
       		if ($('.wp_attachment_holder .thumbnail').length == 1){
       			is_media_single = true;
       		}
       		else{
       			is_media_single = false;
       		}
   
       		if (!is_media_single) {
       			$('.tablenav select[name^=action]').each(function() {
       				for (label in MRSettings.labels) {
       					$('option:last', this).before( $('<option>').attr('value', label).text( decodeURIComponent(MRSettings.labels[label].replace(/\+/g, '%20')) ) );
       				}
       			});
       		}
   
       		$('#post').submit(process_form_submit);
       		$('.tablenav .button.action').click(process_form_submit);
       	});
   
       	var process_form_submit = function() {
       		type = $(this).siblings('select').length ? $(this).siblings('select').val() : 'rename';
   
       		if (!is_media_single && (type != 'rename' && type != 'rename_retitle') ) return;
   
       		$fields = (is_media_single) ? $('.media-rename', $form) : $('#the-list input:checked', $form).closest('tr').find('.media-rename');
   
       		$fields = $fields.filter(function() {
       			return $('input[type=text]', this).val() != $('input[type=text]', this).attr('title');
       		});
   
       		if (fields_count = $fields.length) {
       			$fields.find('.loader, .error, .success').hide();
       			$fields.find('.loader').css('display', 'inline-block');
   
       			$fields.eq(current_field).do_rename();
   
       			return false;
       		}
       	};
   
       })(jQuery);
       ```
   
 * I also added sanitize_file_name in class-media-rename.php but this is only required
   to process file name containing white spaces.
 *  [jostwind](https://wordpress.org/support/users/jostwind/)
 * (@jostwind)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519922)
 * Hello,
 * I just copy / paste the entire js file, but for me it does not work for the moment…
 * Have you anything else to do?
 * Best regards
 *  [jostwind](https://wordpress.org/support/users/jostwind/)
 * (@jostwind)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519923)
 * Hello again,
    I just uninstall the plug-in and reinstall it by changing all the
   js file again, but it still does not work …
 *  [jostwind](https://wordpress.org/support/users/jostwind/)
 * (@jostwind)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519924)
 * Hello again,
 * Looking carefully at the edit table, I see that it states: Changing media-rename/
   js / scripts.js (off).
 * Can you m indicate how to switch to the mode (activated)?
 * Thank you
 *  Thread Starter [crossi72](https://wordpress.org/support/users/crossi72/)
 * (@crossi72)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519926)
 * Send me an email at claudio_at_eurosoftlab_dot_com I’ll send you a full copy 
   of my modified plugin so we can test it on your server.
 *  [jostwind](https://wordpress.org/support/users/jostwind/)
 * (@jostwind)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519928)
 * it works, big thank you !!!
 * I wish you the best
 *  [ryanlegal32](https://wordpress.org/support/users/ryanlegal32/)
 * (@ryanlegal32)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519930)
 * Can you send me a copy as well. I just sent you an email
 *  [jostwind](https://wordpress.org/support/users/jostwind/)
 * (@jostwind)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519931)
 * Hello,
 * crossi72 is the script editor, I suggest you contact him directly. You have his
   email address in his last post.
 * Best regards
 *  Thread Starter [crossi72](https://wordpress.org/support/users/crossi72/)
 * (@crossi72)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519932)
 * I’d like to contact the plugin author to send him my fix, someone may tell me
   if is possible to contact the author?
 *  Thread Starter [crossi72](https://wordpress.org/support/users/crossi72/)
 * (@crossi72)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519950)
 * I’m receiving lots of requests so I published my modified plugin here: [http://www.eurosoftlab.com/media-rename.zip](http://www.eurosoftlab.com/media-rename.zip)
 * Hope this help
    C.
 *  [Jose Luis Cruz](https://wordpress.org/support/users/joseluiscruz/)
 * (@joseluiscruz)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519951)
 * Thanks, this fix sort of works, but it conflicts with the WPML plugin + wpml-
   media. So I can’t use it.
 *  [media22](https://wordpress.org/support/users/media22/)
 * (@media22)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/#post-6519957)
 * [@crossi72](https://wordpress.org/support/users/crossi72/), wonderfull job

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/page/2/?output_format=md)

The topic ‘plugin doesn't work with wordpress 4.3’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/media-rename.svg)
 * [Media Rename](https://wordpress.org/plugins/media-rename/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/media-rename/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/media-rename/)
 * [Active Topics](https://wordpress.org/support/plugin/media-rename/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/media-rename/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/media-rename/reviews/)

 * 17 replies
 * 6 participants
 * Last reply from: [crossi72](https://wordpress.org/support/users/crossi72/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/plugin-doesnt-work-with-wordpress-43/page/2/#post-6519999)
 * Status: not resolved