Issue 80296 - Reinstallation of an addon does not activate the new version completely.
Summary: Reinstallation of an addon does not activate the new version completely.
Status: CLOSED DUPLICATE of issue 101955
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 680m222
Hardware: All All
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: Stephan Bergmann
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-02 16:17 UTC by mikhail.voytenko
Modified: 2013-08-07 15:31 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
The first version of the addon. (5.54 KB, application/octet-stream)
2007-08-02 16:19 UTC, mikhail.voytenko
no flags Details
The second version of the addon. (5.56 KB, application/octet-stream)
2007-08-02 16:20 UTC, mikhail.voytenko
no flags Details
The netbeans project of the first version of addon. (571.49 KB, application/octet-stream)
2007-08-02 16:24 UTC, mikhail.voytenko
no flags Details
The netbeans project of the second version of addon. (571.55 KB, application/octet-stream)
2007-08-02 16:25 UTC, mikhail.voytenko
no flags Details
extensiondialog_1 (12.41 KB, application/x-compressed)
2007-11-06 06:58 UTC, Oliver Brinzing
no flags Details
extensiondialog_2 (12.45 KB, application/x-compressed)
2007-11-06 06:59 UTC, Oliver Brinzing
no flags Details
org.openoffice.desktop.deployment.options.ExtensionData.dat (649 bytes, application/octet-stream)
2007-11-06 07:00 UTC, Oliver Brinzing
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mikhail.voytenko 2007-08-02 16:17:50 UTC
- Install the first version of the attached addon
- open a new frame ( writer for example )
- use the addon action => it will show the old and the new value of the
configuration entry
- deinstall the addon
- install the second version of the addon
- open a new frame
- use the addon action => the first configuration value can be successfuly
accessed, the new one is not accessable

If the second addon is installed directly both of the values can be successfuly
accessed. The restarting of the office did not help.

Since it is a general problem for addons it could be a showstopper for 2.3
Comment 1 mikhail.voytenko 2007-08-02 16:19:36 UTC
Created attachment 47269 [details]
The first version of the addon.
Comment 2 mikhail.voytenko 2007-08-02 16:20:13 UTC
Created attachment 47270 [details]
The second version of the addon.
Comment 3 mikhail.voytenko 2007-08-02 16:24:38 UTC
Created attachment 47271 [details]
The netbeans project of the first version of addon.
Comment 4 mikhail.voytenko 2007-08-02 16:25:10 UTC
Created attachment 47272 [details]
The netbeans project of the second version of addon.
Comment 5 jsc 2007-08-03 12:57:07 UTC
jsc -> mav: i would not say that it is a showstopper. When you deploy a xcu file
with initial defaults as well everything works fine. The problem is that when
you don't deploy a xcu file, a new configuration file/data is written under
.../user/registry/data/...Office/Custom. Deploying a new an updated schema with
the new version doesn't change this old configuration data. The next time the
configuration is used on this schema/data it will detect a mismatch between the
new schema and the old data. We should analyze it in detail if we can handle
this appropriate. In the meanwhile i would document that when a new config
schema is defined and deployed, the extension should deploy default data as well.
Comment 6 jsc 2007-08-03 13:11:04 UTC
cc jsc
Comment 7 joachim.lingner 2007-08-08 13:57:17 UTC
jl->sb: The configuration should recognize a changed schema and create a new
cache if necessary. It could also offer some functionality so that one can
externally trigger that the new schema values are used.
Comment 8 Oliver Brinzing 2007-11-06 06:57:54 UTC
Hi, 

i will provide a second example ...
i used oo 2.3 m233 (vista)

- install "extensiondialog_1.oxt"
  i used: unopkg add extensiondialog_1.oxt -v -f --shared

- open a calc document, open the calc preferences (Tools -> Options),
  you will find a new entry "Demo Options Page" 
- enter some data / change checkbox/radiobutton ...
- close with ok, open again, check the entered data/values ...
- uninstall "extensiondialog_1.oxt"
  i used: unopkg remove extensiondialog_1.oxt -v -f --shared

- install "extensiondialog_2.oxt", 
  i would suggest to rename it first to "extensiondialog_2.oxt"
 
- enter data in the new textfield "new Field"
- close with ok, open again, the data for new field was *not* saved
- close openoffice
- delete user\registry\cache\org.openoffice.desktop.deployment.
         options.ExtensionData.dat"
- try again, and it will work ...

changes made in "extensiondialog_2.oxt"

- changed the "ExtensionDialog.xdl" and added a new textfield

  <dlg:text dlg:id="Label2" dlg:tab-index="9" dlg:left="20" dlg:top="120"
   dlg:width="50" dlg:height="16" dlg:value="new Field"/>
  <dlg:textfield dlg:id="String2" dlg:tab-index="10" dlg:left="90" 
   dlg:top="120" dlg:width="90" dlg:height="16"/>

- also changed ExtensionDialog.xcs, added:

  <prop oor:name="String2" oor:type="xs:string">
    <value></value>
  </prop>

  and last changed the "OptionsEventHandler.java" to allow saving "String2"

Oliver
Comment 9 Oliver Brinzing 2007-11-06 06:58:59 UTC
Created attachment 49444 [details]
extensiondialog_1
Comment 10 Oliver Brinzing 2007-11-06 06:59:33 UTC
Created attachment 49445 [details]
extensiondialog_2
Comment 11 Oliver Brinzing 2007-11-06 07:00:09 UTC
Created attachment 49446 [details]
org.openoffice.desktop.deployment.options.ExtensionData.dat
Comment 12 Oliver Brinzing 2007-11-06 07:00:51 UTC
adding me to cc
Comment 13 Stephan Bergmann 2007-11-20 17:01:42 UTC
.
Comment 14 cno 2007-12-02 21:10:41 UTC
added myself as cc
Comment 15 cdeval 2009-05-11 20:39:10 UTC
The problem becomes very penalizing with the "options pages" feature. The xcs
file is not updated in case of change.
The only simple way to update my options pages is to delete the dat file of my
extension before I install it, and it's a bad idea to do that but it works. 
Comment 16 Stephan Bergmann 2010-05-27 15:37:19 UTC
As tested on DEV300_m79, with the new configmgr implementation from issue
101955, the scenario from the original description now works, with the following
limitation: accessing the second configuration value still fails unless OOo is
restarted either after the first AddonsReinstallationBug.oxt version is
uninstalled or after the second AddonsReinstallationBug.oxt version is installed.

@mav:  Please clarify whether the above suits your needs (and this issue can be
considered fixed).
Comment 17 mikhail.voytenko 2010-05-28 07:20:05 UTC
Since the restart of the office helps, I would treat the bug as fixed and close
it as a duplicate of the issue 101955. It would of course be great if we even
would not need to restart, but I am not sure that it is worth the efforts.

Anyway, if somebody would like to request the possibility to reinstall an addon
without restart, a new issue should be submitted.

*** This issue has been marked as a duplicate of 101955 ***
Comment 18 Stephan Bergmann 2010-05-28 07:57:53 UTC
.