Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#45763 closed defect (bug) (worksforme)

Error after 5.0.2 Update wp-pollyfill

Reported by: m0nk3y22's profile m0nk3y22 Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.0.2
Component: General Keywords:
Focuses: Cc:

Description

After updating to the latest version of wordpress i get a Syntax Error missing ) as seen on the image below because the script that is printed in the head of admin pages is printing ' & " wrong thus they are not closing correct. I have disabled all plugins but the problem still exists. I use Flatsome as my theme which is compatible with the latest version. How can i disable this script from printed in the admin pages? I tried wp_deregister_script but doesn't seem to work. The problem is that i cannot edit any page

https://i.stack.imgur.com/A9yPO.jpg

<script type='text/javascript'>
( 'fetch' in window ) || document.write( '<script src="https://lightlab.gr/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js' defer "></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://lightlab.gr/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js' defer "></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://lightlab.gr/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js' defer "></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://lightlab.gr/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js' defer "></scr' + 'ipt>' );
</script>

Change History (2)

#1 @mukesh27
6 years ago

  • Keywords reporter-feedback close added
  • Severity changed from critical to normal

Hi @m0nk3y22, Welcome to WordPress Trac! Thank you for your ticket.

Does the issue still happen with all plugins disabled and a default theme (Twenty Nineteen) activated? if no then you can please contact to theme author as it's theme bug not WordPress core software bug.

#2 @desrosj
6 years ago

  • Keywords reporter-feedback close removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I am going to close this out from lack of reporter feedback. I am also unable to reproduce the issue described. Looking at the code you have provided, it seems that a plugin or theme is incorrectly adding defer to the <script> tag.

'<script src="https://lightlab.gr/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js' defer "></scr'

The string is opened using a single ', and then closed prior to defer being added. That means a syntax error is correctly being shown by the browser.

Last edited 6 years ago by desrosj (previous) (diff)
Note: See TracTickets for help on using tickets.