Anchor link not working with cannot read property closest of undefined

Hi,
Not sure what is happening here, I’m getting an error when I set up a anchor link to the same page. The url and id are put in properly and I have the latest version of cornerstone and the theme. I am trying to link the primary button on this page to the contact section:

x.js?ver=7.1.2:1 Uncaught TypeError: Cannot read property 'closest' of undefined
at Object.<anonymous> (x.js?ver=7.1.2:1)
at cs.0ce70e6.js:1
at Array.forEach (<anonymous>)
at Object.apply (cs.0ce70e6.js:1)
at before (cs.0ce70e6.js:145)
at HTMLBodyElement.<anonymous> (cs.0ce70e6.js:145)

Hello Michael,

Thanks for writing in! It seems that you are using an older version of the X theme. Could you please update to the latest versions? Our latest versions are:

  • X theme 7.2.3
  • Cornerstone 4.2.3
  • WP core 5.3.2 or higher
  • PHP 7.2 or higher

This latest release contains fixes for several issues so be sure to check out the changelog:

After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Please let us know how it goes.

Wow I thought I had everything updated but I guess I didn’t. Thanks, it’s fixed now!

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.