Issue 126952

Summary: Resetting the profile loses all macros (and events too?) (and on upgrade or re-install?)
Product: Installation Reporter: John <john.ha24>
Component: uiAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Normal    
Priority: P5 (lowest) CC: hanya.runo, john.ha24, mseidel, oliver.brinzing, orcmid
Version: 4.1.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description John 2016-05-04 06:30:15 UTC
When the user profile is reset, all macros stored in (W7) C:\Users\John\AppData\Roaming\OpenOffice\4\user\basic\Standard\Module1.xba are lost because the Module1.xba file containing them is replaced by a default, 2kB skeleton file. 

This may also happen when a user upgrades AOO or re-installs AOO.

Users reporting "strange problems" in the forum are often advised to reset their profile as this seems magically to fix their "strange problem". For example, if the spellchecker fails and all words are marked as wrong, resetting the profile fixes it - eg see [Solved] Spellcheck not working?? https://forum.openoffice.org/en/forum/viewtopic.php?f=7&t=46995 viewed over 100,000 times. 

The instructions given are either to follow this [Tutorial] The OpenOffice User Profile https://forum.openoffice.org/en/forum/viewtopic.php?f=74&t=12426 or, simply, to save a copy of the profile, delete registrymodifications.xcu, restart AOO, and copy back the Profile folders.  

I also think resetting the Profile deletes any Events set up under Tools > Customise > Events ...
Comment 1 hanya 2016-05-04 12:16:34 UTC
I have described about this problem in: https://forum.openoffice.org/en/forum/viewtopic.php?f=106&t=54784
If registrymodifications.xcu file is not exist, the office copies "presets" files 
from shared files. At that time, if file name conflicts each other such as Standard/Module1, 
these files lost. Other files are still there but not listed in the listing file 
and not shown in the macro list. The existing files can be taken back by 
modifying script.xlc and dialog.xlc files and also, Standard/dialog.xlb and script.xlb files 
according to https://wiki.openoffice.org/wiki/Documentation/Administration_Guide/Using_Custom_Macros_and_Libraries

The source code to copy the presets file is there in desktop::create_user_install funtion of main/desktop/source/app/userinstall.cxx.
Comment 2 orcmid 2016-05-04 16:56:23 UTC
I believe that is why the best recommendation is to rename the profile in order to protect against loss of items that the user may want to restore.

The problem we have is that there are different remedies for expert users than for casual users, all of whom can be hit by the same problem.

So, if we use the expert practice as a one-size fits all, we are not serving casual users.

One way would be to provide the first-order delete case, a second-order rename and delete case, and enough third-order drill down so more-expert users could find what they need that satisfies their more-advanced needs for preservation of material from a rebuilt profile.

We're talking about significant documentation and How To walk-throughs, for essentially (versions of) three platforms.  The acute case is Windows XP through Windows 10, covering 87% of our millions of users.

That could be done, in a durable place that is maintained and made current as there are changes in platforms and in AOO.

There could also be evolution of utility support for these situations, as raised in Issue 126945.  Both would be valuable, since there would need to be good documentation backup to any utility that provides user-profile maintenance.

Are we talking about a defect here or looking at an enhancement to user-supporting information and tools?
Comment 3 orcmid 2016-05-04 17:01:24 UTC
(In reply to orcmid from comment #2)
> There could also be evolution of utility support for these situations, as
> raised in Issue 126945.  Both would be valuable, since there would need to
> be good documentation backup to any utility that provides user-profile
> maintenance.
> 
> Are we talking about a defect here or looking at an enhancement to
> user-supporting information and tools?

What fascinates me about this line of inquiry is that it does not depend so much on the capacity, capability, and commitment of core developers that the project simply does not have.  We have no idea when, if ever, we come up with code modifications that eliminate profile corruption.

On the other hand, this help in manually and tool-aided remedies does not require skills that appear to be unavailable.
Comment 4 John 2016-05-04 18:04:14 UTC
I was raising this as problem where AOO silently deletes user macros and/or configuration data without warning and without keeping a backup of the deleted file.  I fortunately was backing up the profile witgh my normal backup when it frst happened to me.

My experience is that the profile folders themselves are rarely damaged - what does seem to get broken is registrymodifications.xcu.  Should the default action therefore be not to overwrite the folders?

Or could a simple implementation be to check when rewriting the profile to see if the existing files are different from those about to be written back.  If so, the user presumably has some information stored in them so ask him if he wants to keep them.  If he says no, then save the current information as a backup, and restore back the new file.

It is more of a wish list than a "it affects lots of users now".  People only usually reset the profile following guidance from the forum where the advice is rename ...\user to ...\user_old so that lost data can be copied back.
Comment 5 Oliver Brinzing 2016-05-05 14:34:58 UTC
.