contao / core

Contao 3 → see contao/contao for Contao 4
GNU Lesser General Public License v3.0
490 stars 214 forks source link

Show a "synchronize" button in the file picker #5352

Closed Ruudt closed 11 years ago

Ruudt commented 11 years ago

I have some issues after editing files outside of Contao:

  1. When I remove a file through FTP, but do not immediately sync and instead open a frontend page that used to show that file. This creates an empty file by the same name .
  2. When I change filenames through FTP and I go into the filemanager then the filemanager displays the correct new situation. All other fileviews (in the popups) do not.
  3. New files are visible in the filemanager but not to any other file view.

(Wherever I say FTP the same goes for any method used to manipulate the filesystem outside of Contao.)

Solution to 1 would be to not recreate the file, but remove the file from the content (for galleries) or not display the file if removing is not an option.

Solution to 2 and 3 is to use the actual state of the filetree to do backend changes. If any image was removed / added / filename-altered through FTP then; remove / add / remove it in the db and if needed add a new one.

This will probably go at the cost of some speed. But something needs to be done because in the old situation I could add new files when building a layout when needed and then add it to whatever css style I needed. Right now I have to go through a lot of extra steps every time filemanager->sync->theme->css->sheet->style before I can use the file. Same goes if I have to add files using Contao: filemanager->upload->upload files->theme->css->sheet->style.

I assume these issues are known, but I can't find them and I think they are important enough.

leofeyer commented 11 years ago
  1. This has been addressed in the hotfix/3.0.4 branch.
  2. Sure they do not, because they rely on the database data.
  3. See 2.
Ruudt commented 11 years ago

Your answer to 2 is the issue. I get to work with inconsistent views on the "same" data. Fix it. Please.

leofeyer commented 11 years ago

You can fix it by synchronizing the database with the file system. That's the only fix there is.

Ruudt commented 11 years ago

The fix I understand, I request it be more accessible or mostly obsolete. A solution could be to add a sync button on the fileviews that get info from the db. It is by no means perfect, but my main objection would no longer be valid!

Point is not that I can't sync the db with the filesystem. I understand why I have to. What I do not understand is why the improvement of a db aided fs takes me much more time. As you can see from what I wrote I need to go through several pages for any file added (I already try to group them, but still need to go through the process several times).

Contao is not at fault for the db being outdated. But Contao has to deal with real life situations. I would still suggest a more automatic sync should be achieved to increase usability. Is there no lightweight method for testing changes to specific directories that also scale up well? Perhaps a setting to choose to automatically sync on any fileview being opened?

Toflar commented 11 years ago

Perhaps a setting to choose to automatically sync on any fileview being opened?

Way too resource expensive! I don't quite get your problem @Ruudt. You don't have to click that button 12 times. You do your changes on the FTP and when you're done you click that button once and that's it? If this process doesn't save you any time, then you probably shouldn't have done it via FTP anyway?

Ruudt commented 11 years ago

@Toflar: When the site is online using the filemanager is fine. I hardly use FTP. Only when I have to upload a lot of files an FTP solution is better, and syncing could be faster but doable...

I have problems during constructing the layout and stylesheets. I select images I need in Photoshop and save them directly in the correct folder (which I also called FTP because it happens outside of Contao). The problem is that if I use the filemanager I have to: save my file somwhere -> open filemanager -> click upload -> choose folder -> choose file -> go back to where I need the file => min. 9 clicks. Faster would be to: save my file in correct location -> open filemanager -> click sync -> go back to where I need the file => min. 6 clicks.

What I suggest is to add the sync button to all fileview popups. (See image) The process becomes a lot shorter this way: save my file in correct location -> at place I need the file open fileview popup -> click sync => min. 3 clicks. Also, this way I do not have to search for the style- or content element where I needed the file because it can stay opened while I create the image.

filemanager

Toflar commented 11 years ago

I see. +1 for a sync button in the file manager popup.

NinaG commented 11 years ago

+1 (and also sync button for non-admins)

leofeyer commented 11 years ago

I'll reopen the ticket, but there are different plans already (see #4856), which render the changes redundant.

Ruudt commented 11 years ago

Tabbed approach seems just as fine, or even better. If adding the sync button is easy to do, please do so as intermediate approach. If not I don't mind doing the extra time until 3.1 is released, knowing a solution is coming.

leofeyer commented 11 years ago

The ticket is no longer relevant.