Bug 5616 - Windows only: "Prevent standby" button misbehavior
: Windows only: "Prevent standby" button misbehavior
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Plugins
: 7.0
: PC Windows XP
: P2 minor (vote)
: ---
Assigned To: Ross Levine
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-29 12:37 UTC by Mick
Modified: 2007-12-28 07:08 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments
drop optionsurl (594 bytes, patch)
2007-09-29 21:55 UTC, KDF
Details | Diff
Firefox screengrab (32.02 KB, image/png)
2007-10-02 02:49 UTC, Mick
Details
firefox 2.0.0.7 capture, classic skin. WinXP SP2 (18.32 KB, image/jpeg)
2007-10-05 12:48 UTC, KDF
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mick 2007-09-29 12:37:20 UTC
When you go to the Prevent standby Plugin and click on the settings button, you get the following error due to a missing page.

404 Not Found: PreventStandby/content/settings.html


On a related note, for plugins with no user settable config, should the settings button be disabled.

Several plugins do nothing when you click this button. Either the button should not be there or should be disabled, so the user knows that it is not relavent.
Comment 1 KDF 2007-09-29 13:43:29 UTC
sounds like we're getting a pattern.  bug 5609 and bug 5611 are likely to therefore all be the same issue.  however, this is not yet reproducible for me. I cannot even check on this on, simply becuase I do no use windows for the server.  Try nuking the plugin-data.yaml file in the cache folder and restarting.  Lets see if refreshiing all of the plugin data has some effect.  

Was this an upgrade over 6.5.x or a fresh install?
Comment 2 KDF 2007-09-29 21:55:47 UTC
Created attachment 2198 [details]
drop optionsurl

the optionsurl in the install.xml gives the server the location of the settings page.  As there are no settings for PreventStandby, there should be no optionsurl.
Comment 3 Mick 2007-09-30 04:39:48 UTC
I saw this behaviour with 7 installed into a separate directory to 6.5 but using my 6.54 prefs file.

Install.xml for PreventStandyBy lokks like this 
<?xml version="1.0"?>

<extension>
        <id>BFACABFD-6334-4743-95BA-43A60E159560</id>
        <name>PLUGIN_PREVENTSTANDBY</name>
        <module>Slim::Plugin::PreventStandby::Plugin</module>
        <version>1.0</version>
        <description>PLUGIN_PREVENTSTANDBY_DESC</description>
        <creator>Julian Neil, Slim Devices/Logitech</creator>
	<email>support@slimdevices.com</email>

	<defaultState>enabled</defaultState>
        
        <homepageURL>http://www.slimdevices.com/</homepageURL>
        <optionsURL>slim://PreventStandby/content/settings.html</optionsURL>
	<type>2</type><!-- type=extension -->

        <targetApplication>
  	        <id>SqueezeCenter</id>
                <minVersion>7.0a</minVersion>
                <maxVersion>7.0+</maxVersion>
        </targetApplication>

	<targetPlatform>Windows</targetPlatform>

</extension>




The plugin-data.yaml contains this for PreventStandby


Slim::Plugin::PreventStandby::Plugin: 
  basedir: C:\Program Files\SlimServer7\server\Slim\Plugin\PreventStandby
  creator: Julian Neil, Slim Devices/Logitech
  description: PLUGIN_PREVENTSTANDBY_DESC
  email: support@slimdevices.com
  error: 0
  homepageURL: http://www.slimdevices.com/
  id: BFACABFD-6334-4743-95BA-43A60E159560
  module: Slim::Plugin::PreventStandby::Plugin
  name: PLUGIN_PREVENTSTANDBY
  optionsURL: slim://PreventStandby/content/settings.html
  state: 1
  targetApplication: 
    id: SlimServer
    maxVersion: 7.0+
    minVersion: 7.0a
  targetPlatform: Windows
  type: 2
  version: 1.0



...so it does seem like a specified file is not present.
Comment 4 KDF 2007-09-30 12:26:50 UTC
take the optionsURL line out of plugin-data.yaml and the settings link will be greyed out.
Comment 5 KDF 2007-09-30 15:54:41 UTC
fixed at change 13401
Comment 6 Mick 2007-10-01 02:00:38 UTC
Tested again

SqueezeCenter Version: 7.0 - 13344 - Windows XP - EN - cp1252
Server IP address: 163.33.84.62
Perl Version: 5.8.8 MSWin32-x86-multi-thread
MySQL Version: 5.0.22-community-nt


Windows/Classic skin.

When I go to the server settings, prevent standby does not have an item in the drop down menu like many of the other plugins, but if I go to extra's and click on the Jigsaw puzzle image, I still get

Settings | Disable | Enable 

buttons

My plugin-data.yaml looks like this now.

Slim::Plugin::PreventStandby::Plugin: 
  basedir: C:\Program Files\SlimServer\server\Slim\Plugin\PreventStandby
  creator: Julian Neil, Slim Devices/Logitech
  description: PLUGIN_PREVENTSTANDBY_DESC
  email: support@slimdevices.com
  error: 0
  homepageURL: http://www.slimdevices.com/
  id: BFACABFD-6334-4743-95BA-43A60E159560
  module: Slim::Plugin::PreventStandby::Plugin
  name: PLUGIN_PREVENTSTANDBY
  optionsURL: slim://PreventStandby/content/settings.html
  state: 1
  targetApplication: 
    id: SqueezeCenter
    maxVersion: 7.0+
    minVersion: 7.0a
  targetPlatform: Windows
  type: 2
  version: 1.0

Maybe the change didn't make it into the nightly.


Comment 7 KDF 2007-10-01 07:49:48 UTC
erase plugin-data.yaml and restart
Comment 8 Mick 2007-10-01 08:11:01 UTC
I'll need to wait for the next nightly, the 1-Oct nightly still has the install.xml for PreventStandby below.
I've made your change to my system and t fixes the inssue, but it hasn't made it to the install.xml on my system.
The nightly is only  up to change 13344

<?xml version="1.0"?>

<extension>
        <id>BFACABFD-6334-4743-95BA-43A60E159560</id>
        <name>PLUGIN_PREVENTSTANDBY</name>
        <module>Slim::Plugin::PreventStandby::Plugin</module>
        <version>1.0</version>
        <description>PLUGIN_PREVENTSTANDBY_DESC</description>
        <creator>Julian Neil, Slim Devices/Logitech</creator>
	<email>support@slimdevices.com</email>

	<defaultState>enabled</defaultState>
        
        <homepageURL>http://www.slimdevices.com/</homepageURL>
        <optionsURL>slim://PreventStandby/content/settings.html</optionsURL>
	<type>2</type><!-- type=extension -->

        <targetApplication>
  	        <id>SqueezeCenter</id>
                <minVersion>7.0a</minVersion>
                <maxVersion>7.0+</maxVersion>
        </targetApplication>

	<targetPlatform>Windows</targetPlatform>

</extension>
Comment 9 Mick 2007-10-01 08:15:47 UTC
Sorry to post again so soon. Just tested this change it works fine.
However, I still get a Settings button, that is enabled, but does nothing.

Should I raise a separate bug. Plugins with no <optionsURL> tag should result in the Setting button being disabled or not present at all. The current situation is confusing. There's a button that does nothing.
Comment 10 KDF 2007-10-01 08:20:21 UTC
that's not a bug.  the settings button is present, but greyed out.  Verified yet again on my setup.
if that's not the case make sure you've cleared the browser cache. 
Comment 11 Mick 2007-10-02 02:49:40 UTC
Created attachment 2205 [details]
Firefox screengrab

Screen grab of the settings page in Firefox with Firebug enabled.
Comment 12 Mick 2007-10-02 02:50:31 UTC
I've retested again using the 2-Oct windows nightly.
The Settings button does nothing, but is not correctly greyed out. I've inspected the HTML with firebug and the disabled tag is incorrect.

<tr id="PLUGIN_PREVENTSTANDBY-div" style="">
<td/>
<td>
<input type="button" disabled="" value="Settings"/>
<input id="PLUGIN_PREVENTSTANDBY.toggle" type="submit" value="Disable" name="PLUGIN_PREVENTSTANDBY.disable"/>
<input id="PLUGIN_PREVENTSTANDBY.uninstall" type="submit" value="Uninstall" name="PLUGIN_PREVENTSTANDBY.uninstall"/>
</td>

.. it should be 

<input type="button" disabled="true" value="Settings">

See attached image.
Comment 13 KDF 2007-10-02 08:15:06 UTC
I'm still not seeing any problem, but will reopen anyway. However, I admit that I have not checked the classic skin.
Comment 14 Mick 2007-10-02 08:36:35 UTC
Ok, so I've looked at Settings is disabled correctly in Default, but enabled in classic.

Didn't realise the skin would make a difference. Not a big deal. Maybe could be left as TODO.
Comment 15 KDF 2007-10-02 09:34:42 UTC
not sure what to say here.  Classic looks fine to me.  the code for the page is like so:

[% IF settings AND enabled %]

<input type="button" value="[% 'SETTINGS' | string %]" onClick="location.href='[% webroot %][% settings %][% IF player %]?player=[% playerURI %]&amp;playerid=[% playerURI %][% END %]'">

[% ELSE %]

<input type="button" value="[% 'SETTINGS' | string %]" disabled>

[% END %]

I don't know where you are getting this line from:
<input type="button" disabled="" value="Settings"/>

as the above would simply be an onClick link OR this:
<input type="button" value="Settings" disabled>

The only page that handles this template is HTML/EN/settings/server/plugins.html, so it shouldn't be skin dependent.  Perhaps something has been left behind from an earlier install (not that I can find anything in svn that shows a different version in the history), or a caching issue (albeit I can't explain how what you are seeing would have gotten into the cache). Are you able to find any copies of plugins.html in your HTML tree?  If so, where are they and can you attach them.
Comment 16 Chris Owens 2007-10-02 16:51:14 UTC
Ross, could you look at this and see how easy it is to reproduce?  We need to figure out if we need to fix this for 7.0.
Comment 17 Ross Levine 2007-10-02 17:05:31 UTC
I don't even see an 'extra' for prevent stand by in 7 trunk, was it removed?
Comment 18 KDF 2007-10-02 17:08:35 UTC
it is only enabled on windows, and only shows up under the settings page for extras as there is no ui for it.
Comment 19 Ross Levine 2007-10-02 17:20:12 UTC
Sorry but I'm a little confused. I'm using XP, I browse to SqueezeCenter settings, then Extras, and I see plugins but I do not see the prevent standby plugin. Should I see settings for prevent standby? 
Comment 20 KDF 2007-10-02 17:26:18 UTC
its one of the puzzle items on the SC Settings->Extras page, with the name "Windows: Prevent System Standby While Playing"
Comment 21 Ross Levine 2007-10-02 18:30:34 UTC
(In reply to comment #10)
>  the settings button is present, but greyed out.  Verified
> yet again on my setup.

Thank you KDF. I'm also seeing the button present, but greyed out, in both default and classic. 
Comment 22 Chris Owens 2007-10-04 09:55:51 UTC
Okay, so is there still really a bug here?  A grayed out button doesn't sound too bad.
Comment 23 KDF 2007-10-04 09:59:09 UTC
grayed out is what it is supposed to be.  Original reporter is not seeing that, despite everything else being equal.  I have no explanation and cannot reproduce. If the setting button is to be removed, that's an enhancement but I suspect that will not help in this specific case because the code presented from the page is already not something generated by the current server.
Comment 24 Chris Owens 2007-10-04 10:19:09 UTC
okay thanks KDF.  So the current bug, looking at Mick's posts, is that he has a button that looks normal but does nothing, when he should have a grayed-out button.  And you and we can't reproduce it.
Comment 25 KDF 2007-10-04 10:24:23 UTC
that's correct.  The source example posted doesn't look match up with what can be produced by the template (see comment 15).  Best I can suggest is to blow away the cache folder (Cache\templates, specifically) and perhaps even the HTML folder and reinstall to make sure there are no garbage templates floating about.  
Comment 26 Mick 2007-10-05 05:56:24 UTC
Ok, so the button behaves correctly on Windows IE7, but Firefox on the same machine sohws the button enabled.

The image I attached was in Firefox, with the buttons tag displayed in firebug.

Comment 27 KDF 2007-10-05 12:47:47 UTC
sorry, but I use firefox all the time, and it is greyed out here.  the word "settings" still shows through when using teh default skin (classic templates for settings), but the button style is faded out.  

I have no idea what firebug is doing with this, but it is most certainly NOT the real code.  Here is the source form http://localhost:9000/classic/settings/server/plugins.html:

			<tr id="PLUGIN_PREVENTSTANDBY-div" style="display: none;">
				<td>&nbsp;</td>
				<td>
					<input type="button" value="Settings" disabled>
					<!-- XXXX - need to check for pending uninstall / install -->

You button styles are also incorrect.  Are you running an old firefox?  are you blocking javascript? I'm sorry, but I really can't keep treating this as a bug.  It seems a setup issue somewhere.
Comment 28 KDF 2007-10-05 12:48:39 UTC
Created attachment 2219 [details]
firefox 2.0.0.7 capture, classic skin. WinXP SP2
Comment 29 Ross Levine 2007-11-27 15:50:43 UTC
Mick do you still see this? If not I'd like to close this bug. 
Comment 30 Blackketter Dean 2007-12-28 07:08:55 UTC
Appears to be resolved.  Please reopen if it's still happening.