Opened 6 years ago

Closed 4 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
Priority: normal Milestone:
Component: Administration Version: 2.2
Severity: minor Keywords: frames SendToEditor has-patch
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 6 years ago.

Download all attachments as: .zip

Change History (6)

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

Nazgul6 years ago

comment:2 follow-up: ↓ 3   Nazgul6 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   semicharm6 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   ryan5 years ago

  • Owner changed from anonymous to andy
  • 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.