WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 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)

4586.diff (484 bytes) - added by Nazgul 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 foolswisdom7 years ago

  • Keywords has-patch added
  • Milestone set to 2.3 (trunk)

Nazgul7 years ago

comment:2 follow-up: Nazgul7 years ago

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)

comment:3 in reply to: ↑ 2 semicharm7 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!

comment:4 ryan6 years ago

  • Owner changed from anonymous to andy

comment:5 Denis-de-Bernardy5 years ago

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

fixed a while ago

Note: See TracTickets for help on using tickets.