Sitecore doing random things - javascript

I have a feeling that our Sitecore install is messed up with the configuration but I can't point out where. Things happen at random in the Sitecore client. For example -
Clicks in the Sitecore client do nothing.
If I log out say after opening up Log Viewer and then log back in, I only see the log viewer and no other options.
Clicking on a link would log me out.
If I am logged in and another admin tries to log in with his/her credentials, sometimes they see my credentials.
IE 8 continuously throws 'scWin' related javascript errors.
The first 4 are consistent across firefox, chrome and IE. The last one is totally an IE occurrence.
An IIS reset fixes these issues but then these occurrences start happening again pretty quickly.
I've looked at log files but I don't see anything there. What else can I do here?

This sounds really strange. Are you sure you are not infected with some kind of malware or some virus?
Does it occur on every pc that is working with this solution?
You could try to remove the Sitecore files and copy fresh files from the install zip to see if that resolves the issue.

This does sound rather strange... First thing I would do is make sure you followed the IE setup guide exactly, to make sure it's not your browser causing problem. Javascript is definitely enabled, yes? The fact that it happens in Firefox also though means this probably isn't the real issue. Martijn might be on to something... have you tried using another machine entirely to access the site?

It turned out to be .NET caching - section - was turned on and was causing all sorts of issues. We removed this and it all worked.

Related

Testcafe works when it should not

First thanks to anyone who can help with this it's greatly appreciated.
As you can see by the title this is a very weird occurrence. I do a lot of work with testcafe and can't really explain this.
The scenario is at my company we raise instances in AWS put our product on the instance then run the automation. These instances are automatically torn down in around 3 hours so I can't really post an instance example as it will tear down. When I try to go to the instance I get stuck with a spinner at the login page. I tried firefox, chrome, chromium, safari, incognito, tor, etc... They all get stuck at this spinner, in fact, this happens to everyone in the company.
For some reason when I run some tests via testcafe on my computer using chrome on this instance it gets past this spinner, logs in, then just resumes tests like nothing is wrong. I have tried using localhost as the host, different ports, skip js errors, and other flags. I am updated to the latest version of testcafe. My theory is that it has something to do with the proxy server that testcafe launches (just a guess). I tried online proxy servers and even made a local proxy server but still, none can get past this spinner.
I'm pretty sure more info would be needed to help out on this I'm just not sure what to add. If any tips or logs to add please let me know.
UPDATE:
I tried a few more online proxy site and found one that worked (performed in the same behavior as testcafe). I believe at this point i can prove that its related to the proxy server. Now with that proved, im assuming there is no way to get around this issue right (meaning have testcafe fail)?
I have opened with testcafe and they have reported its a bug: https://github.com/DevExpress/testcafe/issues/6055

XAMPP won't update web source files until they're committed to Git on Chrome

I'm trying to create a web application for university. I've been doing fine with XAMPP, using Visual Studio Code and Sublime Text as my editors and so far so good. However, a couple of days ago, I ran into what seemed to be a bug.
While accessing "localhost" on Chrome, the website didn't seem to reflect the last changes to the HTML and CSS code. I also modified some Javascript and it didn't work either, the website stayed the same.
Not even simple things like changing a colour on CSS or adding an alert window on Javascript would appear on the actual web.
Inspecting the website in Chrome shows the old documents and source code, however, when going to the "htdocs" folder at XAMPP, the documents were successfully changed, and no matter what I did, relaunching XAMPP or Chrome didn't fix it either.
I decided to give up for the day and committed the changes to my GitHub repository. To my surprise, I refreshed the website afterwards and it worked.
I thought it was an isolated bug, but it seems like it is not, it happened today again while working on a completely different project.
What's more surprising, this behaviour doesn't seem to happen on Firefox or even Safari, I've tried both and it seems to be fine. However, I prefer the tools included in Chrome, so I'd rather use this one.
Has anyone else had the same issue? If so, how did you fix it? Or in case it is intended to work like that, why is it? I don't see any possible scenario where this could be useful.
Thank you in advance.
This is more of a workaround than a solution really, but you could just try ctrl+F5, this will clear your cache and you're good to go again.
This is probably the single worst Chrome bug when you're doing incremental small changes but Chrome loads it from the cache and not the original files.
What does Ctrl+F5 do?
This ignores the page saved in the cache and does a fresh GET. This should serve well enough as any changes made will be reflected in Chrome on doing so. Or you can manually clear the cache from the Chrome settings.

Why does has my javascript stopped working on live site, but works fine in test environment?

Okay, this is very weird...
http://connecttofriends.com/admin/login
I'm writing an administration control panel and am using a template from Theme Forest (because I didn't sign on to create any graphics, so my client bought it). For the login page listed above, I had to program it to run through Javascript due to the way it was set up.
I got it working and everything. Suddenly, though, something bizarre happened, and Javascript has not worked on that page at all since. None of my Javascript will even appear in Firebug, and I haven't been able to find anything to suggest that there's a Javascript error. Worse yet... on my local test server, it works perfectly fine. It just refuses to work on the live server for whatever reason.
Has anything like this ever happened before? How can I possibly fix this? I can't find anything wrong, and it works fine on my test server. I've at least been able to continue development on the test server, but without the live version working its useless.
I'll post code if people ask, but I don't see much of a reason to under these circumstances because the code actually works.
Any help is appreciated...
jQuery doesn't load.
It tries to fetch jQuery from this address: http://connecttofriends.com/admin/js/jquery-1.7.min.js, and it's not there. Missing a /, to indicate root?
the path you using is not loading, why dont you use jquery link as https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js
this'll also reduce your server hits.
jquery library is not getting loaded.Please check the path of the jquery-1.7.min.js.

Viewing the updated HTML in ie6

I am working with ie6 (unfortunately) and i am having a javascript error. Its wondrous error message gives me a line in the html source, but unfortunately the javascript that does run changes the code for the page(dramatically). So the error that its pointing me to is a closing div tag, not actual code.
Is there a way to view the updated code for the page so I can at least know where my code is breaking?
I should also point out what im developing in.
I am developing a sharepoint 2007 solution for an winxp and ie6 user base. I am working via remote desktop on a sandbox winserver 2008 r2 and can access the site from my terminal. Now, unfortunately in my sandbox server i have ie 8 in which my code works. So im stuck on ideas. If anyone knows how to view the updated source on the page, i would be very grateful.
Thanks.
Edit. I should also mention i dont have admin access on my terminal. So i cant install visual studio. It would take a couple weeks for an issue ticket for temp admin access to install it, and this is sort of important.
If you can't install anything and the error console information isn't meaningful, then about all you can do is start modifying your code until you can find which section is causing the error. The kinds of modifications you can do are as follows:
Comment out a chunk of code in a way that won't cause more errors. If the error goes away, then you know it's in that block of code or something that code calls. Put that block back in and then comment out a piece of it and so on until you narrow down where the problem is.
Start inserting alert("1"), alert("2") prompts into your code with the goal of identifying which alert the error comes before and after until you've eventually tracked down where it is. When you rule out an area, remove the alerts to make it feasible to still run the app.
On a more modern computer (e.g. Vista/Win7) go to Microsoft's site and download both Microsoft Virtual PC and the Windows image for XP with IE6. You can then actually install things into the VM and do real IE6 debugging or at least see what the actual error is.
Find a computer with XP/IE6 on it that you can install real debugging tools on.
Build your own dummy little debug window using a textarea and a couple functions that append text to it. Put that into your browser page and start sprinkling mydebug("Entering function foo") statements throughout your code so you can narrow down which statements occur before and after the error and eventually find the error. This is how I've done some IE6 debugging when it was't worth the trouble of setting up a full-blown debug environment for IE6. This works much better than alerts for some types of problems because it doesn't interrupt the flow of the app or require lots of user intervention and you can scroll back through the history.
If you are using visual studio you can use it to debug js errors in ie.
Go to the Advanced Internet settings in ie and make sure that the two
Disable script debugging settings are turned off (so that script debugging is enabled)
and that the setting
display a notification on every script error is enabled.
If you don't have visual studio installed you can download and install microsofts script debugger (it's free just google it) and use that, tho it is not as easy to work with and won't give you as much useful information

Troubleshooting Help With IE8/Superfish Problem on SOME Computers Only

Our website uses the superfish jQuery plug-in for our menus (http://users.tpg.com.au/j_birch/plugins/superfish/), and they work fine in Firefox, IE6, IE7, Safari, Chrome, etc. ... and even in MOST IE8 installations. The problem is, in some IE8 installations, the menus don't work (they highlight on mouseover but don't drop-down the menu).
This has me baffled. In addition to a couple customer complaints, I've got one (Windows XP) machine in-house that reproduces the issue. However, I also have another Win XP/IE8 machine in-house which doesn't experience the problem. I'm used to dealing with JS/CSS issues between different browsers, but this issue between two machines on the exact same OS and browser is a bit much.
Oh, and just to further obfuscate the matter, the machine that is reproducing the issue shows no errors, Javascript or otherwise (even when I go in to developer mode). So ... does anyone have any suggestions on what could be going on?
As far as I know neither of my two "test" machines have any special plug-ins or anything which would cause the problem, they're identical in terms of everything that matters, and there's no JS error occurring that I can check the stacktrace of or anything. But this isn't just some crazy problem that's unique to my test machine, because as I said some customers have reported it too.
Any help would be appreciated.
Can you try setting the IE7 compatibility mode and see whether the problem persists?
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
(into the head of the document, best would be directly after <head>)
If it works then, you'll definitely know that it is some IE8 specific rendering issue. My first bet would be that your menu uses CSS hacks to set certain IE specific settings, unaware that IE 8 (fortunately) behaves differently and more standards-compatibly than its predecessors. If that is the case, you would have to use an IE8 specific CSS hack (or, better, specific style sheet) to "re-fix" those settings.
But first, check whether this really is the problem using the compatibility view.
Try turning off compatibility view: Tools -> Compatibility View -> Uncheck. I too struggled with this for the better part of an afternoon until I just tried this on a whim and it worked!
Try clearing Internet Explorers cache. Go to Tools -> Internet Options -> Browsing History section -> Delete ... -> Temporary Internet Files -> Delete.
For reasons unbeknownst to me, I've seen all IE versions start behaving strangely when the cache has been full or not cleared for a long time.
I have a Windows 7 64bit Home premium. The laptop encountered an issue called SupperFish.
First I tried resetting home page to different URL’s. IE8 kept returning to SuperFish.com.
Look in Add and remove programs, was not there, Not in startup or MSCONFIG (startup).
Third cleared Cookies then History. No help. Forth ran Microsoft Security Essentials, SpyBot S&D, Norton Constant Guard , Ad Aware. Problem is still there, Looked in C:\Program Files and found a folder called SuperFish, in that folder there was an Uninstall executable. I ran the Uninstall using a administrator account, and the problem is no longer showing up, after several hours of use.
not sure if it is a solution and that this is what you meant by not knowing how to fix it... but I cleared all my cache/history/cookies etc. from IE8 and if immediately worked (looking the same as other browsers).
maybe a fix for now but that worked...
This issue wound up going away without us ever figuring out what caused it, so now even if we did want to figure it out we can't (as we can't replicate). Therefore I can't really mark any of the above answers as correct, but since they exist I can't delete this issue either. So, I guess the best I can do is file this answer, but it's a rather unsatisfying one; sorry.

Categories