WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#10027 closed defect (bug) (invalid)

Code Syntax Highlighter not working in Google Chrome and Safari, disabled in Opera 10

Reported by: keithdsouza Owned by: azaozz
Milestone: Priority: normal
Severity: normal Version: 2.8
Component: JavaScript Keywords: needs-patch
Focuses: Cc:

Description

The Code Syntax Highlighter in WordPress 2.8 does not highlight code in Google Chrome, it works fine with all other major browsers, attached is a screenshot of how it looks in Chrome. Google Chrome version is 3.0.182.3. Safari has the same problems

In addition to that the code editor is completely disabled in Opera 10.

Screenshots

Syntax highlighting not working in Chrome
http://www.pict.com/view/724871/0/wp28highlighternotworkingchrome

Code Editor disabled in Opera
http://www.pict.com/view/724870/0/opera10plugineditordisable

Change History (18)

comment:1 @dd326 years ago

  • Keywords needs-patch needs-testing added
  • Priority changed from high to normal
  • Version set to 2.8

AFAIK Opera 9 doesnt support the code highlighter (Or its buggy), I'm not sure if Opera 10 supports it, But I'll test later (I solely use it) and submit a patch for opera if its the case it works.

comment:2 @azaozz6 years ago

Unfortunately nobody seems to be developing Codepress any more. There are some others we could try.

comment:3 @dd326 years ago

CodeMirror looks pretty nice.. and simplistic.. Still havn't gotten around to testing this.

comment:4 @dd326 years ago

  • Keywords needs-testing removed

I mis-read this ticket.

The highlighter isn't disabled in Opera10, The text area, however does become disabled. Means that CodePress is just plain buggy with it i guess.

Look into replacing it with a currently-developed class for 2.9, What should we do for 2.8 though? Disable it for Opera10/chrome/safari? But Opera10 final (Its beta atm) might support it.. etc.

comment:5 @dd326 years ago

  • Keywords dev-feedback added

comment:6 @azaozz6 years ago

Perhaps we should add "Disable syntax highlighting" that would switch to the plain textarea (and remember the choice).

comment:7 follow-up: @dd326 years ago

Perhaps we should add "Disable syntax highlighting" that would switch to the plain textarea (and remember the choice).

Something very similar to the TinyMCE switcher would be nice..

comment:8 @keithdsouza6 years ago

What about Google Chrome and Safari, Webkit in general, will someone be looking into it???

comment:9 in reply to: ↑ 7 @azaozz6 years ago

Replying to dd32:

Something very similar to the TinyMCE switcher would be nice..

Not sure if we can make it "switch on the fly" like TinyMCE as CodePress seems to crash and js based switching would be unreliable. Will test some basic try{} catch(e){} calls to see if that is stable enough in all browsers.

comment:10 @azaozz6 years ago

(In [11530]) Allow CodePress to be disabled from Screen Options, see #10027

comment:11 @azaozz6 years ago

  • Component changed from Formatting to JavaScript
  • Milestone changed from 2.8 to 2.9
  • Owner set to azaozz

Can probably look for different code editor for 2.9.

comment:12 @Denis-de-Bernardy6 years ago

Imo, we should dump these editors outright. they serve absolutely no purpose for WP's target audience (that is, casual users, as opposed to greasy bearded GNU'ers such as ourselves). Metrosexual Mac users might complain, but they can always be invited to get a copy of TextMate to do their stuff -- or install a plugin, that adds CodePress.

comment:13 @dd326 years ago

Imo

You're not taking it far enough. I mean, Why not move all media management to a plugin.. i mean, we dont all use it.. what about pages? thats used by even less, oh then theres permalinks.. ah bugger it, make WP 10KB and move everything to plugins, including blogging.

..My point is, That WordPress has heaps of features that may only be used by a minority, 90% of the features developers implement, they'll never use themselves. Rather than adding things that We (As Developers) think the majority will use, We focus on the small things that make certain niches of people happy, whilst not affecting the majorities.

comment:14 @Denis-de-Bernardy6 years ago

  • Keywords dev-feedback removed

I sense some irony. For what it's worth, my own users have never seen the editor (because I disabled it), and only two have inquired about it since 2005...

comment:15 follow-up: @dd326 years ago

Yes but your users are a very very small very niche minority and do not count as general WordPress users.

comment:16 in reply to: ↑ 15 @Denis-de-Bernardy6 years ago

Replying to dd32:

Yes but your users are a very very small very niche minority and do not count as general WordPress users.

They're almost exclusively users with no coding skills, i.e. hardly the minority's profile. Not to mention, WPMU users live very well without an editor. But anyway...

comment:17 @dd326 years ago

They're almost exclusively users with no coding skills

ie. Not the target of the editor.

WPMU users live very well without an editor.

Because generally, users of a WPMU blog are not entrusted to modify files, edits go via the server admin

comment:18 @azaozz6 years ago

  • Milestone 2.9 deleted
  • Resolution set to invalid
  • Status changed from new to closed

The syntax highlighter is not used since 2.8.1

Note: See TracTickets for help on using tickets.