Weceem

Drag and dropping a ContentDirectory does not move files to the right place / loses folder hierarchy

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.9.1
  • Component/s: None
  • Labels:
    None
  • Request Controller:
    Please Select
  • External Supervisor:
    Please select
  • Executing Programmer:
    Please select

Description

I moved /libs/jquery-plugins/images/ folder in repo to the parent, but in the filesystem shadow.png which was in the images/ folder ends up in the root folder of the space

This is because the parent nodes are Folders not ContentDirectory nodes, and the algorithm to get the container to serve the file is using the full URI path, not the URI path including only ContentDirectory parents.

The behaviour in this situation is not clear to users. They would expect files to "exist" at the same location in the filesystem as they appear in the repository - for relative links to work from CSS nodes. This is currently ambiguous

If you have a stylesheet that is uploaded as a css file to /x/y/z/ (Folder nodes) then you would expect it could resolve relative images that point to ContentFile nodes. This will work currently as both files will be assumed to be at the "root" of the filesystem because the parents are Folders. However as soon as you start moving folders and files around the behaviour becomes confusing as the folder names are not considered.

Conversely we have the problem that a user may try to add a StyleSheet node (they can edit) under a ContentDirectory node so that they can link to the ContentFile nodes relatively.

Activity

Hide
Marc Palmer added a comment - 02/Aug/10 5:03 PM

Adding a mechanism to block unsupported hierarchies is part of the solution here, for now at least.

I've implemented a canAcceptChild hook on content, which prevents Folder or other content being dropped under ContentDirectory. This was causing problems where you could then use this to put another ContentDirectory under the folder and get a totally confusing situation. It also prevents you putting HtmlContent under a ContentDirectory node which currently makes no sense.

Show
Marc Palmer added a comment - 02/Aug/10 5:03 PM Adding a mechanism to block unsupported hierarchies is part of the solution here, for now at least. I've implemented a canAcceptChild hook on content, which prevents Folder or other content being dropped under ContentDirectory. This was causing problems where you could then use this to put another ContentDirectory under the folder and get a totally confusing situation. It also prevents you putting HtmlContent under a ContentDirectory node which currently makes no sense.
Hide
Marc Palmer added a comment - 02/Aug/10 5:04 PM

This solution is not 100% clean yet as you can still attempt to create content in a place not allowed, and only find out about the problem when you try to save, which is rather annoying. We may change the approach here before release.

Show
Marc Palmer added a comment - 02/Aug/10 5:04 PM This solution is not 100% clean yet as you can still attempt to create content in a place not allowed, and only find out about the problem when you try to save, which is rather annoying. We may change the approach here before release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    13/Jul/10 2:15 PM
    Updated:
    03/Aug/10 10:19 AM
    Resolved:
    03/Aug/10 10:19 AM