Bug 369063 - The Digital Clock's "Show seconds" setting and other settings are not preserved after restart
Summary: The Digital Clock's "Show seconds" setting and other settings are not preserv...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Digital Clock (show other bugs)
Version: 5.7.95
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-19 16:23 UTC by Shlomi Fish
Modified: 2016-09-20 07:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/config/main.xml file (2.92 KB, text/plain)
2016-09-19 16:55 UTC, Shlomi Fish
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shlomi Fish 2016-09-19 16:23:23 UTC
Starting the digital clock from the command line and doing "right click"-> Digital Clock settings -> Turn on "Show seconds" does not make it stick in the next invocation. It also happens with the clock applet in the taskbar.

Here are the shell errors:
 
shlomif@telaviv1:~$ LANG=C plasmawindowed org.kde.plasma.digitalclock
org.kde.plasma: requesting config for "Digital Clock" without a containment!
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/main.qml:95: Error: Cannot assign [undefined] to QStringList
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/Tooltip.qml:106: TypeError: Cannot read property 'length' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/Tooltip.qml:116: TypeError: Cannot read property 'length' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/main.qml:37: TypeError: Cannot read property 'DateTime' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/main.qml:62:27: Unable to assign [undefined] to QStringList
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:519: TypeError: Cannot read property 'Timezone City' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:519: TypeError: Cannot read property 'Timezone City' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:612: TypeError: Cannot call method 'sort' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:48:32: Unable to assign [undefined] to int
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:47:42: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:46:43: Unable to assign [undefined] to QString
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:34:38: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:33:32: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:416: TypeError: Cannot read property 'DateTime' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:410:25: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:35:29: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:519: TypeError: Cannot read property 'Timezone City' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:519: TypeError: Cannot read property 'Timezone City' of undefined
shlomif@telaviv1:~$ LANG=C plasmawindowed org.kde.plasma.digitalclock
org.kde.plasma: requesting config for "Digital Clock" without a containment!
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/main.qml:95: Error: Cannot assign [undefined] to QStringList                         
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/Tooltip.qml:106: TypeError: Cannot read property 'length' of undefined               
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/Tooltip.qml:116: TypeError: Cannot read property 'length' of undefined               
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/main.qml:37: TypeError: Cannot read property 'DateTime' of undefined                 
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/main.qml:62:27: Unable to assign [undefined] to QStringList                          
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:519: TypeError: Cannot read property 'Timezone City' of undefined   
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:519: TypeError: Cannot read property 'Timezone City' of undefined   
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:612: TypeError: Cannot call method 'sort' of undefined              
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:48:32: Unable to assign [undefined] to int
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:47:42: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:46:43: Unable to assign [undefined] to QString
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:34:38: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:33:32: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:416: TypeError: Cannot read property 'DateTime' of undefined
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:410:25: Unable to assign [undefined] to bool
file:///usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/ui/DigitalClock.qml:35:29: Unable to assign [undefined] to bool
shlomif@telaviv1:~$ 


Reproducible: Always

Steps to Reproduce:
1. LANG=C plasmawindowed org.kde.plasma.digitalclock
2. Toggle the setting.
3. Exit.
4. LANG=C plasmawindowed org.kde.plasma.digitalclock again.

Actual Results:  
The setting is not preserved.

Expected Results:  
The setting should be preserved.

I'm on mageia 6 x86-64.
Comment 1 David Edmundson 2016-09-19 16:33:59 UTC
can you send me your /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/config/main.xml please
Comment 2 Shlomi Fish 2016-09-19 16:55:09 UTC
Created attachment 101180 [details]
The /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/config/main.xml file

This is the main.xml file per David's request.
Comment 3 Shlomi Fish 2016-09-19 16:55:46 UTC
(In reply to David Edmundson from comment #1)
> can you send me your
> /usr/share/plasma/plasmoids/org.kde.plasma.digitalclock/contents/config/main.
> xml please
Hi!

I attached it.
Comment 4 Shlomi Fish 2016-09-19 18:17:27 UTC
David Edmundson: do you need anything more from me?
Comment 5 David Edmundson 2016-09-20 01:47:21 UTC
Remove the first letter of that file.

It's something that I broke and immediately fixed, but did so about the time the beta was made.

Thanks
Comment 6 Shlomi Fish 2016-09-20 07:03:36 UTC
(In reply to David Edmundson from comment #5)
> Remove the first letter of that file.
> 
> It's something that I broke and immediately fixed, but did so about the time
> the beta was made.
> 
> Thanks

Thanks for the tip - doing that seems to correct the problem here.

That put aside, the original main.xml does not even validate as valid XML:

<<<
shlomif@telaviv1:~$ xmllint main.xml
main.xml:1: parser error : Start tag expected, '<' not found
c<?xml version="1.0" encoding="UTF-8"?>
^
shlomif@telaviv1:~$ 
>>>

So why did the applet, the build system, automated tests, version control hooks, etc. did not report it as such and instead let the applet's functionality completely break? Seems like there should be some preventative measures for that in the future.