My-Meta-Box icon indicating copy to clipboard operation
My-Meta-Box copied to clipboard

Text tab in Wordpress 5.5 editor stops working

Open chopper-lee opened this issue 4 years ago • 3 comments

On upgrading to Wordpress v5.5 it also upgrades JQuery, which no longer supports the 'live' command so scripts need updating to use the 'on' command instead. The TEXT tab on the editing screen to view a page in HTML doesn't work due to JQuery errors in the My Meta Box files. The following lines should be replaced: metabox.js

45 // $(".at-re-toggle").live('click', function() { $(document).on("click", ".at-re-toggle", function() { 194 //$('.simplePanelimageUploadclear,.simplePanelfileUploadclear').live('click', function( event ){ $(document).on("click", ".simplePanelimageUploadclear,.simplePanelfileUploadclear", function( event ) {

my-meta-box-class.php

466 echo ''; I have also added extra code in the last bit to provide a confirmation dialogue if you click on the red X button to delete a repeat field by accident.

chopper-lee avatar Aug 14 '20 16:08 chopper-lee

The asterixes have got removed in these 2 lines in the above /* jQuery("#add-'.$field['id'].'").live('click', function() { / / jQuery("#remove-'.$field['id'].'").live('click', function() { */ and don't copy the 466 - that's roughly the line number of the starting line to help find it. Or just do a search of the text for .live

chopper-lee avatar Aug 14 '20 16:08 chopper-lee

The same has happened again. Just delete those 2 lines - they were only the originals you are looking for to be replaced. Also make sure you completely wipe your browser cache and refresh otherwise you won't see it work.

chopper-lee avatar Aug 14 '20 16:08 chopper-lee

@chopper-lee Thanks a shit ton my brother. I was all worried for a second and boom... you had my answer. Just upgraded.

BobbyRuby avatar Sep 25 '20 03:09 BobbyRuby