Opened 17 years ago
Closed 17 years ago
#637 closed defect (fixed)
Multiple plugin configurations gets mixed up.
Reported by: | base | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.4 |
Component: | web | Version: | 2.2.3 |
Keywords: | plugin configuration defect | Cc: |
Description
Scenario:
1) Start a new plugin configuration of base1PluginExecutor, choose the .base-configuration file you wish to use. 2) Open a configure session for an earlier configured plugin, (to copy a path for example) 3) Copy a field from the old. Close by pressing Cancel. 4) Paste in the new, press Next, get confirmation.
Now, the New configuration will have default values for all fields, ie blank and ~random. the Old configuration will have the .base-configuration file one the New.
Server Versions: Version BASE 2.2.3 (build #3253; schema #30) Web server Apache Tomcat/5.5.20 Database Dialect org.hibernate.dialect.MySQLInnoDBDialect JDBC Driver com.mysql.jdbc.Driver (version 5.0) Java runtime Java(TM) 2 Runtime Environment, Standard Edition (1.5.0_08-b03), Sun Microsystems Inc. Operating system SunOS sparc 5.10
Client: Firefox 2.0.0.4
Change History (4)
comment:1 by , 17 years ago
Milestone: | → BASE 2.4 |
---|---|
Summary: | Mulitple plugin configurations gets mixed up. → Multiple plugin configurations gets mixed up. |
comment:2 by , 17 years ago
Comment to developers:
The overwriting problem is caused by the wizard keeping state in session variables. When the second configuration is started, the variables from the first one is overwritten by the variables for the second one. Clicking on 'Next' in the first configuration is not different from clicking on 'Next' in the second configuration. They will both continue with the second configuration.
Possible solutions:
- Keep the state in different variables for different configurations. This may leak memory since the variables are not cleared if the user closes the window with 'Cancel' or the 'x'. For this solution to work we must find a way to clear the variables when the wizard is aborted. Another drawback is that existing plug-in implementations may depend on finding the state in the current variables. Changing this may brake those plug-ins. See http://base.thep.lu.se/chrome/site/doc/html/developerdoc/plugin_developer/plugin_developer.api.html#plugin_developer.api.jspparameters
- Prevent a user to open more than one configuration wizard at a time. This may seem easy since we could could check if the state variables already exists and take that as an indication that another wizard is open. However, there is still the problem that these variables are not cleared if a wizard is aborted.
- Display a warning if the state variables exists and let the user decide if it is safe to continue or not. This would probably be a good solution if we can find a way to clear the variables when aborting a wizard.
- Use JavaScript to try to detect if another configuration wizard is open or not. This might be hard to implement since the damage is already done before we reach a place in the code were this can be done in a central place. The only way is to add checks for this in every place that may start a configuration wizard and there are many of those.
comment:3 by , 17 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
It is not supported to start more than one plug-in/job configuration wizard at a time. The problem is that there a no checks for this. It is possible to mix up almost any plug-in/job configuration. In the best case this results in an error, in the worst case data is lost as in the description of this ticket.
Note! This one-at-a-time policy is not specific to plug-ins. The same is true for almost any other edit operation, but in most cases the second item is opened in the same window as the first item which will prevent overwriting of data.
To avoid the problem: