Created attachment 113381 [details] Menubar screenshot After "Show Menubar" button was added to Main Toolbar or the button was triggered (did not notice when exactly) some 1st level items of the menubar are labeled as "No text".
Resetting the toolbar configuration to defaults solves the problem.
same here
Created attachment 116435 [details] Screenshot of empty menubar
Adding some more information and a +1 to this. Okular 1.1.3 Kubuntu 17.10 KDE Plasma 5.12.4 KDE Frameworks 5.44.0 QT 5.9.1 Steps to reproduce: 1. Open Okular 2. Click "Settings" and deactivate "Show menubar" 3. Right-click the toolbar and select "Configure Toolbars" 4. Scroll to "Show Menubar" in the "Available actions" section 5. Click the right arrow (">") to add it to the "Current actions" section 6. Click "Apply" 7. Click "OK" -- The menubar is replaced with a blank bar -- 8. Activate the "Show menubar" button -- The menubar has mislabelled first-level items, some are labelled "No Text". -- 9. Right-click the toolbar and select "Configure Toolbars" 10. Click "Defaults" 11. Click "Reset" -- The menubar is restored and functions properly --
Created attachment 119397 [details] Also broken in global menu I'm experiencing the same problem as Evgenii. I'm using the global menu (menu bar at the top of the screen instead of inside the window), instead of "File", "Settings" and "Help", it says "No text" ("Kein Text" in my case, since I've set it to German)
Can anyone reproduce this in modern versions?
Still happens in version 1.6.3. I also tried the git repository, happens there too.
Yeah but this is 99.9999% not a bug in Okular, what i mean is modern versions of KF5/Plasma/Qt
I‘m currently on KF 5.56, I‘ll report back as soon as I get 5.57, which should happen in the next few days
5.56 should be good. What's your plasma and Qt5?
Plasma 5.15.4 and Qt 5.12.2
Interesting, you mention the global menu, do you have this issue without the global menu?
Yes. Also: `journalctl` does not return helpful results. If there are other logs that could help, I'm happy to send them
Can you send your .local/share/kxmlgui5/okular/part.rc file over? Do you remember doing any customization to your menus/toolbar/shortcuts? Can you confirm that removing your .local/share/kxmlgui5/okular/part.rc file (save it first somewhere else) fixes this?
Created attachment 119560 [details] My shell.rc file. Renaming it to something else solves the problem Renaming part.rc does nothing. However, renaming shell.rc solves the problem. It did not appear again when launching Okular.
I have the same issue in the titlebar menu button, but also appears in normal menu bars. KDE Neon 5.15.4 KDE Frameworks 5.57.0 Qt 5.12.0 Okular 1.7.0 Renaming shell.rc or both files solves the problem. Renaming only part.rc doesn’t. I already had this problem when I started to use KDE Neon & KF5, approximately the same time as Evgenii.
Created attachment 119990 [details] No Text causing shell.rc from David Hurka I didn’t attach my file in the last comment, here it is. Differs from Jan’s shell.rc in the DOCTYPE: kpartgui instead of gui. Is very similar to the shell.rc found in okular’s git repository, but with Open action added to toolbar, some noMerge="1", and SYSTEM "kpartgui.dtd". The shell.rc from the repository works fine, while the attached shell.rc causes No Text. Removing an noMerge="1" from the attached shell.rc file fixed the corresponding No Text entry. Jan’s file, in contrast, looks like the shell.rc files, which are saved by Okular when I put actions into the toolbar. (Okular creates gui files instead of kpartgui files. Why?) Additionally, I observed that No Text menus don’t contain shell actions, but only part actions.
I found this bug independently, with a slightly different procedure. 1. Open Okular, Configure Toolbars dialog. 2. Add "About KDE" to Main Toolbar <okular_shell>. 3. Press Apply, which creates ~/.local/share/kxmlgui5/okular/shell.rc. Editing ~/.local/share/kxmlgui5/okular/shell.rc and removing noMerge="1" fixes this issue. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 18.04 (available in About System) KDE Plasma Version: 5.12.7 KDE Frameworks Version: 5.44.0 Qt Version: 5.9.5 -------- I installed Flatpak Okular 1.7.0, as a comparison. For some reason, Flatpak Okular looks normal with shell.rc present and noMerge="1", but the File menu items are ordered incorrectly with noMerge="1" removed: Import PostScript as PDF --- Save Save As Reload Open Open Recent ... full screenshot at https://cdn.discordapp.com/attachments/552027497592782850/577784158764662784/okular_flatpak_without_noMerge.png Flatpak versions: org.kde.okular/x86_64/stable org.kde.Platform/x86_64/5.12
(In reply to jimbo1qaz from comment #18) > I found this bug independently, with a slightly different procedure. > > 1. Open Okular, Configure Toolbars dialog. > 2. Add "About KDE" to Main Toolbar <okular_shell>. > 3. Press Apply, which creates ~/.local/share/kxmlgui5/okular/shell.rc. You mean this three steps gives you a "No text" menubar? Can the rest of you reproduce this? I can't, just works fine for me
> Can the rest of you reproduce this? I can't, with Okular from git master on up-to-date Debian testing.
(In reply to Albert Astals Cid from comment #19) > (In reply to jimbo1qaz from comment #18) > > I found this bug independently, with a slightly different procedure. > > > > 1. Open Okular, Configure Toolbars dialog. > > 2. Add "About KDE" to Main Toolbar <okular_shell>. > > 3. Press Apply, which creates ~/.local/share/kxmlgui5/okular/shell.rc. > > You mean this three steps gives you a "No text" menubar? > > Can the rest of you reproduce this? > > I can't, just works fine for me I uploaded 3 different versions of my shell.rc at https://gist.github.com/jimbo1qaz/a8a1aaabe51eff8f0d95c20aa9b4b3b3 The long file contains noMerge="1" and <text> and <Action...> tags. It works fine, and I'm using it now. ------ The short file's <Menu> groups are empty, except for <DefineGroup> tags. They're missing both the menu name <text>, and the menu item <Action>. Okular 1.5.70 (Kubuntu 18.04) generated them with noMerge="1" *present*, causing the bug. The version I uploaded, I manually removed noMerge="1" to fix the issue. ------ I also attached unmodified /usr/share/kxmlgui5/okular/shell.rc, which looks very similar to the short file, but is missing noMerge="1" (but it's still present in <ToolBar>). ------ I think flatpak 1.7.0 and versions are irrelevant. Okular usually generates the long file for me, but sometimes (twice so far, both times in Ubuntu 18.04) generates the short (broken) file. I'm not sure what causes the short file to be generated, and when I tried reproducing the bug, it produced the long (ok) file instead. ## Another possible issue Long files store the menu layout in ~/.local, and noMerge="1" causes it to ignore Okular's built-in settings (for some reason, /usr/share/kxmlgui5/okular/shell.rc does NOT contain <text> or <Action>). Does that mean that upgrading Okular's /usr/ will not upgrade the menu, since Okular uses the ~/.local menu layout generated by old Okular?
Yes, files in ~/.local override files in /usr.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
lemme clear NEEDSINFO, some people have responded, and I have supplied an investigation of the issue (but not why the GUI editor writes a file in a corrupted state).
The big question is, anyone has any idea how you ended up with those corrupted shell.rc files in your .local ? Any of you did any kind of menu costumization that you remember either now or in the past?
(In reply to Albert Astals Cid from comment #25) > [...] any idea how you ended up with those > corrupted shell.rc files in your .local ? Surely I did toolbar customisation everytime before this happened, always through Configure Toolbars..., never any other way. But I don’t have any idea what special toolbar button could have caused this. Usually I have some actions from submenus in the toolbar (such as Fit Page), but I’m sure that I didn’t use any action from the shell back then.
*** Bug 414936 has been marked as a duplicate of this bug. ***
A similar bug with the same root cause appears to sporadically happen on Gwenview too. https://www.reddit.com/r/kde/comments/ezzd8x/gwenview_no_text_in_menu_bar_jpeg_save_quality/
*** Bug 396761 has been marked as a duplicate of this bug. ***
*** Bug 418561 has been marked as a duplicate of this bug. ***
This bug caught me again. I edited the toolbar several times, ant the last time I edited it the menubar broke with “No Text”. The last edit was the first edit which involved a Shell action, “Open Recent”. So it appears that only editing the shell toolbar causes this bug, which matches the previous reports, and the fact that shell.rc gets corrupted. Additionally, all shell actions are now missing in the affected menus, which is pretty problematic. Interestingly, the View menu, wich holds the Fullscreen action, is not affected. This is probably because the View menu is not specified in shell.rc by default, but created purely automatically. Another worrying thing is that Okular crashes at startup if shell.rc is not well-formed. Debugging this today wasn’t very successful. It appears that the <Menu noMerge="1"> attribute causes the problem. Sometimes after Configure Toolbars the shell.rc is not expanded to contain all KStandardActions, and with noMerge they are not added automatically. The “No Text” comes from the <Menu><Text/></Menu> tag missing, if noMerge="1" is present. Sometimes after Configure Toolbars the shell.rc is expanded, and everything is fine. I don’t know how to fix this now. First problem is that this bug does not reproduce everytime. Second problem is that there are these options: a) Prevent Configure Shortcuts from creating noMerge="1". The problem is, that without noMerge and with all actions specified explicitely, the explicitely specified actions and the automatically merged (?) KStandardActions kick each other arround, and the menu becomes jumbled up. b) Force Configure Shortcuts to expand shell.rc to include all actions and noMerge everytime. Problem is... is there a problem? At least I don’t know how to fix Configure Shortcuts. c) Include all actions and noMerge in the source shell.rc. This way, Configure Shortcuts will (theoretically) always end up with the fully expanded file. Problem is that we will explicitely specify all action positions, so they will not follow updates to KStandardAction, like happened with the Fullscreed action. But at least we will know when to update the Okular docbook. d) Remove all menu definitions from the source shell.rc. This was an experiment by mine. It turns out that, despite the <DefineGroup/> tags are missing, KXmlGui will automatically populate the menus in the intended way, and create an expanded shell.rc as soon as the toolbar is edited. Because shell.rc is empty by default, Configure Shortcuts has no other option than generating the expanded file itself. Our options are basically: 1) Expand the source shell.rc to include all actions and noMerge. 2) Collapse the source shell.rc to include nothing. 3) Make this an upstream bug and assign it to KXmlGui. I prefer option 2.
(In reply to David Hurka from comment #31) > Our options are basically: > 1) Expand the source shell.rc to include all actions and noMerge. > 2) Collapse the source shell.rc to include nothing. > 3) Make this an upstream bug and assign it to KXmlGui. > > I prefer option 2. Since 1 and 2 are wrong (what about the other users of the okular part?) The only solution is 3, or rather 4) Fix the bug in kxmlgui, don't expect others to fix it for you ;) But not being able to reproduce it, it's really a problem here. David are you running a modern enough KDE Frameworks?
(In reply to David Hurka from comment #31) > Our options are basically: > 1) Expand the source shell.rc to include all actions and noMerge. > 2) Collapse the source shell.rc to include nothing. > 3) Make this an upstream bug and assign it to KXmlGui. > > I prefer option 2. Since 1 and 2 are wrong (what about the other users of the okular part?) The only solution is 3, or rather 4) Fix the bug in kxmlgui, don't expect others to fix it for you ;) But not being able to reproduce it, it's really a problem here. David are you running a modern enough KDE Frameworks? (In reply to Albert Astals Cid from comment #32) > (In reply to David Hurka from comment #31) > > Our options are basically: > > 1) Expand the source shell.rc to include all actions and noMerge. > > 2) Collapse the source shell.rc to include nothing. > > 3) Make this an upstream bug and assign it to KXmlGui. > > > > I prefer option 2. > > Since 1 and 2 are wrong (what about the other users of the okular part?) > > The only solution is 3, or rather 4) Fix the bug in kxmlgui, don't expect > others to fix it for you ;) > > But not being able to reproduce it, it's really a problem here. > > David are you running a modern enough KDE Frameworks? Also, does the "No text" appear immediately when editing the toolbars or needs an okular restart to be seen?
It was a year or two ago since I last encountered this bug, but if I recall correctly, the "No text" appeared as soon as you hit Apply, not after restarting.
(In reply to Albert Astals Cid from comment #32) > (In reply to David Hurka from comment #31) > > Our options are basically: > > 1) Expand the source shell.rc to include all actions and noMerge. > > 2) Collapse the source shell.rc to include nothing. > > 3) Make this an upstream bug and assign it to KXmlGui. > > > > I prefer option 2. > > Since 1 and 2 are wrong (what about the other users of the okular part?) What do you mean with “other users of the okular part”? They shouldn’t be affected by shell.rc, right? So I don’t understand why these options are wrong. > David are you running a modern enough KDE Frameworks? Yes, my KF5 is “modern enough”. :) > Also, does the "No text" appear immediately when editing the toolbars or needs an okular restart to be seen? Sorry, can’t reproduce... But IIRC it appeared immediately.
(In reply to David Hurka from comment #35) > (In reply to Albert Astals Cid from comment #32) > > (In reply to David Hurka from comment #31) > > > Our options are basically: > > > 1) Expand the source shell.rc to include all actions and noMerge. > > > 2) Collapse the source shell.rc to include nothing. > > > 3) Make this an upstream bug and assign it to KXmlGui. > > > > > > I prefer option 2. > > > > Since 1 and 2 are wrong (what about the other users of the okular part?) > > What do you mean with “other users of the okular part”? They shouldn’t be > affected by shell.rc, right? So I don’t understand why these options are > wrong. Well, in option 1 you mean keeping the part.rc intact and then copying all the options to shell.rc? That would work for Okular, but would still cause problems in other apps that use the part, no?
> Well, in option 1 you mean keeping the part.rc intact and then copying all the options to shell.rc? No, I don’t mean to copy actions from part.rc to shell.rc. I think we tracked this bug down to shell.rc, so I don’t want to touch part.rc. When Configure Toolbars correctly modifies shell.rc, it includes all the shell actions in there, and no part actions. My suggestion is to include all shell actions by default in shell.rc. Of course we could look at KXMLGui, why it is confused by DefineGroup tags and clumsily deactivates them with noMerge, like already described by nyanpasu64. Since a Gwenview bug has been marked as duplicate of this Okular bug, we should maybe look at KXMLGui. That could also give us some answers about the annotation toolbar in part.rc. Interestingly, Gwenview does not use any <DefineGroup/>.
Created attachment 131358 [details] Gwenview on neon unstable A few days ago I added "Sort by" button to toolbar of Gwenview and yesterday I noticed some "No text" entries in the menu bar. Reseting toolbar settings fixed the bug. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.19.80 KDE Frameworks Version: 5.74.0 Qt Version: 5.14.2
Can confirm it on: Operating System: Manjaro Linux KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.73.0 Qt Version: 5.15.0 Okular 20.08.1
> Resetting toolbar settings fixed the bug. For me too.
*** Bug 427276 has been marked as a duplicate of this bug. ***
*** Bug 428629 has been marked as a duplicate of this bug. ***
> The big question is, anyone has any idea how you ended up with those corrupted shell.rc files in your .local ? Seems to happen to users all the time over the last 2 years. Deleting ~/.local/share/kxmlgui5/okular/shell.rc helped. Why can't the KDE devs just NOT LOAD this file? I bet you're caught up in your endless, fractal complexity, with nobody around to fix or analyze it...
(In reply to nfxjfg from comment #43) > bet you're caught up in your endless, > fractal complexity, with nobody around to fix or analyze it... If you're not going to be constructive, shut up.
*** Bug 429570 has been marked as a duplicate of this bug. ***
*** Bug 431685 has been marked as a duplicate of this bug. ***
*** Bug 436048 has been marked as a duplicate of this bug. ***
Is it a good idea to add extra debugging/logging/assertion code to released versions of KXmlGui, or KDE Neon's dev builds, to help catch and record information about the bug in the wild when it occurs?
*** Bug 440785 has been marked as a duplicate of this bug. ***
I solved my problem by removing "~/.local/share/kxmlgui5/okular/shell.rc" file then Okular showed the correct menu entries, but that removed file is never recreated again.
*** Bug 442777 has been marked as a duplicate of this bug. ***
Is it justified to enable verbose logging in kxmlgui's editing functionality in production, and ask users who hit this bug to upload their log files? A few days ago I took a stab at debugging what happened, but I don't fully understand the code, and since I can't reproduce the bug on demand, I don't know what state and control flow caused the base settings to not be merged into the customizations when computing and/or writing out new customizations.
(In reply to medin from comment #50) > I solved my problem by removing "~/.local/share/kxmlgui5/okular/shell.rc" > file then Okular showed the correct menu entries, but that removed file is > never recreated again. Seeing this again in 23.08.1.
(In reply to medin from comment #50) > I solved my problem by removing "~/.local/share/kxmlgui5/okular/shell.rc" > file then Okular showed the correct menu entries, but that removed file is > never recreated again. In my case the file was recreated. Okular 23.08.1.
(In reply to cipricus from comment #54) > (In reply to medin from comment #50) > > I solved my problem by removing "~/.local/share/kxmlgui5/okular/shell.rc" > > file then Okular showed the correct menu entries, but that removed file is > > never recreated again. > > In my case the file was recreated. Okular 23.08.1. Kubuntu 23.10. The problem is also recurrent. I have removed the whole "~/.local/share/kxmlgui5/okular/" folder yesterday to fix the problem and now the problem and the folder is in place with both files part.rc and shell.rc. I think that what causes this is the configuring of the toolbar (adding buttons). I'll test that leaving it default is a "solution".
(In reply to Albert Astals Cid from comment #14) > Can you send your .local/share/kxmlgui5/okular/part.rc file over? > > Do you remember doing any customization to your menus/toolbar/shortcuts? > > Can you confirm that removing your .local/share/kxmlgui5/okular/part.rc file > (save it first somewhere else) fixes this? I can confirm that on at least one occasion removing just part.rc file fixed it, and that on at least another one occasion I had to delete the shell.rc too (or maybe only that should have been removed, something confirmed by people on a reddit afaicr). Re-setting to defaults (Settings-Configure toolbars-Default) fixes it too, because that removes both files.
> Editing ~/.local/share/kxmlgui5/okular/shell.rc and removing noMerge="1" > fixes this issue. In that file I have 5 occurrences: `<Menu noMerge="1" name="file" alreadyVisited="1">` line 4 ` <Menu noMerge="1" name="view">` line 20 <Menu noMerge="1" name="settings" alreadyVisited="1"> line 25 <Menu noMerge="1" name="settings" alreadyVisited="1"> line 38 <Menu noMerge="1" name="help" alreadyVisited="1"> line 53 What should I remove to fix it? Is that a permanent fix, so I don't have to reset my toolbar?