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.
Related
I was using Django 1.9 to build my comment-check application, but I suddenly found parts of CSS/javascript didn't display on the Django admin page while I was on the adjustment about urls and views.
enter image description here
enter image description here
As you can see, all admin pages like picture one except the detail content pages like picture two works well. And in the content pages, Chrome developer tool console show these messages
RelatedObjectLookups.js:160 Uncaught TypeError: $ is not a function
at RelatedObjectLookups.js:160
at RelatedObjectLookups.js:189
(anonymous) #RelatedObjectLookups.js:160
(anonymous) #RelatedObjectLookups.js:189
For sure, I don't want to paste the code from RelatedObjectLookups.js becasue I never edited any statements in this js file(maybe). This file's location is here by default:
myapp\static\admin\js\admin
I didn't get any 404 status code or other error response from the server. Most importantly, when I tried to check whether it was the specific case in this app so I opened my other django projects admin pages, this problem still persisted. Even though I reinstall the Django in virtualenv cannot solve it.
It is the first time I ask question in here, also I'm not a native English speaker and just a python beginner. This task confused me for few hours and still found a solution. So I hopes someone can give me some advice. Thx.
I am also an beginner and stucked by this issue. After long hours of battle i come to know the problem and solved it.
I am not sure it will work for you or not.
In your case please check out the following things:
1) Mainly this issue comes when javascript is not properly linked to file.
such as in my case stellar.js was not properly used or linked in html so browser throws "TypeError: stellar is not a function"
2) This also case of improper static_cdn file load of django. When you fire a command for "collectstatic" some times old files stays over there. First delete those files from static_cdn and fire command "collectstatic"
I hope this would help you
I have been having this problem for a week almost in my Prestashop 1.6.0.13.
My question is that when I go to Prestashop Men's section and try to add products to cart (with 1 item in stock).
I have enabled the option for advanced stock management but it didn't seem to help me out on my problem.
I get the next following message:
"Impossible to add the product to the cart textStatus:error
errorThrown responseText;"
The weird thing is that when I try to refresh the product item, it appears on my cart. The same happens when I subtract the product from my cart.
From the other side, it doesn't seem to be a problem for the rest of categories.
I double checked the URLs also to see if there was a conflict between friendly URL's and cart but I deem that the problem doesn't lie there.
I disabled the Ajax cart also to see if the problem lied there but no solution either. Currently, I am using the default Prestashop cart block.
I found a way solving the problem by uninstalling Google Analytics module but it isn't what I really want for solution because I need it in order to make reports on statistics.
Has anybody encountered any similar problem and found a solution ?
Please, if you have any suggestions on solving this matter, I would be really glad.
Thanks,
Orestis
Ok the solution was to remove "|" from every product description in Back-Office, which was the source of the problem. The products that had it, was creating a PHP Fatal error: Uncaught exception 'Exception' with message 'Forbidden chars in cookie' in /var/sites/c/caneihavethis.com/public_html/classes/Cookie.php:169.
I wouldn't recommend though to edit the Cookie.php line. Just by removing this char, Google Analytics won't give problems in adding or subtracting a product.
On pressing Add to cart button it sends data and gets a response in JSON format. In your site there is a syntax error in that response.
It is not easy to find the reason and fix it. But you can:
If you have experienced that uninstalling Google Analytics module is fixing it - you must be sure you have configured it properly or you should try to use another module. Though the problem can not necessary be related directly...
Advanced. Use Firefox Firebug addon and check in its Console what is the full response on pressing Add to cart. It shows more information about what is causing this error.
You can find many tutorials how to use Firefox Firebug, it is quite simple. You can find the reason, uninstall buggy modules or themes, but it is possible you need to get a help from a coder to fix it finally.
Get a help from a coder.
I am trying to over ride one the notification popups of browser using the following code:
var branch = Components.classes["#mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
But in Mozilla Firefox, I get the error Component.classes is undefined.
And in Chrome Browser, I get the error Component is undefined.
Well I have realised I need to include something in my website. But I am unable to find exactly what is required.
Please anybody help. I googled about it a lot, but I have never used this thing before(the Classes) and I am unable to search what will help me out. i dont even have any idea that what will be the tags for this thing. I have never used Component or its classes
My website is in ZF2.
Components Object is non-standard feature. See https://developer.mozilla.org/en/docs/Components_object.
It also says
Warning: This object is only intended for code running with chrome
privileges. Exposing the object to regular web code was a mistake.
i want to put a soundcloud music player (http://stratus.sc/) on my drupalgardens page. i added an external source javascript library and uploaded a js file on the system as it says on the pluging website. all this tru the administration website of drupalgardens. When i check the sourcecode of my webpage it appears like the pluging is on the header. But it doesnt work, i cant see it. i activated all the jquery functions.
bit of sourcecode on header where the pluging seems there:
<script type="text/javascript" src="http://stratus.sc/stratus.js"></script>
<script type="text/javascript" src="http://NAMEOFMYSITE/sites/NAMEOFMYSITE/files/js/js_PRNQJr2GPf-FrbaSuV5IDQ1l6Lfby6e79KpPOUTf5kI.js"></script>
link:
http://bit.ly/10nyAHV
Any suggestions?
Note : The player im talking about is NOT the one that can be seen under the rotating banner. the one im talking about its supposed to be globally on the webpage at its seem on the pluging oficcial webpage
For one you're getting this console error: "Uncaught SyntaxError: Unexpected token < "
Not sure how that script is getting added but just removing the script tags may clear it up.
Even if the frame errors mentioned by KG are unrelated, you have to go clean that all up.
Your script should also be loaded after jquery. Since it looks like you have js aggregation turned on, I don't really know how to determine if drupal is loading things correctly. You can just tell your script to load in the footer instead of header if you're unsure. The links below explain how to do that.
Here are some javascript related resources for Drupal. They sometimes expect things to be handled differently.
The plugin is dependent on jQuery. By default, Drupal 7 loads jQuery 1.4. You may need to use the jQuery Update plugin to use 1.5, 1.7 or 1.8
Drupal Community docs about javascript:
http://drupal.org/node/756722
Drupal javascript API:
http://drupal.org/node/751744
I had a similar issue. Some reasons for a not working player are:
For some reason $ is not known (although jQuery is included). I replaced '$' by 'jQuery' and everything worked fine. That means use jquery(document).ready(... instead of $(document).ready(... and jQuery.stratus({.. instead of $.stratus({...
There is a typo on the stratos.sc web site. It should read $.stratus not $stratus (or jQuery.stratus, see previous hint).
Check that the source stratus.js and the initialisation code is included.
Mixture of https and http might be a good guess as reason for problems, but actually it works (I just tried it). If you can't find the problem, try to use a JavaScript debugger and check the error logs first!
I copied the generated source code (View Source -> View Generated Source in the Firefox Web Developer Toolbar) of Google's Keyword Tool page to a new HTML file.
But, when I open this new file, some of the items looks stretched for some reason:
The original website looks like this:
I guess that Google create some elements and set various attributes using Javascript, but I copied the page after it has been generated. So, why is this difference?
UPDATE 1
The only JS/CSS file, which is not given as a full path, is:
<script language="javascript" src="/cues/cues.js">
I tried replace this with:
<script language="javascript">
Contents of '/cues/cues.js' here
</script>
but it didn't help.
UPDATE 2
In the browser's error console I found the following 2 errors:
Error: com_google_ads_apps_servers_cues_CuesRelease is not defined
Source File: https://adwords.google.com/cues/768DAEDDB2193AB5B05B9C6A01394D78.cache.js
Line: 1
Error: com_google_ads_apps_targetingideas_client_TargetingIdeas is not defined
Source File: https://adwords.google.com/o/Targeting/756D6AF3BB4DD4A68315E34F50C2BC7E.cache.js
Line: 1
Any ideas why these errors appear?
UPDATE 3
Apparently, the reason is that the DOCTYPE declaration is missing. After I added <!DOCTYPE html> to the stretched version, it solved the problem. Can anyone explain why?
When you save a page, you only get the version of HTML served from the server in its original form. Any mods to the DOM made after load using JS will not be part of the save.
EDIT
I could not trace out the exact reason for the error as the code is really cryptic! In any case, if all you want is to be able to reproduce the exact page offline, then you can do a 'save page as..' from your browser (choose web page, complete). I tried this with FF as well as Chrome and it is working fine in both cases. While opening the saved page, it might be best not to use IE as its a certified choker when it comes to even the slightest error in code. :)
The most likely reason for the error is an cross-domain AJAX security exception (fired when the calling client side script and called server side script are from different domains). The 2 variables namely, com_google_ads_apps_servers_cues_CuesRelease and com_google_ads_apps_targetingideas_client_TargetingIdeas seems to be initialized using the return of some AJAX call (which couldn't execute bcoz of the secu excep), and as a result remain as undefined.
You must be missing some css and js which is not on the page but referred from somewhere else.
The most probable reason is that the CSS and the corresponding images that might be referred within it are not getting applied correctly.
Check the paths of the CSS and for the images (background) within the CSS...You might need to correct the paths to fix the issue.