Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#38409 closed defect (bug) (fixed)

Customize: Failed to execute 'postMessage' on 'DOMWindow'

Reported by: feedmymedia's profile feedmymedia Owned by: westonruter's profile westonruter
Milestone: 4.7 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch needs-testing
Focuses: Cc:

Description

Guys, I'm receiving this message in my console when I try to use Customizer:

customize-base.js?ver=4.7-alpha-38178-src:753

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://tests.mamp') does not match the recipient window's origin ('http://tests.mamp:8888').

As you can see, I'm running a localhost with a specific port. I can change the port for this test if this issue happens only for me.

I downloaded from the master branch few minutes ago: git://develop.git.wordpress.org/

Thank you! And sorry if this issue is not appropriated here.

Screenshot:
https://cloud.githubusercontent.com/assets/804109/19532402/4e85c604-961a-11e6-9cb4-e70082e80c25.png

Attachments (4)

38409.0.diff (560 bytes) - added by westonruter 8 years ago.
38409.1.diff (5.7 KB) - added by westonruter 8 years ago.
38409.2.diff (6.0 KB) - added by westonruter 8 years ago.
https://github.com/xwp/wordpress-develop/commit/13e4b19ae58074b9bca4959a7892d0ec5c13a9ad
38409.3.diff (1.6 KB) - added by mattwiebe 8 years ago.

Download all attachments as: .zip

Change History (22)

#1 @westonruter
8 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.7
  • Owner set to westonruter
  • Status changed from new to accepted

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


8 years ago

@westonruter
8 years ago

#4 @westonruter
8 years ago

  • Keywords has-patch added; needs-patch removed

@westonruter
8 years ago

#5 follow-up: @westonruter
8 years ago

  • Keywords needs-testing added

@feedmymedia @mh-themes would you please give 38409.1.diff a try?

#6 in reply to: ↑ 5 @feedmymedia
8 years ago

@westonruter it's working perfect now: postMessage and XWP new feature (Additional CSS). Thank you!

Replying to westonruter:

@feedmymedia @mh-themes would you please give 38409.1.diff a try?

#7 @MH Themes
8 years ago

@westonruter Has this been committed to trunk yet? We've tested the changes but for us the issue still remains, but maybe it's a mistake on our end. We'll test again as soon as it's committed to trunk and report back.

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


8 years ago

#9 @westonruter
8 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 38890:

Customize: Harden url matching to account for varying ports and ensuring matching base pathname for allowed urls

Fixes #38409.

#10 @westonruter
8 years ago

@MH-Themes No, it wasn't committed yet. I was providing a patch to test with. But it is now committed in r38890.

#11 @MH Themes
8 years ago

@westonruter Thanks a lot, just tested the latest version in trunk and the issue is fixed.

#12 @westonruter
8 years ago

In 38926:

Customize: Fix logic inversion in determining whether a URL is previewable which prevented previewing anything but homepage.

Fixes regression introduced in [38890].

See #38409.
Fixes #38492.

#13 @westonruter
8 years ago

In 40318:

Customize: Fix navigation of site in preview on IE11.

Addresses issue in IE11 where the default port number of :80 is unexpectedly included on link.host for links dynamically created by scripts.

Props westonruter, afercia for testing.
See #38409.
Fixes #40198.

#14 @swissspidy
8 years ago

In 40335:

Customize: Fix navigation of site in preview on IE11.

Addresses issue in IE11 where the default port number of :80 is unexpectedly included on link.host for links dynamically created by scripts.

Props westonruter, afercia for testing.
See #38409.
Fixes #40198.

Merges [40318] to the 4.7 branch.

#15 @mattwiebe
8 years ago

Found another "fun" bug related to this in IE11 for https sites: the :443 port also gets spuriously added, causing the postMessage bridge to fail.

Patch incoming, can move this to a new issue if needed, but this is where the work for port 80 was already done.

@mattwiebe
8 years ago

This ticket was mentioned in Slack in #core-customize by mattwiebe. View the logs.


8 years ago

#17 @westonruter
8 years ago

In 40381:

Customize: Fix HTTPS navigation of site in preview on IE11.

Accounts for HTTPS links (port 443) where [40318] only accounted for HTTP links (port 80). Addresses issue in IE11 where the default port number is unexpectedly included on link.host for links dynamically created by scripts.

Props mattwiebe.
Amends [40318], [38890].
See #38409.
Fixes #40198.

#18 @swissspidy
8 years ago

In 40386:

Customize: Fix HTTPS navigation of site in preview on IE11.

Accounts for HTTPS links (port 443) where [40318] only accounted for HTTP links (port 80). Addresses issue in IE11 where the default port number is unexpectedly included on link.host for links dynamically created by scripts.

Props mattwiebe.
Amends [40318], [38890].
See #38409.
Fixes #40198.

Merges [40381] to the 4.7 branch.

Note: See TracTickets for help on using tickets.