Opened 17 years ago
Closed 15 years ago
#4586 closed defect (bug) (fixed)
Send to Editor doesn't work when WordPress is loaded in a frame.
Reported by: | semicharm | Owned by: | andy |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 2.2 |
Component: | Administration | Keywords: | frames SendToEditor has-patch |
Focuses: | Cc: |
Description
I'd setup a WordPress blog that loads into a frame of a larger site. After several hours of troubleshooting javascript errors caused by the Send to Editor button used for adding uploaded images to a post, I found this simple error and corrected the issue.
In wp-admin/upload.js: line 248
win = top;
should read
win = parent;
It really wants the parent frame and should reference it directly instead of the top most frame, because it's wrong to assume that top will always be the parent.
The same also appears in wp-admin/inline-uploading.php: line 428
if (!win) win = top;
should read
if (!win) win = parent;
and should be changed for the same reason.
Note: I only set it to minor because I don't think many use WordPress in a frame or have host that use frames for forwarding.
Attachments (1)
Change History (6)
#3
in reply to:
↑ 2
@
17 years ago
Replying to Nazgul:
Also, the second part of this ticket is confusing. The version is set to 2.2, but the referenced inline-uploading.php was renamed to upload.php ages ago and the referenced code is also no longer present in there (since r4274 to be precise)
Sorry Nazgul, I installed over a previous version and wasn't aware of the changes. And thanks for making the patch!
Added an actual patch. (@Foolswisdom: did you forget to attach yours?)
Also, the second part of this ticket is confusing. The version is set to 2.2, but the referenced inline-uploading.php was renamed to upload.php ages ago and the referenced code is also no longer present in there (since r4274 to be precise)