arvgta / ajaxify

Ajaxify - The Ajax Plugin
https://4nf.org/
274 stars 124 forks source link

why am i getting error [Cannot read properties of undefined (reading 'ael')] #226

Closed oubihis closed 1 year ago

oubihis commented 1 year ago

Hello @arvgta,

First i want to thank you for this plugin, my my question was why i get error Cannot read properties of undefined (reading 'ael'). in this part i don’t know what is role of 'ael'.

Screen Shot 2022-08-05 at 15 50 22

Thanks again

arvgta commented 1 year ago

Hi there,

Do you have a link to your (test) site? (I'm afraid I can't tell just like this)

oubihis commented 1 year ago

yes check here.

arvgta commented 1 year ago

Thanks. How can I reproduce the error on your site and where can I find your Ajaxify call?

oubihis commented 1 year ago

you welcome , just check console after click any link. you can find files in : ajaxify for event function

arvgta commented 1 year ago

Just as a note - your site seems to be a bit instable. There are all sorts of other error messages. However, you might want to try specifying:

in your Ajaxify call...

oubihis commented 1 year ago

what is role of intevents: false

arvgta commented 1 year ago

It disables the whole code around the ael handling

oubihis commented 1 year ago

yes, it’s working, thank you.

But is returning new error. i dont now if this normal or not.

Screen Shot 2022-08-05 at 16 46 07
arvgta commented 1 year ago

Glad we got your first issue solved. I believe what you just posted is a different bug. You might be swapping something without content or similar?

arvgta commented 1 year ago

Just had a look at the Ajaxify code - your last error is coming from the swapping of the page title...

(in the following line:)

if(title = Ay.fn("title")) qs("title").innerHTML = title.innerHTML;

oubihis commented 1 year ago

yes 👏 , i will have title tag

<title>.....</title>

arvgta commented 1 year ago

Please try specifying a title tag on all of your subpages and see, if the error goes away?

oubihis commented 1 year ago

i think 💭 problem coming from wp-rocket plugin cache, because create another title tag. so i add [0] for first title in ajaxify file.

if(title = Ay.fn("title")[0]) qs("title").innerHTML = title.innerHTML;

it is work great 👍 😊.

arvgta commented 1 year ago

Well if that fix works for you - that's fine! Good work!