Bug 504343 - Adding blank "System Monitor Sensor" widgets via click (not drag-and-drop) is broken
Summary: Adding blank "System Monitor Sensor" widgets via click (not drag-and-drop) is...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Monitor widgets (other bugs)
Version First Reported In: 6.3.90
Platform: Other Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-05-16 15:40 UTC by Nate Graham
Modified: 2025-05-16 21:22 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2025-05-16 15:40:11 UTC
STEPS TO REPRODUCE
1. Right-click Desktop > Enter Edit Mode
2. Add or Manage Widgets…
3. Search for "system monitor sensor" and click on it


OBSERVED RESULT
The System Monitor Sensor widget added to the desktop is tiny and empty. The journal log says this:

May 16 09:35:53 Liberator plasmashell[2339]: -------->  load applet:  "org.kde.plasma.systemmonitor"  relpath:  "plasma/plasmoids/org.kde.plasma.systemmonitor"
May 16 09:35:53 Liberator plasmashell[2339]: file:///home/nate/kde/usr/share/plasma/plasmoids/org.kde.plasma.systemmonitor/contents/ui/FullRepresentation.qml:47: TypeError: Cannot read property 'fullRepresentation' of undefined
May 16 09:35:53 Liberator plasmashell[2339]: file:///home/nate/kde/usr/share/plasma/plasmoids/org.kde.plasma.systemmonitor/contents/ui/FullRepresentation.qml:36: TypeError: Cannot read property 'fullRepresentation' of undefined

Trying to configure it leads to a configuration window with blank pages.


EXPECTED RESULT
It works!


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.3.90
KDE Frameworks Version: 6.15.0
Qt Version: 6.9.0
Kernel Version: 6.14.6-300.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7840U w/ Radeon™ 780M Graphics
Memory: 16 GiB of RAM (14.9 GiB usable)
Graphics Processor: AMD Radeon 780M
Comment 1 Nate Graham 2025-05-16 15:45:36 UTC
The pre-made widgets work; it's only the blank one that's broken.
Comment 2 cwo 2025-05-16 16:06:56 UTC
Can reproduce.

Note that only adding them by clicking in the WidgetExplorer is broken, if I drag&drop them there, it works as usual.
Comment 3 Nate Graham 2025-05-16 16:14:07 UTC
Fascinating. I can reproduce that too.
Comment 4 cwo 2025-05-16 16:15:44 UTC
(In reply to cwo from comment #2)
> Note that only adding them by clicking in the WidgetExplorer is broken, if I
> drag&drop them there, it works as usual.

Don't try it with a panel, it won't show up at all.
Comment 5 Bug Janitor Service 2025-05-16 19:18:29 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/libplasma/-/merge_requests/1311
Comment 6 cwo 2025-05-16 21:04:08 UTC
Git commit 0db46b7c5cc3e429b293daa1d12036ceddb90d79 by Christoph Wolk.
Committed on 16/05/2025 at 20:59.
Pushed by cwo into branch 'master'.

plasma/pluginloader: actually use pluginName when loading plugins

loadApplet takes the plugin name either as an applet name or as a full
path, but KPluginMetaData only wants the actual name. So we save the
plugin name in pluginName, then ignore it and use the original argument
anyway. WidgetExplorer, when clicking the applet, sends the path, so all
Kpackage + plugin widgets added this way are considered qml-only plugins
and their applet code isn't started (unless they have a parent plugin,
as the rootpath metadata is the name, or Plasma is restarted and the
name is read from appletsrc).

Instead we actually use the variable we computed and everything works
again.

M  +1    -1    src/plasma/pluginloader.cpp

https://invent.kde.org/plasma/libplasma/-/commit/0db46b7c5cc3e429b293daa1d12036ceddb90d79
Comment 7 cwo 2025-05-16 21:22:18 UTC
Git commit 21302cc897723992e964123d073641f7ecc642ae by Christoph Wolk.
Committed on 16/05/2025 at 21:18.
Pushed by cwo into branch 'Plasma/6.4'.

plasma/pluginloader: actually use pluginName when loading plugins

loadApplet takes the plugin name either as an applet name or as a full
path, but KPluginMetaData only wants the actual name. So we save the
plugin name in pluginName, then ignore it and use the original argument
anyway. WidgetExplorer, when clicking the applet, sends the path, so all
Kpackage + plugin widgets added this way are considered qml-only plugins
and their applet code isn't started (unless they have a parent plugin,
as the rootpath metadata is the name, or Plasma is restarted and the
name is read from appletsrc).

Instead we actually use the variable we computed and everything works
again.


(cherry picked from commit 0db46b7c5cc3e429b293daa1d12036ceddb90d79)

Co-authored-by: Christoph Wolk <cwo.kde@posteo.net>

M  +1    -1    src/plasma/pluginloader.cpp

https://invent.kde.org/plasma/libplasma/-/commit/21302cc897723992e964123d073641f7ecc642ae