Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-18871

when removing an object with two locations, ez does not ask to send to trash but always does real deletion

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: 2011.10, 4.5.0, 4.6.0beta1
    • Fix Version/s: None
    • Labels:
      None

      Description

      In admin interface, try the following:

      • add a 2ndary location to an object
      • click on its remove button (either in main or 2ndary node)

      Result: object is removed

      Expected result: question is asked about sending object to trashcan

        Issue Links

          Activity

          Hide
          Gaetano Giunta added a comment -

          nb: seems to happen also when doing the remove via context menu (in children table context menu)

          Show
          Gaetano Giunta added a comment - nb: seems to happen also when doing the remove via context menu (in children table context menu)
          Hide
          Carlos Revillo added a comment -

          In reply to comment #024644
          Hi Gaetano!
          Following description of the issue... which is the inteded behaviour of the remove button for the object then? i mean, should it delete only the location we're in or deletel ALL locations for that object?

          you say move to trashcan should appear, but trashcan is for objects, no for nodes... so, if we lead this to a more exagerated point of view, and we have an object having, for example, 5 locations, each of them having their own childres, what should we happen if we click the delete button in one of the locations? should we remove also all the children for all the locations?

          again, eternal discussion about nodes and object .

          but, on the other hand, for deleting a concrete location, we have buttons in the locations tab for the objects...

          Cheers!

          Show
          Carlos Revillo added a comment - In reply to comment #024644 Hi Gaetano! Following description of the issue... which is the inteded behaviour of the remove button for the object then? i mean, should it delete only the location we're in or deletel ALL locations for that object? you say move to trashcan should appear, but trashcan is for objects, no for nodes... so, if we lead this to a more exagerated point of view, and we have an object having, for example, 5 locations, each of them having their own childres, what should we happen if we click the delete button in one of the locations? should we remove also all the children for all the locations? again, eternal discussion about nodes and object . but, on the other hand, for deleting a concrete location, we have buttons in the locations tab for the objects... Cheers!
          Hide
          Gaetano Giunta added a comment - - edited

          In reply to comment #024645
          The current behavior is inconsistent:

          . obj with 1 node: when using "remove" you are asked to trashcan or not. In both cases, the object disappears along with the node

          . obj with 2 node: when using "remove" you are not asked to trashcan. In both cases, the object disappears along with all the nodes

          So it looks like the "remove" button means "remove object, along with all nodes".
          I agree that it might be clearer - I had in fact no idea what would happen when using it on objects with multiple locations and I had to test it to find out (node: now that I write about this, I think I should test this both when editing from main node and from 2ndary node...). And I guess most users have no idea, either

          As to whether the default action for "remove" should be "remove current node only", this is debatable. I think making "remove obj" the default is a good idea because

          • there is already a panel where user can remove locations one by one
          • if we make the default to "remove current node only" we need to find a place to add a button for "remove object"
          • in the backoffice, the main content view is combined object/node, and if I was to draw a line in the sand, I'd say it is currently at 80% object, 20% node

          Last point: how to send an obj to trashcan if it has 5 nodes?
          . optimal solution: make trashcan keep track of nodes
          . suboptimal solution: send it to trashcan wile keeping track only of its main node's parent

          Show
          Gaetano Giunta added a comment - - edited In reply to comment #024645 The current behavior is inconsistent: . obj with 1 node: when using "remove" you are asked to trashcan or not. In both cases, the object disappears along with the node . obj with 2 node: when using "remove" you are not asked to trashcan. In both cases, the object disappears along with all the nodes So it looks like the "remove" button means "remove object, along with all nodes". I agree that it might be clearer - I had in fact no idea what would happen when using it on objects with multiple locations and I had to test it to find out (node: now that I write about this, I think I should test this both when editing from main node and from 2ndary node...). And I guess most users have no idea, either As to whether the default action for "remove" should be "remove current node only", this is debatable. I think making "remove obj" the default is a good idea because there is already a panel where user can remove locations one by one if we make the default to "remove current node only" we need to find a place to add a button for "remove object" in the backoffice, the main content view is combined object/node, and if I was to draw a line in the sand, I'd say it is currently at 80% object, 20% node Last point: how to send an obj to trashcan if it has 5 nodes? . optimal solution: make trashcan keep track of nodes . suboptimal solution: send it to trashcan wile keeping track only of its main node's parent
          Hide
          Carlos Revillo added a comment -

          In reply to comment #024646
          I agree with you Gaetano. And for more clearness i would remove the "move" or put it in another place. so we can buttons for "object" and "node" separated...

          About your doubts, i did a test. it was like that.

          create article_001
          add another location for it
          create article_002 as children for second location of article_001

          in this situation, the thing was like this
          trying to delete first location (that is, no children). no warning at all

          trying to delete second location (so, one children,) warning appears but the one saying you have childrens under location you're trying to delete...

          so it seems to me that actually move to trash option only appears when you have a only location for the object. in that situation node and object are deleted.

          if you have 2 or more locations, then only location is deleted and no warning about trash appears because object is not going to be deleted...

          as you say, inconsistent... i also think it would be good to make it more clear when you are deleting the object (and so, relations to this object) and when you're only removing a specific location...

          Show
          Carlos Revillo added a comment - In reply to comment #024646 I agree with you Gaetano. And for more clearness i would remove the "move" or put it in another place. so we can buttons for "object" and "node" separated... About your doubts, i did a test. it was like that. create article_001 add another location for it create article_002 as children for second location of article_001 in this situation, the thing was like this trying to delete first location (that is, no children). no warning at all trying to delete second location (so, one children,) warning appears but the one saying you have childrens under location you're trying to delete... so it seems to me that actually move to trash option only appears when you have a only location for the object. in that situation node and object are deleted. if you have 2 or more locations, then only location is deleted and no warning about trash appears because object is not going to be deleted... as you say, inconsistent... i also think it would be good to make it more clear when you are deleting the object (and so, relations to this object) and when you're only removing a specific location...
          Hide
          Gaetano Giunta added a comment -

          In reply to comment #024646
          Strange thing: testing (on another install) and it seems that the "remove" button actually deletes a single node, not all of them.
          This is in accord with the findings of Carlos and with the fact that there is no asking for "go to trashcan"...

          Show
          Gaetano Giunta added a comment - In reply to comment #024646 Strange thing: testing (on another install) and it seems that the "remove" button actually deletes a single node, not all of them. This is in accord with the findings of Carlos and with the fact that there is no asking for "go to trashcan"...

            People

            • Assignee:
              unknown
              Reporter:
              Gaetano Giunta
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: