Bug 9544 - Can't open the default skin when it is not the default skin ;)
: Can't open the default skin when it is not the default skin ;)
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Web Interface
: 7.3.0
: PC Windows XP
: P3 normal (vote)
: 7.x
Assigned To: Squeezebox QA Team email alias
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-19 01:26 UTC by Philip Meyer
Modified: 2009-09-08 09:22 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Meyer 2008-09-19 01:26:49 UTC
When an alternative skin is chosen as the default skin via Interface settings, it is not possible to open the WebUI using http://localhost:9000/Default.

The effect is that the WebUI reports "SqueezeCenter Loading..." forever.  I get the same effect with any web browser.

[19:56:35.4578] Slim::Utils::Misc::msg (1125) Warning: [19:56:35.4572] Use of uninitialized value in hash element at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 99.
[19:56:35.4583] Slim::Utils::Misc::msg (1125) Warning: [19:56:35.4580] Use of uninitialized value in substitution (s///) at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 112.
[19:56:35.4587] Slim::Utils::Misc::msg (1125) Warning: [19:56:35.4585] Use of uninitialized value in concatenation (.) or string at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 167.
[19:56:35.4593] Slim::Web::HTTP::_generateContentFromFile (2470) Error: file error - : not found
[19:56:36.7355] Slim::Utils::Misc::msg (1125) Warning: [19:56:36.7351] Use of uninitialized value in hash element at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 99.
[19:56:36.7359] Slim::Utils::Misc::msg (1125) Warning: [19:56:36.7356] Use of uninitialized value in substitution (s///) at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 112.
[19:56:36.7362] Slim::Utils::Misc::msg (1125) Warning: [19:56:36.7360] Use of uninitialized value in concatenation (.) or string at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 167.
[19:56:36.7367] Slim::Web::HTTP::_generateContentFromFile (2470) Error: file error - : not found
Comment 1 James Richardson 2008-09-19 12:54:21 UTC
which web browser & version are you using?  I can't reproduce this here with IE 7.0.5730.13
Comment 2 James Richardson 2008-09-19 13:11:27 UTC
I was able to verify that using I.E., going from /<any> to /light will generate an error.

when the Default interface is set to Light, SC will launch just fine.  Switching it to /light from the Address bar will fail.
Comment 3 KDF 2008-09-19 14:31:07 UTC
Template Toolkit limit.  You have a lot of plugins and TT only allows 64 template roots.  Using a non-default skin in this case causes the same barf.

Comment 4 KDF 2008-09-19 15:51:19 UTC
If the above is the cause, a fix is to patch CPAN/Template/Provider.pm, line 63 to read:

our $MAX_DIRS = 128 unless defined $MAX_DIRS;

I have had this on my home copy for ages (I have WAY too many plugins and always call up the ui with the url override thanks to the days of reworking and testing every skin).  

The only problem with this is that we generally move CPAN modules to lib when we have SC-specific mods.  I'd want to know what the possible down sides are with a larger number (ie, why the TT authors have 64 as the current limit).

Another idea would be to merge included plugins with the core web templates so that we don't have so many added INCLUDE_PATHS out of the box.
Comment 5 Michael Herger 2008-09-22 12:43:21 UTC
James/Phil - can you confirm the "many plugins" issue?
Comment 6 Michael Herger 2008-09-22 12:46:55 UTC
BTW: I can reproduce the issue as initially reported, while /Handheld/ or /EN/ would work fine. It's most likely due to some using of absolute paths.

/Light/ will create an error, as there's no such skin: while it's shown as such in the settings, its real name is "EN". Confusion due to localization.
Comment 7 James Richardson 2008-10-02 09:41:26 UTC
(In reply to comment #5)
> James/Phil - can you confirm the "many plugins" issue?
> 

Phil have you had a chance to verify this?  I still can't reproduce the issue.  Even after installing a few plug-in's.  I'll try later with more to see what happens.
Comment 8 Philip Meyer 2008-10-03 00:54:18 UTC
I have 36 plugins.  I haven't reduced my plugins to find what the working limit is.  Is that what you are asking for?  I can do that later tonight and report back.
Comment 9 Michael Herger 2008-10-03 01:07:17 UTC
Yes, please test with less plugins. 36 sounds like an awful lot to me :-)
Comment 10 Philip Meyer 2008-10-03 14:59:51 UTC
I removed all plugins, deleted my server cache and web browser cache and restarted.  I changed my default skin to Fishbone.

Exactly the same fault occurs.

I can open http://localhost:9000 and get the fishbone skin.

If I try to open http://localhost:9000/Default, I only get the "Loading SqueezeCenter..." message.

The log says:

[22:54:37.5226] Slim::Utils::Misc::msg (1126) Warning: [22:54:37.5222] Use of uninitialized value in hash element at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 99.
[22:54:37.5230] Slim::Utils::Misc::msg (1126) Warning: [22:54:37.5228] Use of uninitialized value in substitution (s///) at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 112.
[22:54:37.5235] Slim::Utils::Misc::msg (1126) Warning: [22:54:37.5232] Use of uninitialized value in concatenation (.) or string at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 167.
[22:54:37.5240] Slim::Web::HTTP::_generateContentFromFile (2457) Error: file error - : not found
[22:54:38.1685] Slim::Utils::Misc::msg (1126) Warning: [22:54:38.1681] Use of uninitialized value in hash element at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 99.
[22:54:38.1690] Slim::Utils::Misc::msg (1126) Warning: [22:54:38.1687] Use of uninitialized value in substitution (s///) at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 112.
[22:54:38.1695] Slim::Utils::Misc::msg (1126) Warning: [22:54:38.1691] Use of uninitialized value in concatenation (.) or string at P:\Music\SlimServer\trunk\server\CPAN/Template/Context.pm line 167.
[22:54:38.1700] Slim::Web::HTTP::_generateContentFromFile (2457) Error: file error - : not found

If I set the default skin back to Default, then http://localhost:9000 will open the default skin correctly.
Comment 11 Michael Herger 2008-10-08 03:32:02 UTC
QA - can you reproduce? This works for me.
Comment 12 James Richardson 2008-10-08 08:14:56 UTC
(In reply to comment #11)
> QA - can you reproduce? This works for me.
> 

See Comment #2

Phil: What Browser are you using?  I have tested on XP & Vista with IE 6 & 7 but have been unable to reproduce any errors.  I even added 40+ add-on (just to test) but still no error.

I'll test with FF / Opera / Safari and IE 8 today
Comment 13 Philip Meyer 2008-10-08 08:26:11 UTC
I don't understand - you said in comment #2 that you experienced the error too?
Michael Herger also said he has experienced the issue in comment #6.

I don't believe this is anything to do with specific web browsers - the error occurs in the SC error log (so not javascript, etc).  I have tried with IE7 and FF3 - both experience the same issue.

Also not related to plugins, as I removed all 3rd party plugins for testing this in comment #10.

Nb.  I think I only experienced it when the SC default skin setting was set to "Fishbone", and I was starting the WebUI with a url of http://localhost:9000/Default(from memory NOT the other way round - can check when I get home later).
Comment 14 Michael Herger 2008-10-08 08:41:38 UTC
> I don't understand

I don't understand neither. Now it's no longer working for me :-(. I'll have to take a fourth look.
Comment 15 James Richardson 2008-10-08 08:59:03 UTC
(In reply to comment #13)
> I don't understand - you said in comment #2 that you experienced the error too?
> Michael Herger also said he has experienced the issue in comment #6.
> 
Sorry, I should have been more specific.  I was ONLY able to see the issue when going to '/light' and as Michael pointed out, I should have been using '/en'.  so this was a syntax error on my part.
Comment 16 Michael Herger 2008-10-09 05:36:04 UTC
change 23490 - prepend .js source paths with webroot TT variable

Kevin - is there a bug about the TT skin number limit? Wouldn't something like the following work?

Index: D:/eclipse/7.3/server/Slim/Web/HTTP.pm
===================================================================
--- D:/eclipse/7.3/server/Slim/Web/HTTP.pm	(revision 23487)
+++ D:/eclipse/7.3/server/Slim/Web/HTTP.pm	(working copy)
@@ -51,6 +51,7 @@
 BEGIN {
 	# Use our custom Template::Context subclass
 	$Template::Config::CONTEXT = 'Slim::Web::Template::Context';
+	$Template::Provider::MAX_DIRS = 128;
 	
 	# Use Cookie::XS if available
 	my $hasCookieXS;
Comment 17 Ross Levine 2008-11-19 16:29:07 UTC
Phil, would you mind verifying this fix? 
Comment 18 Philip Meyer 2008-11-19 16:40:31 UTC
Yes, it works for me now.
Comment 19 James Richardson 2008-12-15 12:36:57 UTC
This bug has been fixed in the 7.3.0 release version of SqueezeCenter!

Please download the new version from http://www.slimdevices.com/su_downloads.html if you haven't already.  

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 20 Michael Herger 2009-01-05 02:16:23 UTC
FWIW: change 24494 adds the TT MAX_DIRS change to double the number of paths from 64 to 128
Comment 21 Chris Owens 2009-07-31 10:30:05 UTC
Reduce number of active targets for SC