debug_kit icon indicating copy to clipboard operation
debug_kit copied to clipboard

debugkit toolbar error when include turbolinks in the header

Open r0kawa opened this issue 4 years ago • 3 comments

VM375 toolbar.js:71 Uncaught TypeError: Cannot read property 'postMessage' of null at XMLHttpRequest.<anonymous> (VM375 toolbar.js:71) (anonymous) @ VM375 toolbar.js:71

[full errror here] (https://gist.github.com/r0kawa/e8bc2cdf76a91c4df5463851814cbd08)

The error not happened when first loaded the page, but when navigating to different page and come back to main page, it happened.

The error gone when I make cakephp debug to off. No turbolinks code embed yet, just attach the javascript to the header.

CakePHP version 4.0.6

r0kawa avatar Apr 27 '20 03:04 r0kawa

Looks like something wrong with DebugKit AJAX proxy setup. Callstack has 5 consecutive window.XMLHttpRequest.send @ VM375 toolbar.js:91, it probably setups additional XMLHttpRequest.send proxy level when navigating to different page.

DebugKit has support for Turbolinks (https://github.com/cakephp/debug_kit/pull/664), but it might be incomplete/broken.

garas avatar Apr 27 '20 10:04 garas

@markstory Is there anything we should do for this or leave it as a user land issue?

othercorey avatar Oct 16 '21 23:10 othercorey

I don't have enough context on how to use turbolinks to reproduce, so it is going to require someone who cares enough about this problem to get fixed.

markstory avatar Oct 17 '21 04:10 markstory

Is this still valid?

LordSimal avatar Jan 14 '23 07:01 LordSimal

I haven't tested any Turbolink functionality with the JS refactor in 4.9.0 but it seems that no one really mentioned anything about Turbolink in these 9 months since release...

Also Turbolink seems to be dead/replaced anyways so I will close this and provide a PR to remove the Turbolink support.

LordSimal avatar May 09 '23 18:05 LordSimal