Make WordPress Core

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's profile semicharm Owned by: andy's profile 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 17 years ago.

Download all attachments as: .zip

Change History (6)

#1 @foolswisdom
17 years ago

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

@Nazgul
17 years ago

#2 follow-up: @Nazgul
17 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)

#3 in reply to: ↑ 2 @semicharm
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!

#4 @ryan
16 years ago

  • Owner changed from anonymous to andy

#5 @Denis-de-Bernardy
15 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.