Issue with the Scroll to Top button in dealstore pages
REHub - Price Comparison, Affiliate Marketing, Multi Vendor Store, Community Theme· Opened Mar 31, 2025Amit Das2 years ago
My dealstore pages have the Scroll to Top button but not showing. There are browser errors also showing as shown in the screenshot and below:
Uncaught TypeError: Cannot read properties of undefined (reading 'top') at ....
I could not find anything that caused the issue. I thought it may be Page Optimization issue but unoptimized pages also showing this error.
Please help me with that.
- Link on page with issue
- https://cbshop.in/store/sonaar-coupons/
- Igor SunzSupport Agent2 years ago
I am not sure where you got scroll to top button on store pages, because Rehub theme do not have such button on store pages. We have only on posts
Amit Das2 years ago
I have found this js file in the inspection tool of DealStore pages (uncached): /wp-content/themes/rehub-theme/js/custom_scroll.js?ver=1.4
Also this code is present in the footer: <span class="rehub_scroll" id="topcontrol" data-scrollto="#top_ankor"><i class="rhicon rhi-chevron-up"></i></span>
So, may be the topcontrol script was not excluded from loading on the deal-store pages.
Can you please how to deal with it so that the file do not load in the dealstore pages?
- Igor SunzSupport Agent2 years agothis file is conditional, it's not hard coded in theme. It's adding only if
you use sticky widget in Deal store sidebar Amit Das2 years ago
please suggest how to remove this "Also this code is present in the footer: <span class="rehub_scroll" id="topcontrol" data-scrollto="#top_ankor"><i class="rhicon rhi-chevron-up"></i></span>" from the dealstore pages. This continously throughing browser errors on these pages.
- Igor SunzSupport Agent2 years agoWhich browser errors?
Amit Das2 years ago
Uncaught TypeError: Cannot read properties of undefined (reading 'top') at ....
Screenshot attached previously.
- Igor SunzSupport Agent2 years ago
I already wrote you. This error is not possible on store pages because this file is not loaded there.
You added broken Sticky on scroll widget. Remove it and error will gone
Amit Das2 years ago
There is no Sticky on scroll widget present in the deal store pages. Only three widgets i.e. custom html, recent posts and a text widget is there.
Scroll to top button is there which is not visible but if you hover cursor you can see the button is there and also the CSS properties is present in the inspection tool.
I didn't found where from the button is loading there and why it is invisible.
- Igor SunzSupport Agent2 years agoScroll to top button don’t make js error because it doesn’t load js. Please
provide admin access Amit Das2 years ago
Replied privately
- jenni kim2 years ago
I should also check if the button is only appearing under certain conditions curve rush game online. Maybe the visibility state isn't being updated correctly based on the scroll position.
- Igor SunzSupport Agent2 years ago
there is no js error on this page
https://cbshop.in/store/sonaar-coupons/
please share link with error