WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16227 closed enhancement (duplicate)

Stop Firebug from borking on missing convertEntities()

Reported by: mikeschinkel Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: General Keywords: reporter-feedback
Focuses: Cc:

Description

Firebug breaks on the following line which makes JavaScript debugging extremely tedious:

try{convertEntities(blahblah);}catch(e){};

I believe the following should accomplish the same thing without causing Firebug to bork:

if (typeof convertEntities=="function"){convertEntities(blahblah);}

I've attached a patch to change these.

This may already have been addressed by #15124 and if so forgive me but I could not tell for sure.

Attachments (1)

convertEntities-Firebug-Fix.diff (9.8 KB) - added by mikeschinkel 3 years ago.
Changes call to convertEntities() so Firebug doesn't always break on those calls

Download all attachments as: .zip

Change History (7)

mikeschinkel3 years ago

Changes call to convertEntities() so Firebug doesn't always break on those calls

comment:1 westi3 years ago

  • Keywords reporter-feedback added; has-patch removed

Which scripts?

comment:2 mikeschinkel3 years ago

Not sure, but if I use Firebug it always breaks on them. Can't you look at the patch to see the relevence?

comment:3 follow-up: ocean903 years ago

On which page you can see the error message? It means, that there is an error with the loading of the script. Your patch will not help then.

comment:4 in reply to: ↑ 3 mikeschinkel3 years ago

Replying to ocean90:

On which page you can see the error message? It means, that there is an error with the loading of the script. Your patch will not help then.

You misunderstand. Without the patch I get this when debugging with Firebug:

http://mikeschinkel.com/websnaps/skitched-20110114-072634.png

With the patch Firebug does not break on the error in every page load in the admin.

comment:5 westi3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Ok.

So quicktags translations then.

This is fixed in 3.1

Your patch is broken because it removes the calls to convertEntities if the function isn't there rather than fixing the fact that it isn't there.

Closing as a dupe of #15124

comment:6 mikeschinkel3 years ago

Thanks. I wasn't sure it #15124 fixed it or not as I mentioned. (BTW, I only removed the calls to convertEntities() because I was trying to mirror the existing behavior with having Firebug flag as an error.)

Note: See TracTickets for help on using tickets.