debug_kit
debug_kit copied to clipboard
debugkit toolbar error when include turbolinks in the header
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
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.
@markstory Is there anything we should do for this or leave it as a user land issue?
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.
Is this still valid?
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.