Ticket #2829 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Tabbed Editing

Reported by: skeltoac Assigned to: skeltoac
Priority: normal Milestone: 2.1
Component: Administration Version: 2.1
Severity: normal Keywords: rte quicktags has-patch needs-testing
Cc:

Description

How about a way to go between TinyMCE and Quicktags without reloading?

Attachments

tabbed-editing.diff (7.8 kB) - added by skeltoac on 06/16/06 10:54:52.
tabbed-editor.png (20.0 kB) - added by skeltoac on 09/22/06 02:34:01.
tabbed-editor.diff (20.1 kB) - added by skeltoac on 09/22/06 04:39:54.
2829fix.diff (0.6 kB) - added by westi on 09/22/06 16:34:04.
And use the correct filename in the check!
tabfixes.diff (3.6 kB) - added by skeltoac on 09/22/06 22:19:54.
clean up, remove comment rte, fix shrinkage due to missing cookie

Change History

06/16/06 10:54:52 changed by skeltoac

  • attachment tabbed-editing.diff added.

06/16/06 10:57:59 changed by skeltoac

  • keywords changed from wysiwyg quicktags to wysiwyg quicktags has-patch needs-testing.
  • owner changed from anonymous to skeltoac.
  • status changed from new to assigned.

It wasn't as hard as I'd expected. The patch tabbed-editing.diff works quite nicely for me. It needs testing with more complex markup but the basics are working.

Todo: better UI

08/30/06 10:57:08 changed by markjaquith

  • keywords changed from wysiwyg quicktags has-patch needs-testing to wysiwyg quicktags needs-patch needs-testing.

Patch doesn't apply cleanly anymore...

09/22/06 01:54:40 changed by skeltoac

  • keywords changed from wysiwyg quicktags needs-patch needs-testing to wysiwyg quicktags has-patch needs-testing.

new diff against rev 4205

improved UI. works in FF, IE, O9.

09/22/06 02:34:01 changed by skeltoac

  • attachment tabbed-editor.png added.

09/22/06 04:16:31 changed by wnicholls

Gets my vote.

On the basis that if you don't ask for the moon, you'll never get it .. how about adding one more tab, ie

_/Compose\_/HTML\_/Metadata\__

Where 'metadata' means - excerpt, trackbacks, custom fields .. or go the whole hog and put categories et al as tabs too (No maybe not, see below)

I am constantly annoyed by having to scroll down past the trackbacks and customer fields to get to the preview at the bottom.

As as putting categories, post slug, parent page etc behind a tab - that's a bit of a can of worms . Sounds like something for a plugin, along the lines of WP-Dash.

09/22/06 04:39:54 changed by skeltoac

  • attachment tabbed-editor.diff added.

09/22/06 07:04:47 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [4206]) Tabbed editor from skeltoac. fixes #2829

09/22/06 15:16:05 changed by zamoose

  • status changed from closed to reopened.
  • resolution deleted.

It appears as if this works under IE but NOT under Firefox or Opera (or Flock, for that matter). I've tried FF on Linux, OS X and Windows and can unequivocally say that nothing happens - the quicktags aren't loaded, nor is tinyMCE, nor are any tabs.

Further, the following error messages are logged to FF's JS console:

{{{ Error: Unknown property 'zoom'. Declaration dropped. Source File: http://blogs.zamoose.org/wordpress1.6/wp-admin/wp-admin.css?version=2.1-alpha3 Line: 711

Error: Unknown property '-khtml-opacity'. Declaration dropped. Source File: http://blogs.zamoose.org/wordpress1.6/wp-admin/wp-admin.css?version=2.1-alpha3 Line: 1108

Error: Unknown property 'filter'. Declaration dropped. Source File: http://blogs.zamoose.org/wordpress1.6/wp-admin/wp-admin.css?version=2.1-alpha3 Line: 1109

Error: tinyMCE is not defined Source File: http://blogs.zamoose.org/wordpress1.6/wp-includes/js/tinymce/tiny_mce_config.php?ver=09212006 Line: 36

Error: tinyMCE is not defined Source File: http://blogs.zamoose.org/wordpress1.6/wp-admin/post-new.php Line: 225

Error: Unknown property 'filter'. Declaration dropped. Source File: http://blogs.zamoose.org/wordpress1.6/wp-admin/inline-uploading.php?post=-1158937830&action=upload Line: 291

Error: tinyMCE is not defined Source File: http://blogs.zamoose.org/wordpress1.6/wp-includes/js/autosave.js.php?ver=4206 Line: 73 }}}

The CSS errors are safe to ignore, methinks - those are just properties that FF doesn't parse correctly. However, the "tinyMCE is not defined" error is what's got me thinking something ain't stirring the Kool Aid.

09/22/06 15:20:13 changed by zamoose

Three more notes, just so we're clear here:

1. IE DOES work - the expected tabs are displayed.

2. I disabled just about every plugin that does anything to the Write screen (UTW, etc.). No effect.

3. Safari works as expected - it falls back to the quicktags since KHTML's JS handling is still wonky (come on, Apple! Make it work correctly - GMail, Writely and WordPress users alike will love you for it!).

09/22/06 15:29:10 changed by skeltoac

zamoose, naturally we tested it in FF and O9 as well as IE. So, you're going to have to provide more information to help track down your issue.

What steps have you taken to resolve the issue: reload, forced reload, clear cache, different computer, svn di, new checkout?

09/22/06 15:39:52 changed by zamoose

I'm afraid I'm not sure what svn di does, but this badboy was svn up'd as of 4208. I have encountered this issue, as I said, on three different OSes, two of which I did Shift-reloads (I'll clear their caches and try again). However, my FF-on-Windows test was using a new XP roaming profile that hadn't EVER been used to hit the site, so it had to be coming in cleanly.

I just cleared the cache on my MBP and tried a shift-reload under FF - still no joy in Mudville. Half of my testing environment is running behind a Squid proxy, but the MBP isn't, so there's nothing getting cached by a third party cache in between the server and my browsers.

And, as I stated before, it works under IE on a Windows box (which is using said proxy server) so I don't think it's a problem with my checkout.

09/22/06 15:46:25 changed by ryan

When we've seen that tinyMCE not defined error in the past it was due to gzip compression settings. I wonder if that's at play here.

09/22/06 16:00:32 changed by intoxination

I have reported the gzip error on 3144. The problem is that TinyMCE is not recognizing the option to enable/disable gzip output (from reading->options). If you are on a server without gzip installed, then this causes TinyMCE not to load.

09/22/06 16:30:58 changed by westi

I had trouble getting this to work too.

It turned out that the call to file_get_contents in tiny_mce_gzip.php on line 39 was throwing an error which then ended up in the returned js which stopped both the quicktags and the wyswig editor loading correctly.

<b>Warning</b>: file_get_contents(.../wp-includes/js/tinymce/plugins/inlinepopups/langs/en.js) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in <b>.../wp-includes/js/tinymce/tiny_mce_gzip.php</b> on line <b>39</b><br />

Attaching a patch to fix this issue

09/22/06 16:34:04 changed by westi

  • attachment 2829fix.diff added.

And use the correct filename in the check!

09/22/06 16:37:00 changed by zamoose

I didn't think it was a gzip issue - I have gzip disabled on my test blog AND the whole thing works in IE, so it's not a server-side thing as far as I can tell.

I think westi probably has it correct - IE ignores the warning but FF is straight-ahead enough about the JS syntax that it refuses to load incorrectly-written script.

09/22/06 16:53:16 changed by zamoose

Hmmm, hand-applied the fix - still no joy in Operaland nor Firefox City. FF JS console is still reporting the same errors.

09/22/06 17:09:40 changed by zamoose

Small thought here:

I note that my <head> contains the following two lines:

<script type='text/javascript' src='http://blogs.zamoose.org/wordpress1.6/wp-includes/js/tinymce/tiny_mce_gzip.php?ver=09212006'></script> <script type='text/javascript' src='http://blogs.zamoose.org/wordpress1.6/wp-includes/js/tinymce/tiny_mce_config.php?ver=09212006'></script>

in that order. Might FF be flaking out because tiny_mce_gzip.php is being called prior to tiny_mce_config.php in the header?

09/22/06 18:53:59 changed by skeltoac

Thanks for posting the urls. Now click the first one. It's blank. Check your PHP error logs.

09/22/06 19:00:52 changed by foolswisdom

  • keywords changed from wysiwyg quicktags has-patch needs-testing to rte quicktags has-patch needs-testing.
  • priority changed from normal to high.
  • component changed from Administration to General.

09/22/06 19:17:00 changed by zamoose

Ohhhhkay, then why does it show up under IE, I wonder? If I hit that link with IE, it returns a .php with the expected info in it.

Although it does prompt me to download it instead of just executing it server-side. Hmmmm.

As to "php error logs", I'm assuming you mean apache's error.log. This, unfortunately, has lots of "robots.txt not found" errors but zilch about errors in php.

09/22/06 19:21:06 changed by skeltoac

I removed gzip,deflate from my Accept-Encoding request headers and got the js as expected. So it's a gzip problem.

09/22/06 19:27:50 changed by zamoose

Okay. Suggested resolution, then? I have the gzip option disabled under Options->Reading, always have (it seems to take Dreamhost's servers twice as long to process gzip requests, for some reason). Do you think this is ocurring because FF is requesting a gzipped version while IE isn't?

09/22/06 19:36:26 changed by ryan

  • priority changed from high to normal.
  • component changed from General to Administration.

09/22/06 19:41:37 changed by zamoose

  • priority changed from normal to high.
  • component changed from Administration to General.

Okay, Andy's spot-on. If I delete "gzip,deflate" from network.http.accept-encoding (hooray for about:config), then Firefox willingly displays the file. When I put it back, it goes back to a blank display. Obviously I'd like to keep gzip requests on to reduce my browse times, so what's the long-term solution?

09/22/06 19:42:27 changed by zamoose

  • priority changed from high to normal.
  • component changed from General to Administration.

Bollocks. Tagging went kablooie on that last comment. This is to fix it.

09/22/06 22:19:54 changed by skeltoac

  • attachment tabfixes.diff added.

clean up, remove comment rte, fix shrinkage due to missing cookie

09/22/06 22:25:08 changed by ryan

09/22/06 22:47:38 changed by zamoose

Might 3144 be applicable here? tMCE isn't verifying whether you've asked WP to disable gzip support...

09/22/06 22:49:24 changed by zamoose

Although I do think figuring out why gzip is breaking tMCE is important, so maybe we shouldn't just punt (although the patch attached to 3144 looks like it'd do the trick).

09/24/06 02:28:43 changed by activeingredient

Andy: why in tabfixes.diff did you remove the RTE in comment.php?? Your tabbed editing works great (in FF and IE) everwhere except in editing comments. It leaves a js error in IE ('tinyMCE undefined').

09/24/06 08:07:41 changed by zamoose

The very simple patch in 3144 works for me. I'm going to try enabling gzip compression in the blog options to see what happens.

...And et voila'', everything's happy after applying that fix. The tabbed view works no matter whether gzip is enabled or not.

09/25/06 05:03:51 changed by foolswisdom

  • status changed from reopened to closed.
  • resolution set to fixed.

Closing bug as FIXED.

Based on update by zamoose, remaining issue is independent of tabbed TinyMCE and Quicktags and desc in #3144.