Home › Forums › Weaver Xtreme Theme › JavaScript won’t work in Weaver Xtreme but will work in other theme
- This topic has 11 replies, 2 voices, and was last updated 3 years ago by
Maureen.
-
AuthorPosts
-
May 9, 2020 at 00:10 UTC - Views: 45 #64473
Maureen
ParticipantHi Everyone!
New website using Weaver Xtreme and Elementor for a local Chamber of Commerce: https://barringtonchamber.com/welcome-new-members/
Chamber Master is a third-party soft-ware that helps chambers maintain and organize their member listings. I used them to create a rolling scroll of new members—something that was on the previous website.
I dropped the html into an Elementor html widget and it did not work with Weaver X. I also dropped it into the Text edit window in WP and it did not work. I then switched back to the original theme, Dynamik Website Builder powered by Genesis Framework, and the scroll worked. I switched back to Weaver X and the scroll stopped.
I then deactivated all the plugins, but there still was no scroll.
Here is what the scroll should look like:
And here is the html:
<script type=”text/javascript”>
/*<![CDATA[*/
var _mniwq=_mniwq||[];
_mniwq.push([“1588697260168.type”,”business_new”],[“1588697260168.display”,”text”],[“1588697260168.limit”,20],[“1588697260168.marquee”,true],[“1588697260168.scrollFreq”,35],[“1588697260168.daysBack”,360],[“1588697260168.showLinks”,true],[“1588697260168.popUp”,true],[“1588697260168.styleTemplate”,”#@id .mn-scroll-container{font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:130%;margin:8px;position:relative;height:205px;overflow:hidden}#@id .mn-scroll-item{-moz-border-radius:0;-webkit-border-radius:0;background-clip:padding-box;background-color:#2C5889;border-radius:0;color:#FFFFFF;margin:0 0 4px;position:relative}#@id .mn-scroll-item:hover{background-color:#3970AC;color:#FFFFFF}#@id .mn-scroll-name,#@id .mn-scroll-teaser{display:block;padding:5px 3px 5px 3px;position:relative}#@id .mn-scroll-link{color:inherit;text-decoration:none}#@id .mn-scroll-link:hover{text-decoration:underline}#@id .mn-scroll-slider{position:absolute;width:100%}”],[“1588697260168.create”,”mni-widgets-1588697260168″]);
(function(b,d,a,c){b.getElementById(d)||(c=b.getElementsByTagName(a)[0],a=b.createElement(a),a.type=”text/javascript”,a.async=!0,a.src=”https://business.barringtonchamber.com/Content/Script/Widgets.js”,c.parentNode.insertBefore(a,c))})(document,”mni-widgets-script”,”script”);
/*]]>*/
</script>Thanks!!
May 9, 2020 at 01:33 UTC - Views: 40 #64474scrambler
ModeratorDid you check the Option Allow Raw HTML and script on the page?
There may also be some syntax issue related to Xtreme, but @weaver would have top comment on that
May 9, 2020 at 01:46 UTC - Views: 38 #64475Maureen
ParticipantThanks Scrambler. I just checked the Allow Raw html option, but still no luck
May 9, 2020 at 01:50 UTC - Views: 59 #64476Maureen
ParticipantHere is the actual html again. Some gobbledygook was picked up when I pasted it above.
<!– Created with Elementor –>
<script type=”text/javascript”>
/*<![CDATA[*/ var _mniwq=_mniwq||[]; _mniwq.push([“1588696632633.type”,”business_new”],[“1588696632633.display”,”text”],[“1588696632633.marquee”,true],[“1588696632633.scrollFreq”,35],[“1588696632633.daysBack”,30],[“1588696632633.showLinks”,true],[“1588696632633.popUp”,false],[“1588696632633.styleTemplate”,”#@id .mn-scroll-container{font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:130%;margin:8px;position:relative;height:205px;overflow:hidden}#@id .mn-scroll-item{-moz-border-radius:0;-webkit-border-radius:0;background-clip:padding-box;background-color:#2C5889;border-radius:0;color:#FFFFFF;margin:0 0 4px;position:relative}#@id .mn-scroll-item:hover{background-color:#3970AC;color:#FFFFFF}#@id .mn-scroll-name,#@id .mn-scroll-teaser{display:block;padding:5px 3px 5px 3px;position:relative}#@id .mn-scroll-link{color:inherit;text-decoration:none}#@id .mn-scroll-link:hover{text-decoration:underline}#@id .mn-scroll-slider{position:absolute;width:100%}”],[“1588696632633.create”,”mni-widgets-1588696632633″]); (function(b,d,a,c){b.getElementById(d)||(c=b.getElementsByTagName(a)[0],a=b.createElement(a),a.type=”text/javascript”,a.async=!0,a.src=”https://business.barringtonchamber.com/Content/Script/Widgets.js”,c.parentNode.insertBefore(a,c))})(document,”mni-widgets-script”,”script”); /*]]>*/
</script>May 9, 2020 at 03:10 UTC - Views: 34 #64478scrambler
ModeratorTo paste html or js in the forum, you need to select the text and use the preformatted format option
May 9, 2020 at 16:43 UTC - Views: 52 #64480Maureen
Participant<br data-rich-text-line-break="true" />/*<![CDATA[*/ var _mniwq=_mniwq||[]; _mniwq.push(["1588989269034.type","business_new"],["1588989269034.display","text"],["1588989269034.limit",20],["1588989269034.marquee",true],["1588989269034.scrollFreq",35],["1588989269034.daysBack",90],["1588989269034.showLinks",true],["1588989269034.popUp",true],["1588989269034.styleTemplate","#@id .mn-scroll-container{font-family:Arial, Helvetica, sans-serif;font-size:14px;line-height:130%;margin:8px;position:relative;height:205px;overflow:hidden}#@id .mn-scroll-item{-moz-border-radius:0;-webkit-border-radius:0;background-clip:padding-box;background-color:#2C5889;border-radius:0;color:#FFFFFF;margin:0 0 4px;position:relative}#@id .mn-scroll-item:hover{background-color:#3970AC;color:#FFFFFF}#@id .mn-scroll-name,#@id .mn-scroll-teaser{display:block;padding:5px 3px 5px 3px;position:relative}#@id .mn-scroll-link{color:inherit;text-decoration:none}#@id .mn-scroll-link:hover{text-decoration:underline}#@id .mn-scroll-slider{position:absolute;width:100%}"],["1588989269034.create","mni-widgets-1588989269034"]); (function(b,d,a,c){b.getElementById(d)||(c=b.getElementsByTagName(a)[0],a=b.createElement(a),a.type="text/javascript",a.async=!0,a.src="https://business.barringtonchamber.com/Content/Script/Widgets.js",c.parentNode.insertBefore(a,c))})(document,"mni-widgets-script","script"); /*]]>*/
May 9, 2020 at 17:33 UTC - Views: 39 #64481scrambler
ModeratorThere are a lot of errors showing up in the Web Browser console, which may indicate that something else is being broken, and that could have an effect on the script
Go though the error and see if they give you and indication
jquery-migrate.min.js?ver=1.4.1:2 JQMIGRATE: Migrate is installed, version 1.4.1
(index):1 A cookie associated with a cross-site resource at http://google.com/ was set without theSameSite
attribute. A future release of Microsoft Edge will only deliver cookies with cross-site requests if they are set withSameSite=None
andSecure
. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
(index):1 A cookie associated with a cross-site resource at https://www.google.com/ was set without theSameSite
attribute. A future release of Microsoft Edge will only deliver cookies with cross-site requests if they are set withSameSite=None
andSecure
. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
16Tracking Prevention blocked access to storage for <URL>.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/recaptcha__en.js.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/recaptcha__en.js.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/styles__ltr.css.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/styles__ltr.css.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/recaptcha__en.js.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/recaptcha__en.js.
(index):1 Tracking Prevention blocked access to storage for https://www.google.com/.
(index):1 Tracking Prevention blocked access to storage for https://www.google.com/js/bg/BH5-EzULdXEbjM5N3xoUppNyl7SQTgG7b3UrQv9YUg0.js.
(index):1 Tracking Prevention blocked access to storage for https://www.google.com/js/bg/BH5-EzULdXEbjM5N3xoUppNyl7SQTgG7b3UrQv9YUg0.js.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/api2/logo_48.png.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/api2/logo_48.png.
(index):1 Tracking Prevention blocked access to storage for https://www.google.com/.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/recaptcha__en.js.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/recaptcha__en.js.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/styles__ltr.css.
(index):1 Tracking Prevention blocked access to storage for https://www.gstatic.com/recaptcha/releases/-wV2EAWEOTlEtZh4vNQtn3H1/styles__ltr.css.
business_new:1 Failed to load resource: the server responded with a status of 404 ()
DevTools failed to load SourceMap: Could not load content for https://barringtonchamber.com/wp-content/plugins/elementor/assets/lib/swiper/swiper.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILUREAlso, Is the script needed in a single page or the whole site.
May 9, 2020 at 18:03 UTC - Views: 23 #64482Maureen
ParticipantThanks Scrambler. The script is need on one page only.
I’ll look through the errors and see if anything stands out to me.
May 9, 2020 at 20:54 UTC - Views: 30 #64483scrambler
Moderatoryou may also want to try and remove the commented part at the beginning and end
/*<![CDATA[*/
/*]]>*/
Last, you can try to insert the Script inside one of the page HTML Insertion area, using a page custom Field, trying either the page-head-code or the postfooter insertion area
The reason to try both, is because some scripts are needed before the page loads, or after, so try them both (one after the other). In this case I would assume you need to use the page-head-code so try that first
Reminder on how to create / use custom field
May 9, 2020 at 21:35 UTC - Views: 27 #64484Maureen
ParticipantThanks! I’ll give that a try.
I check over the errors and didn’t see anything that would cause an issue. This is a re-design of the website, so I’ve been going back to the old theme to see what is so different that the script would work there and not in Weaver. I also put back a number of plugin the previous web dev used.
UPDATE: tried your suggestion about the custom fields for both page-head-code and postfooter. Neither worked.
May 9, 2020 at 21:54 UTC - Views: 14 #64485scrambler
ModeratorCan you contact whoever provided the script?
May 9, 2020 at 22:09 UTC - Views: 11 #64486Maureen
ParticipantYes, I’ll call on Monday.
Thanks for your help!
-
AuthorPosts
- You must be logged in to reply to this topic.