I am using the FriendBuy app for a shopify store at this moment and am running into an issue where an illegal token is being caught, aside from that there are no other issues that I can see. What I am trying to do is activate the referral via a text link. I have followed the documentation according to the app to the letter, but after running a javascript validation test on the code a number of errors popped up. I find it hard to believe an expensive app with a huge user base would fail on something simple so the issue must be on my end but I can't seem to discover where. The code creating the issue is
window['friendbuy'].push(['widget', ‘xx-xxx’, {configuration: {share_button:false}}]);
according to the documentation this is what i should use, replacing xxx-xxx with the campaign id. The only inconsistency I can see is that the suggested x's to fill are 5 characters long, where the actual code is 6, but that is what I came up with after following the documentation.
It looks like your javascript has Microsoft quotes around the ‘xx-xxx’. If you change them to 'xx-xxx' it should work.
Corrected example below:
window['friendbuy'].push(['widget', 'xx-xxx', {configuration: {share_button:false}}]);
Related
I am following below walkthrough by J. Lattimar to add Documents navigation in CRM form tab. It was working fine in classical forms, but for unified forms the steps are not working and instead throw exception like An Error as has occurred. Any idea how to get this working?
https://jlattimer.blogspot.com/2017/01/show-sharepoint-documents-on-main-form.html
Xrm.Page is deprecated, so you'll need to update this JS. Start here:
https://learn.microsoft.com/en-us/dynamics365/get-started/whats-new/customer-engagement/important-changes-coming
First of all, this is unsupported approach we are following, author clearly called it out.
In UCI why it broke - someone did investigation already
Replacing Xrm.Page.context.getQueryStringParameters().etc
with "10069" ended up resolving this and currently works within UCI and Classic interfaces.
Actually couple of things to take care.
Like Hoffma said - Xrm.Page is deprecated, you have to rewrite the code to refer formContext from executionContext
Xrm.Page.context.getQueryStringParameters() is not containing the etc now, that's why breaking in UCI. You can supply the entity type code (etc) in the url manually
The Short
I am trying to create a List<ScanFilter> in JavaScript by accessing Android API, as shown below:
var scanFilterList = new java.util.List<android.bluetooth.le.ScanFilter>;
However, JavaScript gives me a SyntaxError due to an unexpected token, which I presume is because of the angle brackets. Any assistance in overcoming this problem and creating a List<ScanFilter> would be greatly appreciated!!
The Long
I want to periodically run BluetoothLE scans in my NativeScript application (only worrying about the android side for the moment), even while the screen is turned off. To my understanding this would be possible, as stated in the documentation:
For unfiltered scans, scanning is stopped on screen off to save power. Scanning is resumed when screen is turned on again. To avoid this, do filtered scanning by using proper ScanFilter.
Source
I am attempting to create a ScanFilter to be used as a parameter for startScan() when it is called. However, when I try to create a new List as shown below:
var scanFilterList = new java.util.List<android.bluetooth.le.ScanFilter>;
I get a SyntaxError due to an unexpected token. I am assuming this is because the angle-brackets aren't recognized by JavaScript and cause problems.
How can I bypass this problem and successfully create a List<ScanFilter> variable in JavaScript for use.
I'm trying to put a CafePress Widget on a website, using the tool provided here: http://www.cafepress.com/cp/widgets/ but it's not working. The box gets added, but no products within.
There's an error in the Console that shows that cpwidget.js is trying to access search.json with a relative URL. When I put this code in a jsFiddle this is the error I got:
http://fiddle.jshell.net/search.json?query=&pageNumber=1&utm_medium=affiliate&utm_campaign=cpwidget 404 (NOT FOUND)
(not sure what the snippet error will look like, so providing this too). My website returned the same error.
So this seems to be the problem, but I'm finding it hard to believe that this widget simply does not work. I couldn't possibly be the only person who's ever tried to use it?
var CPwaitForLoad,jQwaitForLoad,init=function(){if("CPWidget"in window)window.clearTimeout(CPwaitForLoad),CPWidget.init({title:"My CafePress Products",topcolor:"#8CBE21",bottomcolor:"#79A618",bgcolor:"#FFFFFF",rows:1,cols:1,imgsize:"125",prodtitle:"true",partnerid:"",shopid:"",tags:""});else{CPwaitForLoad=window.setTimeout(init,200);var t=document.createElement("SCRIPT");t.src="http://content.cpcache.com/cplabs/cpwidget.js?v=5",t.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(t)}},jQinit=function(){if("jQuery"in window)window.clearTimeout(jQwaitForLoad),init();else{var t=document.createElement("SCRIPT");t.src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js",t.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(t),jQwaitForLoad=window.setTimeout(jQinit,200)}};jQinit();
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<div id='cpwidget'></div>
Having the same issue: I believe widgets are no longer supported. If you look at their builder page (http://www.cafepress.com/cp/widgets/) you'll find the links to the Blogger & Joomla no longer work, either, and WordPress version is 2 years out of date with a low score.
Did you get any technical support responses from CafePress? I sent a contact email but have yet to get a response.
My answer: CafePress widgets no longer work.
Ok, Im trying to rebuild a clients website thats long over due for cleanup on the backend and under the hood. This client uses flowplayer for most of the videos seen on any of there sites, and while attempting to validate my code via w3c validator I notice that the validator is throwing 2 errors both pertaining to flowplayer in this case.
http://validator.w3.org/check?uri=http%3A%2F%2Fv2.newyorkbarshow.com%2Fhome&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3
I am using the latest flowplayer out, and following there example (which I don't know if that validates either). So I am wondering if it doesn't validate out of the box, if anyone happens to know a means of correcting it so it will validate.
You need to add data attribute with value "/static/imgs/static/VidAd4BarShow.swf" in your object tag.
note : I see this happens before flow player executes anything within your source...
I have some code that generates URLs to be used in various places across a site (image src, link hrefs, etc). I am seeing lines in the access logs which show some of the javascript code that generates the URLs masquerading as a file request.
For example, "/this.getIconSrc()" is one that I'm seeing quite a bit. I can't figure out how or why this is occurring and I can't manage to reproduce it without actually entering "http://whateverthesiteis.com/this.getIconSrc()" into the location bar. In most cases, these functions are chained together to generate a URL but the whole function chain does not appear in the server logs, just part of it.
I've probably invested around 30 hours trying to figure out why this is happening but cannot. It doesn't appear to be a browser issue as I've tried in IE 6/7, FF 2/3, Opera, Safari 3, and the problem does not occur. Has anyone else experienced something similar and, if so, what was the solution?
There's three possibilities really:
A bug in your HTML - malformed HTML causing onclick to leak into href, for example
A bug in your Javascript - myIcon.src = 'this.getIconSrc()'; - note the quotes that shouldn't be there
A poorly-written spider is hitting your site (like #Diodeus said: ___)
Edit:
Check the User Agent and Referrer in your logs - they may offer a clue.
Are you generating JavaScript calls like this? This may explain it.
___
#RoBorg... I'm thinking the most likely scenario is #3 since this particular function is actually only called in one place...
function whatever(){
var src = this.getIconSrc();
return src.replace( /((?:https?:\/\/)?(?:[^\/]+\/)*)[^\/]+/, '$1newimage.png' );
}