Opened 13 years ago
Closed 13 years ago
#21145 closed defect (bug) (fixed)
Switch from HTML to VISUAL mode - does not show anything in Visual mode
Reported by: | selnomeria | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.4.2 | Priority: | normal |
Severity: | major | Version: | 3.4 |
Component: | Editor | Keywords: | |
Focuses: | Cc: |
Description
why it hasn't been fixed yet?
when i insert a bunch of codes in html mode(for example, many of these codes:
<href... <iframe... and etc..
and switch to VISUAL MODE, and then to HTML again, all of the codes and formatting are lost!
Attachments (2)
Change History (13)
#1
follow-up:
↓ 3
@
13 years ago
- Cc 7645314@… added
- Severity changed from normal to major
- Version changed from 3.4 to 3.4.1
#2
@
13 years ago
- Summary changed from Switch from HTML to VISUAL mode to Switch from HTML to VISUAL mode - does not show anything in Visual mode
#3
in reply to:
↑ 1
@
13 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.5
- Version changed from 3.4.1 to 3.4
Version number indicates when the bug was initially introduced/reported.
I could not reproduce the original bug from the description. This content is preserved when switching from Visual to HTML (Text) mode:
<iframe src="http://trunk.wordpress/" width="320" height="240"></iframe>
<href>
is not a valid tag, so I've excluded it from the test.
Replying to mati1000:
Uncaught TypeError: Cannot read property '0' of null /wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js?ver=349-20805:1 Char: 2392
The error corresponds to line 145, introduced in [19982]:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin_src.js#L144
I can only reproduce this if I manually remove the id
attribute from the [caption]
shortcode. It should be there by default. If it's not in your case, your theme or some plugin might interfere with captions.
We should probably check if match()
was successful though (21145.patch), since the errors due to missing attributes also cause both editors to be rendered at the same time (21145.overlapping.png).
#4
@
13 years ago
The patch looks good. Not sure what would be the best thing to do when the caption shortcode is invalid. Perhaps it should be shown as-is (a text string) instead of being parsed.
#6
@
13 years ago
- Keywords has-patch removed
- Milestone 3.5 deleted
- Resolution set to invalid
- Status changed from new to closed
Cannot reproduce the originally reported problem either. Since the browser parses the string from the Text editor (the textarea) into a HTML document, invalid/custom tags are only supported if registered in TinyMCE.
Closing as invalid for now, feel free to reopen with a valid example that can be reproduced.
#7
@
13 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Hi,
Our HTML example is:
[caption align="alignleft" width="500"]<img class="alignleft size-thumbnail wp-image-41536" src="http://core.trac.wordpress.org/raw-attachment/ticket/21145/21145.overlapping.png" alt="" width="500" height="72" /> Ticket #21145: 21145.overlapping.png[/caption]
and SergeyBiryukov is right, because the missing id
attribute - the match
is failed. In addition, I get both editors that are rendered at the same time - like in the 21145.overlapping.png.
And of course, after define the SCRIPT_DEBUG
and applying the patch its works!
I don't know why we don't have the id
in the shortcode, but we have a lot of posts with captions without id
s, and we cannot now upgrade to the last version.
We have upgraded to the latest version 3.4.1 and we have the same problem.
Posts that contain [caption] shortcode does not show anything in Visual mode.
with js error: Uncaught TypeError: Cannot read property '0' of null /wp-includes/js/tinymce/plugins/wpeditimage/editor_plugin.js?ver=349-20805:1 Char: 2392