Open Yuriy-Svetlov opened 7 years ago
I have same Error
Uncaught TypeError: Cannot read property '0' of null at extractContainer (pjax.js:671) at n.fn.init.options.success (pjax.js:262) at i (jquery-1.12.4.min.js:2) at Object.fireWith [as resolveWith] (jquery-1.12.4.min.js:2) at y (jquery-1.12.4.min.js:4) at XMLHttpRequest.c (jquery-1.12.4.min.js:4)
I have a pjax response which contains a string containing '\<html>' in a javascript error message. This makes pjax to fail with the same error because pjax is looking for a \<html> tag and then later for body(Line 672) which is not there in my case leading to the error. So maybe its a good idea to include a parameter telling pjax if the response will be a full html document or only a subset and then skip this auto detection.
if i use WordPress, that i get error - wordpress jquery-pjax (jquery.pjax.js:672) if i use on yii2 or .html static websites that they working is good
$body = undefined in the code
$body = $(parseHTML(data.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]))
jquery-3.2.1.min.js
log errors
$(document).pjax('a', '#pjax-container', {fragment: '#pjax-container', container:'#pjax-container', timeout: 30000, push: true});