Steps to reproduce:

1. Select Create content -> Directory listing.
2. Create a new Directory listing type content. Select a non-empty directory to be shown. Ensure that "Promoted to front page" is checked under "Publishing options".
3. The directory listing is created. You can see that works ok.
4. Go to front page (?q=node). The node is shown at the top of the front page. However, instead of listing the directory contents, there's a message saying that "This directory is empty."

This bug is fully reproducible. Ask me any extra info you may need.

Comments

rickyniano’s picture

StatusFileSize
new76.96 KB
new280.29 KB

Screenshots illustrating the problem. "filebrowser1.png" image shows the "This directory is empty." message. When you click on the node title ("Programaciones"), you can see the directory contents, as in "filebrowser2.png" file. The directory is not empty, of course.

rickyniano’s picture

I've solved the issue fixing the filebrowser_view() function:

Find the following block of code:

// Grab various Drupal paths.
$path_alias = drupal_get_path_alias('node/' . $node->nid);
// Handle both aliased and non-aliased cases.
$subdir = str_replace($path_alias, '', $_GET['q']);
$subdir = str_replace('node/' . $node->nid, '', $_GET['q']);
$curr_dir = $node->file_path . $subdir;

and append the following line of code just below:

$curr_dir = $subdir == 'node' ? $node->file_path : $curr_dir;

The problem is that $curr_dir incorrectly appends the suffix 'node' when you're viewing the front page (http://www.example.com/node).

rickyniano’s picture

Status: Active » Needs review
StatusFileSize
new508 bytes

Patch against the 6.x-2.0-rc5 release.

Yoran’s picture

Assigned: Unassigned » Yoran

I changed the way of this module is handeling teasers. Basicaly I don't really see the point of showing any file listing in the front page. So I added a "description" field in the node that I use as a teaser. If no description is given, the module can also used description from meta data files (.bbs or .ion).

Tell me what you think about this.

Anonymous’s picture

Version: 6.x-2.0-rc5 » 6.x-2.0-rc7
Status: Needs review » Needs work

If no description is given, ...

... the text from the descript.ion file (. text) isn't shown.

Yoran’s picture

Hum.. It's working here, If I have no description for the node, the ". text" is used for both teaser and full view. Did you try to browse the filebrowser folder itself to test ? Is your description is fully empty (no spaces, crlf, etc.) ?

Yoran’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.