WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 3 weeks ago

#38409 closed defect (bug) (fixed)

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

Reported by: feedmymedia Owned by: 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 6 months ago.
38409.1.diff (5.7 KB) - added by westonruter 6 months ago.
38409.2.diff (6.0 KB) - added by westonruter 6 months ago.
https://github.com/xwp/wordpress-develop/commit/13e4b19ae58074b9bca4959a7892d0ec5c13a9ad
38409.3.diff (1.6 KB) - added by mattwiebe 3 weeks ago.

Download all attachments as: .zip

Change History (22)

#1 @westonruter
6 months 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.


6 months ago

@westonruter
6 months ago

#4 @westonruter
6 months ago

  • Keywords has-patch added; needs-patch removed

@westonruter
6 months ago

#5 follow-up: @westonruter
6 months ago

  • Keywords needs-testing added

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

#6 in reply to: ↑ 5 @feedmymedia
6 months 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
6 months 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.


6 months ago

#9 @westonruter
6 months 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
6 months 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
6 months ago

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

#12 @westonruter
6 months 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
5 weeks 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
5 weeks 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
3 weeks 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
3 weeks ago

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


3 weeks ago

#17 @westonruter
3 weeks 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
3 weeks 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.