-
Bug
-
Resolution: Fixed
-
Critical
-
2.3.3, 2.4.3
-
MOODLE_23_STABLE, MOODLE_24_STABLE
-
MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
-
wip-
MDL-39177-master -
While testing some other repository issues I came to this situation:
1) with some repository defined (mine was a filesystem system-wide repo).
2) got to any area accepting aliases (user private files is ok).
3) and add the file xxxx.yyy (making a copy of the file)
4) then add again the same file (now creating an alias)
5) The overwrite/rename dialog will be shown.
6) Select "overwrite", so your second added file wins.
7) Save changes to ensure there isn't any refresh visual glitch.
8) The file xxxx.yyy file should be an alias. It's a copied file.
Note that the opposite also happens, first alias, then copy and overwrite should lead to copy, but it remains as alias.
Somehow the overwrite feature is now alias-aware.
No problems detected when renaming is selected instead of overwrite.
Ciao
The complete list of problems:
1. Filemanager was not refreshed after overwriting a file (this is issue MDL-33719).
2. The 'original' attribute of draftfile was lost when file was overwritten, therefore the list of shortcuts no longer appeared (but it was not obvious becase filemanager was not refreshed).
3. The 'original' attribute of draftfile was ignored when draftarea was saved. Which sort of compensated #2 but if file was deleted and replaced it was treated the same as if it was overwritten (even though filemanger UI distinguished those cases)
4. When saving filearea the maxbytes check did not apply to the updated files
5. It was not possible to replace the file with a reference (actually this is what the original issue text was about). So after it has became possible we need to make sure that double references are not created.
6. When files are unzipped, they are overwritten without warning, source was not specified, original was lost.
7. When one user overwrites the file of another user, the files.userid field was not updated and the new file appeared in the 'Recent file' of the wrong user
To add to this: there is/was a lot of code duplication and overwriting files when picking from repository, uploading, drag&drop and/or unzipping are treated differently. JS and non-JS filemanager treat(ed) rename/move also differently.
- has a non-specific relationship to
-
MDL-39765 File is overwritten during restore if there are shortcuts to it
- Closed
- has been marked as being related by
-
MDL-39541 Inconsistency in overwriting and deleting+replacing a file in filemanager
- Closed
- is blocked by
-
MDL-33719 When overwriting a copy of a file with an alias/shortcut of a file; the file thumbnail is not refreshed in the file manager form element.
- Closed
- is duplicated by
-
MDL-42153 Linked files do not reflect changes when original files are updated
- Closed