You are here

[Fixed] Notepad++ update resets theme and settings

30 posts / 0 new
Last post
acicovic
Offline
Last seen: 3 months 5 days ago
Joined: 2015-11-05 02:43
[Fixed] Notepad++ update resets theme and settings

Hello there,

Lately, whenever I update Notepad++ (using the PortableApps platform) my theme and settings are reset to defaults.
Can you take a look at it?

Thanks!

sne
Offline
Last seen: 5 years 6 months ago
Joined: 2019-04-13 13:00
I have only been using

I have only been using PortableApps lauchner for a couple of days now and ran into the same issue.

I hope this is not a common problem, as retaining the configuration is the main reason why I m using portable apps.
So can anyone confirm if this is an expected behavior or a "defect".

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in Notepad++ Portable 7.6.6 Rev 2

This is fixed in today's release. Apologies for the inconvenience.

Sometimes, the impossible can become possible, if you're awesome!

RUDO
Offline
Last seen: 5 years 5 months ago
Joined: 2012-11-20 18:55
Not fixed - now made update,

Not fixed - now made update, does not work my theme and can not choose another in menue..?

[edit]

Why are there two folders with "Themes" - but I can not load any of the 20 included themes (Preferences / Styles / Theme) -> only "Default" available!
Z:\PortableApps\Notepad++Portable\Data\themes
Z:\PortableApps\Notepad++Portable\App\DefaultData\themes

File with user-config for design
"Z:\PortableApps\Notepad++Portable\App\Notepad++\stylers.xml"
should not be overwritten when updating...

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Any other files?

Odd, that file wasn't created for me when I customized a theme. Are there any other files that should be caught before I create a revision?

DefaultData is what it says, it's the default data the app uses on first run or if you delete the Data directory to reset it.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Should be working

I just checked and this all should already be handled. stylers.xml is moved back and forth to Data and is not overwritten on upgrades even if Notepad++ was unsafely exited.

Sometimes, the impossible can become possible, if you're awesome!

mrloyal1410
Offline
Last seen: 2 weeks 3 days ago
Joined: 2014-02-11 23:08
Not Fixed

It has not been fixed yet. I tried to install a new plugin, and it resets theme and settings.

acicovic
Offline
Last seen: 3 months 5 days ago
Joined: 2015-11-05 02:43
Bug is back

Was working for me. Today when updating to 7.8 the issue appeared again.

Edit: I'm not sure it changed the settings, but it surely changed the theme.

acicovic
Offline
Last seen: 3 months 5 days ago
Joined: 2015-11-05 02:43
Open session lost

As Issues have been increasing, I am considering searching for an alternative.

With latest update, not only theme was reset, but also opened unsaved files do not show up. I hope that data has not been lost. For anyone having the same issue, you should probably be able to recover your session from Notepad++Portable\App\Notepad++\backup.

Anton_D
Offline
Last seen: 8 months 2 weeks ago
Translator
Joined: 2018-01-20 12:43
A Theory, why files get lost

In my case, I also loose some setting in the case of plugins update. As somebody here already mentioned, my biggest impact is the loosing of the saved and unsaved files AKA session because the session.xml file get lost. I don’t customize the rest of the NP++ settings much, otherwise I would probably see more settings disappear. But lucky us, NP++ saves all the saved and unsaved files form the session in the backup directory and doesn’t override them, so the information is still here.

I think I have a theory, why do we have such issues with a new Plugin Admin. It bases on the art how NP++ made portable and the way the admin restarts the NP++ itself. It looks that somehow it is impossible to make the NP++ portable by just set the right path to the %APPDATA% location. So portable launcher have to put some setting files from the config directory direct to the NP++ program files directory just before the start of the NP++ binary itself. Those files are:

config.xml
contextMenu.xml
session.xml
shortcuts.xml
stylers.xml
plugins\config\converter.ini
plugins\config\nppPluginList.dll.

The maybe changed files are also removed from the NP++ program files directory back to the config directory after NP++ itself terminates and before portable launcher also exits. But this only happens in the case NP++ would be closed by the user.

In case of the Plugin Admin update the Admin itself restarts the NP++. So portable launcher registers the termination of the NP++ itself and removes all the files listed above. After that Plugin Admin starts the NP++ directly, without using the portable launcher. This way all the files from the above list are missed and therefore NP++ acts like on the first start, creating all of them. So all the changes are lost by now, in the case that user didn’t backup those files manually. This would also explain the disappearance of the Plugin Admin itself because of the missing .dll from the list.

The solution would be either some changes in the way NP++ made portable (move all the files in the application data directory and point here, monitor the restart of the NP++ through Plugin Admin or something else) or asking the NP++ developer to allow the manual restart of the NP++ instead of the automatic one. Maybe there are some other possible changes to the NP++ itself. Maybe there are some other way in case my theory is true.

Some threads about this issue:
https://portableapps.com/node/59896
https://portableapps.com/node/61516

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in 7.8.5 Rev 3

This is fixed again in today's release. Apologies for the regression in 7.8.5.

Sometimes, the impossible can become possible, if you're awesome!

lemerchand
Offline
Last seen: 4 years 6 months ago
Joined: 2020-03-29 17:37
Having the same issue

Hi there. I just downloaded and installed PortableApps today and after spending about an hour on theming Notepad++ lost it. This seems to happen whenever I install a new plugin.

Another weird behaviors include the PluginAdmin disappearing.

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
close and restart

After you use the plug-in manager, you must immediately close, wait, and restart notepad++ portable as mentioned on the app homepage.

Sometimes, the impossible can become possible, if you're awesome!

lemerchand
Offline
Last seen: 4 years 6 months ago
Joined: 2020-03-29 17:37
I've tried this several times

I've tried this several times and I can't seem to get it to work. This is very frustrating! I have also deleted and reinstalled.

Basically, my test case--now that I've lost about 2 hours of my day haha--is to change the background color. Then I will either Install or Uninstall a plugin.

The VERY MOMENT it restarts I exit. I hum to myself for about 10-15 seconds and run N++ again and the screen is back to white. I can also attest to loosing shortcut keys, and other settings.

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Lose Current

Try closing Notepad++ after making all the changes you'd like so it saves, then make plugin changes.

Notepad++ seems determined to escape any process containers when restarting after plugin changes making it difficult to handle.

Sometimes, the impossible can become possible, if you're awesome!

lemerchand
Offline
Last seen: 4 years 6 months ago
Joined: 2020-03-29 17:37
I still can't seem to get it

I still can't seem to get it to work :/

I probably won't be changing plugins after my initial setup--my bug concern is loosing the settings later--is there an easy way to back them up for a just-in-case?

lemerchand
Offline
Last seen: 4 years 6 months ago
Joined: 2020-03-29 17:37
One workaround

So here is something I tried that seemed to work for me.

After making desired customization you can go into **Preferences > Cloud** and set the location somewhere else. Then you can close out and reopen N++. After this I've had luck with installing/reinstalling plugins and NOT losing settings. This seems working fine, but I've still made a secondary "cloud" backup.

TL;DR You can make a quick n' easy "backup directory" with the Cloud section in Preferences. This can also serve to function as a new default settings directory (or so it seems to me)

etsebethm
Offline
Last seen: 4 years 5 months ago
Joined: 2020-04-28 07:06
NotePadd++ themes issue

Hi guys,

The issue of defaulting to the "stylers.xml" theme still exists in this latest version, but I found I can reproduce it.

Firstly, I installed to C:\Portable\NotePad++

If I open and change my theme, save my work and close it and then re-open directly from the particular or any saved document, it works as expected i.e. retains scheme, open documents etc.

However, the moment I pin the shortcut to the taskbar and then open it, it defaults to black on white and only find "stylers.xml" and none of the other themes.

So, I have to re-open, set the theme, save etc. And opening the document directly works again.

Thus, not sure what pinning it to taskbar does (I'm no Windows expert / lover), but that simple acts breaks it - until I set it again.

My solution, once set, don't pin it to taskbar.

At least, that works for me.

M.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 10 hours 8 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
Pinning to the taskbar is

Pinning to the taskbar via Windows is pinning the non-portable NotePad++ executable and ignoring the bits that make it portable.

If you use the Platform, you can right click on NotePad++ in the list and pin that way, which will do it correctly for you.

If you don't use the Platform you need to modify the link to point to the Notepad++\Notepad++Portable.exe instead of Notepad++\App\notepad++.exe

duttyend
Offline
Last seen: 1 week 5 days ago
Joined: 2016-11-08 12:04
Thank you very much for the

Thank you very much for the detailed explanation!

rbon
Offline
Last seen: 6 hours 24 min ago
Joined: 2011-04-30 13:26
Notepad++ and 'Plugin Admin' problem

The update of Notepad++ Portable I do it like this:
1. I am using last paf 'NotepadPlusPlusPortable_7.8.5_Rev_3.paf.exe' and I do a manual update with last 32-bit official build of Notepad++ (file npp.7.9.portable.zip).
2. I Update plugins
3. when the item 'Plugin Admin...' disappears, I copy from original file (npp.7.9.portable.zip) the file '\plugins\Config\nppPluginList.dll' and I put it in 'C:\PortableApps\Notepad++Portable\Data\Config\plugins\config'
4. so item 'Plugin Admin...' is visible again.

Maybe this can help.

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Fixed in 7.9.4

This should be properly fixed with today's release of Notepad++ Portable 7.9.4. There's a chance if your current one wasn't shut down properly that it will not work on this upgrade but should in the future. You can test this by reinstalling it over itself (which is what an upgrade does).

Sometimes, the impossible can become possible, if you're awesome!

Herrminator
Offline
Last seen: 3 years 2 weeks ago
Joined: 2011-04-04 11:23
Plugins with config sub-directories or different extensions

There might still be a problem with plugins that use sub-directories for their configurations such as "NppFTP" or "XPatherizer". These are not getting copied / moved.
I added those two manually to the [DirectoriesMove]-section of Notepad++Portable.ini and that seems to work properly.

The same is good for plugins that use configuration files with different extensions than .xml or .ini.
One such example is "CustomizeToolbar", which uses (at least) the extensions .dat and .btn.
Adding these to the [FilesMove]-section of Notepad++Portable.ini fixes the problem.

Hope this helps...

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Try This

Try using this in your Notepad++Portable.ini within App\AppInfo\Launcher:

[Launch]
ProgramExecutable=Notepad++\notepad++.exe
WaitForEXE1=GUP.exe
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryKeys]
-=HKLM\SOFTWARE\Classes\Notepad++_file

[FilesMove]
Config\session.xml=%PAL:AppDir%\Notepad++
Config\QuickText.ini=%PAL:AppDir%\Notepad++\plugins\QuickText
Config\*.ini=%PAL:AppDir%\Notepad++

[DirectoriesMove]
themes=%PAL:AppDir%\Notepad++\themes
Config\plugins\config=%PAL:AppDir%\Notepad++\plugins\config

[DirectoriesCleanupIfEmpty]
1=%APPDATA%\Notepad++\plugins
2=%APPDATA%\Notepad++

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\Config\session.xml
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\Config\session.xml
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\Config\session.xml
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\Config\plugins\config\Explorer.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\Config\plugins\config\Explorer.ini
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\Config\plugins\config\Explorer.ini
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\Config\LightExplorer.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite8]
Type=Replace
File=%PAL:DataDir%\Config\LightExplorer.ini
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite9]
Type=Replace
File=%PAL:DataDir%\Config\LightExplorer.ini
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite10]
Type=Replace
File=%PAL:DataDir%\Config\config.xml
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite11]
Type=Replace
File=%PAL:DataDir%\Config\config.xml
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite12]
Type=Replace
File=%PAL:DataDir%\Config\config.xml
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

[FileWrite13]
Type=Replace
File=%PAL:DataDir%\Config\shortcuts.xml
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite14]
Type=Replace
File=%PAL:DataDir%\Config\shortcuts.xml
Find=%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:PortableAppsBaseDir%\

[FileWrite15]
Type=Replace
File=%PAL:DataDir%\Config\shortcuts.xml
Find=%PAL:LastDrive%\
Replace=%PAL:Drive%\

This should work for everything. You'll still need to close and restart Notepad++ Portable after installing or updating plugins, though.

Sometimes, the impossible can become possible, if you're awesome!

Herrminator
Offline
Last seen: 3 years 2 weeks ago
Joined: 2011-04-04 11:23
Thank you!

Seems to work perfectly with npp 7.9.4 Rev 2!

I just thought, there was a special reason for treating the config files separately...

Thanks!

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Already Added

I did some more testing after I'd posted, this is the launcher ini from the Rev 2 release now.

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 1 week 6 days ago
Joined: 2019-03-22 09:18
I have just updated to 8.1.2

I have just updated to 8.1.2 (64-bit) and the issue still occurs. After the update, some settings for Zenburn theme I use, such as: the font name or the foreground/background colour of active tab text are back to default. I had the issue after the updates in the past. Any idea how to fix it?

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
How Are You Changing?

How are you changing the options in the Zenburn theme? Via the Style Configurator within Notepad++ or by editing the theme's XML directly?

Sometimes, the impossible can become possible, if you're awesome!

AbsolutelyRandom
Offline
Last seen: 1 week 6 days ago
Joined: 2019-03-22 09:18
I edit them within NP++

I edit them within NP++ (Settings/Style Configurator...)

John T. Haller
John T. Haller's picture
Online
Last seen: 29 min 56 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Make a Copy

In a behavior I can't understand, Notepad++ makes changes directly to its own theme XML files when you customize it in the Style Configurator. Those will get overwritten on each upgrade as Notepad++ makes changes to the base themes over time (last altered in May 2021). They're stored in Data to preserve any new themes you might add. To get around this strange behavior, while Notepad++ is closed, open up your Notepad++Portable\Data\themes directory. Copy and paste the Zenburn.xml file and name it Zenburn-custom.xml. Then open up Notepad++ Portable and select this new theme from the Style Configurator. You'll be able to customize it ongoing without it being overwritten. It won't get any updates from the publisher, of course, though the original Zenburn will. I've also added these details to the App Notes: https://portableapps.com/apps/development/notepadpp_portable#app-notes

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments