Java issue, redirects to a 404 (VoiceZam player, buttons)
-
On my website’s voice page (philschoen.com/voice) I have an external player from VoiceZam. This is working fine.
VoiceZam also has javascript to create buttons which can control the player.
This is working on WP themes that are hosted on external hosts. However, on my page, if I click one of the buttons to select any particular playlist for the player – it will change the playlist, start to play it for a fraction of a second, but then redirect the page to “philschoen.com/voice/void(0”Of note, and maybe this will be a clue to some of you, the close paragraph “)” for void(0) is missing in the address bar.
After working with WP.com support techs and the VZ developer, here’s the latest information:
*****
The button code we generate has <DIV> tags named ‘clsVZbutton’ and each includes an HREF as ‘href=”javascript:void(0);’ – please see below.Somewhere during processing the code and publishing it, a WordPress plugin (JetPack?) is modifying our code and the javascript: attribute is being stripped. That is what’s causing the incorrect HREF redirect to the undefined page: ‘https://philschoen.com/voice/void(0)’
*****
Any ideas?
The blog I need help with is: (visible only to logged in users)
-
Hi there,
I see that you have a Business plan and therefore you have access to our live chat support. Please start a chat session from the link below and we’ll help you resolve the issue you’re having.
https://wordpress.com/help/contact
Thanks,
-
Darnell,
Thanks. That’s what I’ve been doing for three weeks, and there has been no fix.
In all honesty, VoiceZam is more important to my business than where the website is hosted.
I have enjoyed the experience with WP.com until this point, but if this isn’t fixed quickly I will be looking elsewhere.
Thank you,
Phil
-
I believe there are plugins available that will keep JavaScript in place when you add it. I’ll ask in with our Business team to confirm, but if you’d like to give that a try in the meantime, you may.
We’ll let you know when we have more information. Generally though the chat support is much faster, so if you want to pop in there and ask about the JavaScript being pulled out, they can likely help you there, too.
-
Hi Phil, one thing that will really help: can you paste the full code here?
Press the “code” button, then paste, then press “code” again. That way we should be able to see the whole thing.
Or you can go to pastebin.com or a similar site, paste the code there, then share the link.
If the code is in fact being stripped, we’re not able to see what was taken out so, having the original code like this will help us troubleshoot.
-
<!--To use a different icon, please refer to this site: https://fontawesome.com/v4.7.0/icons/ --> //code.jquery.com/jquery-1.8.2.js https://use.fontawesome.com/releases/v5.2.0/js/all.js <style> .clsVZbutton{ clear: both; display: block; float: left; font-family: arial; font-weight: bold; left: 40px; margin-bottom: 30px; position: relative; text-decoration: none; background: #f15b22 none repeat scroll 0 0; padding: 5px 5px 5px 5px; width: 270px; } a{ text-decoration:none; }.clsDemoName{vertical-align: top; line-height: 2; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: calc(100% - 40px);display: inline-block;}.NoDownloadBtn{vertical-align: top; line-height: 2; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: calc(100% - 30px);display: inline-block;}.NoPlayBtn{vertical-align: top; line-height: 2; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: calc(100% - 35px);display: inline-block; margin-left: 7px;}.NoBtn{vertical-align: top; line-height: 2; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: calc(100% - 15px);display: inline-block; margin-left: 7px;}.clsBtnPlay{display: inline-block;width: calc(100% - 15px);box-shadow: none !important; }.clsBtnDownload{box-shadow: none !important; left: auto; right: 5px; position: absolute; width: 22px;top: 11px;}.btnColor {color: #ffffff;}.btnPlayIcon {font-size:20px;padding: 5px 4px 0 0;}.btnDownloadIcon {font-size:20px;}.btnPauseIcon {margin: 7px 5px 0 0;} </style> <script type="text/javascript"> //<![CDATA[ jQuery('body').on('click','.clsBtnPlay', function(){ var id = parseInt(jQuery(this).attr('id').replace('btnPlay_','')); listenDemo(id , true, this) }); jQuery('body').on('click','.clsBtnDownload', function(){ var id = parseInt(jQuery(this).attr('id').replace('btnDwn_','')); downloadDemo(id , true, this) }); // ]]></script> <div class="clsVZbutton"><a id="btnPlay_9471" demoID="9471" class="clsBtnPlay" href="javascript:void(0);" target="_self"><span><i class="fa fa-play btnColor btnPlayIcon" aria-hidden="true"></i><i class="fa fa-pause btnColor btnPauseIcon" aria-hidden="true" style="display:none;"></i></span><span class="clsDemoName btnColor">Commercial</span></a><a id="btnDwn_9471" href="javascript:void(0);" class="clsBtnDownload" target="_self"><i class="fa fa-download btnColor btnDownloadIcon" aria-hidden="true"></i></a></div><div class="clsVZbutton"><a id="btnPlay_9511" demoID="9511" class="clsBtnPlay" href="javascript:void(0);" target="_self"><span><i class="fa fa-play btnColor btnPlayIcon" aria-hidden="true"></i><i class="fa fa-pause btnColor btnPauseIcon" aria-hidden="true" style="display:none;"></i></span><span class="clsDemoName btnColor">eLearning / Corporate Training</span></a><a id="btnDwn_9511" href="javascript:void(0);" class="clsBtnDownload" target="_self"><i class="fa fa-download btnColor btnDownloadIcon" aria-hidden="true"></i></a></div><div class="clsVZbutton"><a id="btnPlay_9509" demoID="9509" class="clsBtnPlay" href="javascript:void(0);" target="_self"><span><i class="fa fa-play btnColor btnPlayIcon" aria-hidden="true"></i><i class="fa fa-pause btnColor btnPauseIcon" aria-hidden="true" style="display:none;"></i></span><span class="clsDemoName btnColor">Narration</span></a><a id="btnDwn_9509" href="javascript:void(0);" class="clsBtnDownload" target="_self"><i class="fa fa-download btnColor btnDownloadIcon" aria-hidden="true"></i></a></div> -
And thank you in advance for your help.
Just in case, I will post the code for the player, which does work, and which should be controlled by the buttons in the previous code, but isn’t. Instead, it appears to do what it’s supposed to, but a fraction of a second later, jumps to a 404.
Anyway, here’s the player script…
-
<script type="text/javascript"> //<![CDATA[ <!--Enter your account ID.You can find this under the Menu item: Help | About--> var ACCOUNT_ID = '57839875-1278-4a24-b68a-581f3028f527'; <!--Enter the title of this page.Clicks will appear in your Zamtistics--> var PAGE_NAME = 'Demos page for Phil Schoen'; <!--NOTE: value can be either 'inline' OR 'popup'--> var RENDER_MODE = 'inline'; <!--Enter a Demo ID for the default demo to display when the player launches--> <!--NOTE: Demo IDs can be found in the Showcase by clicking the --> <!--gear icon for a specific Demo--> var DEFAULT_DEMO = null ; <!-- Use Account Default ; --> <!--Handle AutoPlay On PageLoad--> var AUTO_PLAY = false; <!--Option to show contacts button in player--> var SHOW_CONTACTS = true; jQuery('body').on('mousedown', '.listendemo', function () { var id = parseInt(jQuery(this).attr("id").replace('vzbutton_', '')); listenDemoHref(id, true, this) }); // ]]></script> //www.voicezam.com/clientScripts/WebLinking2.aspx <div id="voiceDemos"></div> -
Thanks!
We’ve asked our developers to look into this, and we’ll get back to you as soon as we hear back.
-
-
And just in case I didn’t put the actual website address, you can see the issue live at my demo page on my website: http://www.philschoen.com/voice
-
Yup, we’ve got it. Thank you for your patience in this! Right now our Business developers are also suggesting a code plugin. Code Embed was the one they’d used.
We’re going to get another pair of eyes on this, but do you want to try that? You may need to use the Classic editor with it (available via wp-admin — let us know if you need help.)
-
It seems that the
"target=_self"attributes on the anchor tags are what’s preventing the buttons from working. I have modified the code on your page accordingly and it should be working nicely now. Can you please confirm this on your end? -
-
@druesome – or any other geniuses (geni?) ;-) who have the answer… an idea for a modification of one of the buttons.
Scenario – the three buttons in question, which now work perfectly – are links to various playlists. The first list, which is pre-loaded into the player is the most important one. However, the second playlist is the newest, and one I want visitors to also listen to.
Is there a way for me to upload an icon png graphic to my library, and add some code inside the button javascript code whereby this tiny “NEW” icon would display next to the text, inside the button? Or, perhaps, next to the button itself?
Any ideas?
-
Hi, to clarify are you just trying to add a tiny “new” notification icon to that button?
It’s a bit outside the scope of support here for us to just write the code (as it would take some tinkering to ensure you’ve got it right) but we can certainly point you in the right direction.
– Add the class “new” to your button
– Add something like this to your CSS:
.new::before { content: "NEW"; display: inline-block; background-color: black; color: white; font-size: 10px; padding: 2px 5px; border-radius: 3px; position: absolute; left: -20px; top: -10px; }You’re welcome to tinker with that, or if you need more help and want to hire a designer / developer, we recommend UpWork.com.
- The topic ‘Java issue, redirects to a 404 (VoiceZam player, buttons)’ is closed to new replies.