Page 1 of 1

Front End File Management (Uploads) Sort by 'date_desc' works inconsistently

Posted: Wed Jan 09, 2008 10:35 pm
by pbrady
Hi,

I am running with the following config:

System:
=======
Debian Linux (Etch 4.x)  2.6.18-5-686 #1
PHP 4.4.4
MySQL 5.0.32
Apache 2.2.3

Modules Listed in this post:
=======
FEU 1.3.1
Uploads 1.3.0


Problem:
=======

I am using FEU & Uploads modules to enable my end users to upload PDF files to my intranet server. Problem is, when they upload and also overwrite a file using a modified version of a file with the *same* filename, the upload module does not update the "date" information to display correctly.

In my situation, I use a detail template that displays a table that is sorted by date ($date_desc) and displayed in a table using {$entry->date}.

What I have tried so far:

Test #1
======
1. Upload two new files: ax10.pdf and ax20.pdf (displays correct upload date & time in descending format).

2. Upload a modified version of ax10.pdf to server and specify to overwrite original upload of same name (does not display correct upload date & time - instead it continues to display original upload date and time even though file was a new pdf with same name).

A check of the linux server confirms the new modification date and time correctly:

2008-01-09 11:49 ax10.pdf

But the Upload detail template displays this as the upload time:

2007-12-14 13:03:46 (the original upload date and time of first upload of file)

Test #2
=====
1. Change file name of ax10.pdf to ax10_copy.pdf.

2. Upload ax10_copy.pdf to server.

3. Uploads detail template displays the correct upload date and time and it corresponds to the Linux server date and time of file.

Seems like there is a problem with the way that upload records the date and time of files uploaded when using the overwrite option. It should record the file's updated upload date and time, but instead ignores this and sticks with the original upload date and time.

Is there a workaround that I can apply to get this to work so that whenever I upload and overwrite a file, it displays the date and time of the latest upload???

Here is a copy of my Upload and Detail Form Templates as well as a copy of the Page calling these templates:

Upload Template:
============


{$startform}{$input_key}
{if $noauthor }
{$input_author}
{else}
{$prompt_author} {$input_author}
{/if}
Enter Document Title: {$input_summary}
{$input_replace} If file already exists, overwrite it.
Select File to Upload{$hidden}{$input_browse}
{$input_submit}
{$endform}


Detail Report Template:
=============


{if isset($input_filter) }
{$startform}
{$prompt_filter}{$input_filter}{$hidden_params}{$input_submit}
{$endform}

{$matches} {$matchestext}
{/if}

 
    Document Title
    File Name
    Upload Date & Time
 
{foreach from=$items item=entry}
 
    {$entry->summarylink}
    {$entry->name}
    {$entry->date}
 
{/foreach}






Page that Calls Upload & Detail Function and Displays them:
====================================

{cms_module module="CustomContent"}   
{if $customcontent_loggedin != "0"}       
{cms_module module="Uploads" category="axiom_v4_pdfs" mode="upload" detailtemplate="pubs_upload"} 
Latest Uploads

{cms_module module="Uploads" category="axiom_v4_pdfs" mode="detailed" sortorder="date_desc" count="5" detailtemplate="pubs"}
{else}     
You are not logged in.   
{cms_module module="FrontEndUsers" form="login" returnto="uploads"} 
{/if}


For a complete list of uploaded files, go to the {cms_selflink page='89' text='PDF file list'} .


Thanks in advance for any help you can provide!!! :-)

Re: Front End File Management (Uploads) Sort by 'date_desc' works inconsistently

Posted: Wed Jan 16, 2008 6:15 pm
by pbrady
Hi,

Can anyone comment on this? I've put some effort into figuring it out, but need help. All the particulars are listed in the original posting.

Thanks

Re: Front End File Management (Uploads) Sort by 'date_desc' works inconsistently

Posted: Wed Jan 16, 2008 6:20 pm
by calguy1000
I haven't had time to look at it.... working on umpteen other modules at the moment.... Can you file a bug report in the uploads tracker in the forge so I don't lose track of it.

Re: Front End File Management (Uploads) Sort by 'date_desc' works inconsistently

Posted: Wed Jan 16, 2008 6:32 pm
by pbrady
Hi,

I'll be happy to...sorry to bug you. I wasn't sure it was a bug or not. I'll do that today! :-)

Re: Front End File Management (Uploads) Sort by 'date_desc' works inconsistently

Posted: Tue Sep 30, 2008 5:19 pm
by TonyP
Does anyone know if this was fixed or if there's a work-around. I'm using Uploads 1.3.1 and experiencing the same problem.