Bug 3128 - problem with javascript with default skin--customer reported
: problem with javascript with default skin--customer reported
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 6.2.2
: All Other
: P2 normal (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-07 19:41 UTC by Kevin Pearsall
Modified: 2008-09-15 14:38 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pearsall 2006-03-07 19:41:44 UTC
Well, that sounds like a probable cause. Although - as far as I know - I'm using the default browser security settings on all the PC's I've tried.

I looked up problems in the JavaScript console in FireFox and found the following errors: 

parent.playlist has no properties (line 27)
	if (parent.playlist.location != '') {    <-------------this line

		// Putting a time-dependant string in the URL seems to be the only way to make Safari
		// refresh properly. Stitching it together as below is needed to put the salt before
		// the hash (#currentsong).

		var plloc = top.frames.playlist.location;
		var newloc = plloc.protocol + '//' + plloc.host + plloc.pathname
			+ plloc.search.replace(/&d=\d+/, '') + '&d=' + new Date().getTime() + plloc.hash;
		plloc.replace
(newloc);
	}

parent.playlist has no properties (line 45)
function switchPlayer(player_List) {
	var newPlayer = player_List.options[player_List.selectedIndex].value;
	
parent.playlist.location="playlist.html?player="+newPlayer;   <-------------this line
	window.location="status_header.html?player="+newPlayer;

	if (parent.browser.location.href.indexOf('setup') == -1) {
		for (var j=0;j < parent.browser.document.links.length; j++) {
			var myString = new String(parent.browser.document.links[j].href);
			var rString = newPlayer;

			var rExp = /(\w\w(:|%3A)){5}(\w\w)/gi;
		
			parent.browser.document.links[j].href = myString.replace(rExp, rString);
		}
	} else {
		myString = new String(parent.browser.location.href);
		var rExp = /(\w\w(:|%3A)){5}(\w\w)/gi;

		parent.browser.location=myString.replace(rExp, newPlayer);
	}
}

I don't know which file or script this code comes from or if this is what's causing my problems, but maybe it can help if you want to debug it. Anyway - I'll just use one of the other skins, that seems to solve my problem just fine. 

Thanks a lot for your help. I'll let you know if I figure out something more about this problem myself.
Comment 1 KDF 2006-03-07 21:29:13 UTC
This would indicate that there is no playlist frame.  What is the user doing at this point?
Comment 2 KDF 2006-03-07 21:35:23 UTC
actually, 6.2.2 and 6.5 alrady have changes beyond what is shown here.  for example, the first case is now:
if (parent.playlist.location.host != '') {

Please have the user update to the latest version of the nightly and reconfirm whatever problem is being seen.
Comment 3 Dan Sully 2006-04-22 14:14:54 UTC
KevinP - can you confirm with the user that this problem still exists?

Thanks
Comment 4 Blackketter Dean 2006-04-25 08:42:25 UTC
KP: trying to shut down on 6.2.2 today.  Is this still an issue?
Comment 5 KDF 2006-04-25 09:01:15 UTC
failing a response from the customer in question, I do have a high confidence level with this.  The javascript is now wrapped in a try{}catch{} (javascript equivalent of eval()) so the failure when the playlist frame isn't available yet is just swallowed by the 'catch' and the playlist is loaded by the index frameset.
Comment 6 Blackketter Dean 2006-04-26 10:29:36 UTC
Marking this as fixed.  Please reopen if it's still an issue.