Scroll to section issue

Hi,
I have an issue in my site when user try to click a link to scroll him to a section https://drive.google.com/a/objects.ws/file/d/1xzHUNTCT5lMwlVp-rOmackTNUMhI2vEk/view?usp=drivesdk a javascript issue happens inside the theme js file prevent the scroll

TypeError: t.$anchor is undefined

Hello @twelve25,

Thanks for writing in!

Please be advised that the ID for example, listings-section, should be added to the section and not to the row element.

With this setup, it is much better to use #-x-section-5 in your link.

Meanwhile, the JS error is because you are using an older version of the X theme. X Theme 7.2.3 is now available in automatic updates! This release contains fixes for several issues, like you have mentioned above, so be sure to check out the changelog (https://theme.co/changelog/). Please do update to the latest version. After doing the updates, always remember to clear all caches when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

We would love to know if this has worked for you. Thank you.

Hello @ruenel
Thanks for your reply, we have changed the first block to link to the section ID https://drive.google.com/file/d/1PA8mphySOJduID_aaQJREXB5apXNhi7j/view?usp=drivesdk but the issue still exist, can you advice please

We fixed the issue for now by commenting this line
var e = t.$anchor.closest("[data-x-toggleable]");
in the file themes/x/framework/dist/js/site/x.js

But on dev server issue not occur https://dev3.twelve25.ca/mightyoak/
can you advice please? is this due to an option in the theme or what?

Hello @twelve25,

When I click the links, I do not have any JS error in the console. I also found out that you still add the element ID in the row element. Please make sure that the anchored links were linked to the section which is why it is important that you add the ID in the section and not in the rows or columns.

Hope this helps.

Hi,
I am having more or less the same issue and i don’t know how to fix it.
I would like to link an icon button in my header to the contact form which is located at the end of my homepage.
I have added the ID “contact” to the section containing my contact form (using “customize” in the inspector part)
Then in my header, i have added the link http://new2020.jeremybury.fr/#contact to the icon (actually, it’s a “social” icon). It doesn’t work.
Actually, even if i launch directly the URL http://new2020.jeremybury.fr/#contact, it doesn’t display the contact form section. It just displays the homepage.
Thanks for our help!

Just to tell you that i have founded the solution!
The ID was “Contact”… I have just changed it to “contact” and it works perfectly! :+1:

Hey Jeremy,

Thanks for updating this thread. It is good to know that you have figured out a way to resolve your issue already. If you need anything else we can help you with, don’t hesitate to open another thread.

Best Regards.

1 Like

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