Pjax switch fail #161
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi. I got this error on a part of my website.
"Pjax switch fail: Dom doesn't look the same on new loaded page 'title' new 0, old 1"
I have checked both pages title's and they are the same. How can i fix this issue?
Please post a CodePen demonstrating the issue. If that's not feasible, please post the original HTML, the raw response from the HTTP call, and your Pjax configuration.
There is a real time web site. You can see there.
http://radyo.comu.edu.tr
Every pjax request success but in the bottom of main page there are news (HABERLER) you can see. When i click any news link in chrome console it says : "Pjax switch fail: Dom doesn't look the same on new loaded page 'title' new 0, old 1".
and there is pjax call:
var pjax = new Pjax({
elements: "a.ic-url",
selectors: ["title", "#main-content","#scripts"],
cacheBust :false,
});
There are youtube videos in news pages as iframe. May this caused that?
It looks to me that the issue is being caused since one of your selectors is for the
titletag, but the new page doesn't have such a tag.I m looking the both pages source code in chrome. Both have same tags including title tag. Even check when error occoures ajax response html. There is
Sorry my bad. There was an issue on server side catching ajax actions thats why there was no title. Thanks again