Project

General

Profile

Actions

bug #8198

closed

Deleting an image gallery from image gallery view shows wrong configuration dialog

Added by Andreas Müller over 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
New
Assignee:
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:

Description

It shows the same dialog like when deleting media, but the image gallery is something else. Image galleries should not be reused and therefore the dialog is probably not necessary.

But maybe the media dialog should come if the gallery still contains media, then it should be asked how to handle with the media?


Files

picture740-1.png (19.9 KB) picture740-1.png Andreas Müller, 02/25/2021 10:06 AM
Actions #1

Updated by Katja Luther almost 2 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
Actions #2

Updated by Andreas Müller almost 2 years ago

For existing images we need the delete dialog that is true. I have not checked how the current dialog looks like but it should make clear that the configuration is on the images not the gallery itself.

Actions #3

Updated by Andreas Müller almost 2 years ago

If this is in progress should we move it to current milestone?

Actions #4

Updated by Katja Luther almost 2 years ago

  • Target version changed from Unassigned CDM tickets to Release 5.21
Actions #5

Updated by Katja Luther almost 2 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

For the gallery the dialog explicitly say that the gallery still contains media data and ask how to handle them. Please review.

Actions #6

Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 0 to 60

If deleting even if media is linked a concurrent modification is thrown due to this code:

                      for (Media mediaElement:media){
                          element.removeMedia(mediaElement);
                      }
last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/common.service
last remote request client time : 2021-02-22T17:15:55.308
last remote request response header time : Mon, 22 Feb 2021 17:15:55 GMT
client error time : 2021-02-22T17:16:42.287
login : admin
editor version : 5.21.0.202102212348
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.6.0.20201124
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_131
org.eclipse.e4.core.di.InjectionException: java.util.ConcurrentModificationException
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:20)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: java.util.ConcurrentModificationException
    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:901)
    at java.util.ArrayList$Itr.next(ArrayList.java:851)
    at eu.etaxonomy.taxeditor.editor.view.media.handler.DeleteMediaHandler.createMediaDeleteOperation(DeleteMediaHandler.java:134)
    at eu.etaxonomy.taxeditor.editor.view.media.handler.DeleteMediaHandler.execute(DeleteMediaHandler.java:92)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    ... 36 more
Actions #7

Updated by Andreas Müller almost 2 years ago

please call pull before fixing as I did code cleaning

Actions #8

Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

this should be fixed.

Actions #9

Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther

The exception is fixed now. However, the "delete the media data completely, even if ..." does not work. The media is not deleted but only removed from the gallery.

By the way, also removing a single media this way throws an exception during save (but the image seems to be deleted as expected):

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/media.service
last remote request client time : 2021-02-24T12:34:03.43
last remote request response header time : Wed, 24 Feb 2021 12:34:03 GMT
client error time : 2021-02-24T12:34:04.013
login : admin
editor version : 5.21.0.202102241040
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.6.0.20201124
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_131
org.eclipse.e4.core.di.InjectionException: java.util.NoSuchElementException
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:65)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:247)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:90)
    at org.eclipse.e4.ui.internal.workbench.PartServiceSaveHandler.save(PartServiceSaveHandler.java:57)
    at org.eclipse.ui.internal.WorkbenchWindow$7.save(WorkbenchWindow.java:594)
    at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.savePart(PartServiceImpl.java:1390)
    at eu.etaxonomy.taxeditor.workbench.SaveHandler.execute(SaveHandler.java:38)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:282)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:264)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:433)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:454)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$3.handleEvent(AbstractContributionItem.java:482)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:20)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: java.util.NoSuchElementException
    at org.apache.commons.collections.buffer.BoundedFifoBuffer$1.next(BoundedFifoBuffer.java:340)
    at eu.etaxonomy.taxeditor.model.DeleteResultMessagingUtils.messageDialogWithDetails(DeleteResultMessagingUtils.java:79)
    at eu.etaxonomy.taxeditor.editor.view.media.operation.DeleteMediaOperation.execute(DeleteMediaOperation.java:103)
    at eu.etaxonomy.taxeditor.editor.e4.TaxonEditorInputE4.merge(TaxonEditorInputE4.java:416)
    at eu.etaxonomy.taxeditor.editor.name.e4.TaxonNameEditorE4.save(TaxonNameEditorE4.java:411)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
    ... 48 more
Actions #10

Updated by Andreas Müller almost 2 years ago

Also the configuration sould only show up if the image gallery is not empty. This is currently not the case.

And finally, the configuration should only show up if there are persistent media attached. For newly created media it does not make sense. This is also true for the delete single media dialogue.

Actions #11

Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

The configuration wizard is only shown for persisted media now and only if media exist.

The exception should not come anymore.

Actions #12

Updated by Andreas Müller almost 2 years ago

Andreas Müller wrote:

The exception is fixed now. However, the "delete the media data completely, even if ..." does not work. The media is not deleted but only removed from the gallery.

Is this also fixed?

Actions #13

Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
Actions #14

Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

Andreas Müller wrote:

Andreas Müller wrote:

The exception is fixed now. However, the "delete the media data completely, even if ..." does not work. The media is not deleted but only removed from the gallery.

Is this also fixed?

yes

Actions #15

Updated by Andreas Müller almost 2 years ago

Katja Luther wrote:

The configuration wizard is only shown for persisted media now and only if media exist.

it still comes if media exists:

Actions #16

Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
Actions #17

Updated by Andreas Müller almost 2 years ago

Katja Luther wrote:

Andreas Müller wrote:

Andreas Müller wrote:

The exception is fixed now. However, the "delete the media data completely, even if ..." does not work. The media is not deleted but only removed from the gallery.

Is this also fixed?

yes

works now

Actions #18

Updated by Katja Luther almost 2 years ago

Andreas Müller wrote:

Katja Luther wrote:

The configuration wizard is only shown for persisted media now and only if media exist.

it still comes if media exists:

should be fixed now.

Actions #19

Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Katja Luther to Andreas Müller
Actions #20

Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther
Actions #21

Updated by Andreas Müller almost 2 years ago

  • % Done changed from 60 to 100

works now

Actions

Also available in: Atom PDF