Project

General

Profile

Bug #3896

Documents without title (which is auto-created folders) not shown

Added by Bas Wijnen about 8 years ago. Updated almost 8 years ago.

Status:
Bug resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
Start date:
13/09/2011
Due date:
% Done:

100%

Estimated time:
Complexity:
Piece of cake
SCRUM pts - complexity:
?

Description

Automatically created folders don't have a title for some reason. This shouldn't be a problem, because there is a fallback to use the basename of the path. However, this check is broken, and leads to empty filenames in the displayed table. The attached patch fixes this.

Note that the same code (but without the bug) appears in document.php. I'm not sure why it's duplicated.


Files

documents-title.patch (503 Bytes) documents-title.patch Bas Wijnen, 13/09/2011 20:07

Related issues

Related to Chamilo LMS - Bug #3926: Folders in Documents Tool With Comments Do Not Show Folder NameBug resolved25/09/2011

Actions

Associated revisions

Revision f21b0187 (diff)
Added by Julio Montoya almost 8 years ago

Fixing empty file name see #3896

History

#1

Updated by Yannick Warnier about 8 years ago

I think this is due to the corresponding language term not having any translation... does that seem possible?

#2

Updated by Bas Wijnen about 8 years ago

Yes, very possible. I think the Dutch translation is no longer missing any translations, but quite a lot are translated as an empty string. For this reason I submitted #3884.

However, this can't really be the problem here, because even with #3884 applied, the empty names still appear (although I'm not entirely sure if they were recreated after applying the patch).

Anyway, it isn't a problem in itself, if only documents without a title use their filename. This is obviously the intention of the code that I changed, but it's not what it's doing. Instead, it's trying to get the basename of the always empty title (if it wasn't empty, it wouldn't be in that branch of the if statement).

#3

Updated by Yannick Warnier about 8 years ago

Is it still empty when your language file is correct and, after that, you create a new course (is it empty inside this course?)

#4

Updated by Bas Wijnen about 8 years ago

With 3884 applied, the newly created course get the name of the translation variable (ChatFiles, UserFolders, ...), as expected. The variable is in the translation file, but the translation is empty. This is the 1.8.8.4 release. In the repository, the variable is missing.

I expect the translation to be used when it is available. It just uses what get_lang returns. With #3884, that's the name of the variable, without it it's the empty string, but with a translation, it will return that.

#5

Updated by Julio Montoya almost 8 years ago

  • Status changed from New to Bug resolved
  • % Done changed from 80 to 100

Also available in: Atom PDF