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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
pbrady
Forum Members
Forum Members
Posts: 96
Joined: Sat Feb 10, 2007 4:31 pm

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

Post 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!!! :-)
User avatar
pbrady
Forum Members
Forum Members
Posts: 96
Joined: Sat Feb 10, 2007 4:31 pm

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

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

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

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
pbrady
Forum Members
Forum Members
Posts: 96
Joined: Sat Feb 10, 2007 4:31 pm

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

Post 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! :-)
TonyP
Forum Members
Forum Members
Posts: 19
Joined: Tue Dec 19, 2006 8:41 pm

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

Post 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.
Post Reply

Return to “CMSMS Core”