Page 1 of 1

Blank File in Uploads Module

Posted: Tue Feb 08, 2011 8:28 pm
by jtcreate
Hi,

I'm running 1.9.1 with FEU 1.12.10, Uploads 1.11.5 and SelfRegi 1.6.7. I've got a 'blank file' showing up in all of my uploads categories:

Code: Select all

<div class="upload" style="float: left; width: 33%;"><a href="http://www.mydomainname.com/uploads/0/.php" title="Download"></a><br />Size: 0 KB<br/>Date: <br/><br /></div>
Template is this:

Code: Select all

{foreach from=$items item='entry' name='uploads'}
  {if ($smarty.foreach.uploads.index == 0) or ($smarty.foreach.uploads.index % 3 == 0)}
    <div class="row" style="width: 100%; padding-bottom: 0px;">
  {/if}<div class="upload" style="float: left; width: 33%;"><a href="{$entry->download_url}" title="Download This File!">{$entry->upload_name}</a><br />Size: {$entry->size} KB<br/>{$date}: {$entry->date}<br/><br /></div>{if ($smarty.foreach.uploads.index == 0) or ($smarty.foreach.uploads.index % 3 == 0)}
    </div>
  {/if}
Not sure where this is coming from... any help is most appreciated. I checked all the folders on the server and don't see any hidden files...

Thanks.
.jt.

Re: Blank File in Uploads Module

Posted: Tue Feb 08, 2011 10:17 pm
by jtcreate
Update: on the page, it has category="all" and it's set to only show what the authorized user is allowed to see. This is actually working. When I change category="all" to a specific category, the blank file goes away.

I checked the database, but don't see anything in there that's blank either... so, still not sure where this is coming from. Thanks.

Re: Blank File in Uploads Module

Posted: Tue Feb 08, 2011 10:19 pm
by jmcgin51
is this showing up in the backend or the frontend, or both?

Re: Blank File in Uploads Module

Posted: Tue Feb 08, 2011 10:24 pm
by jtcreate
I only see the file on the frontend.

Re: Blank File in Uploads Module

Posted: Wed Feb 09, 2011 3:45 am
by jmcgin51
jtcreate wrote:Hi,
Template is this:

Code: Select all

{if ($smarty.foreach.uploads.index == 0) or ($smarty.foreach.uploads.index % 3 == 0)}
Forgive me for my ignorance, but what is the purpose of this IF statement?

Re: Blank File in Uploads Module

Posted: Wed Feb 09, 2011 11:26 am
by jtcreate
Honestly, I'm not sure. It was in the default template and when I did my modifications to the template for my own setup, I left it in.

Re: Blank File in Uploads Module

Posted: Wed Feb 09, 2011 1:31 pm
by jtcreate
If I remove it, it kills the page (just tested it).

Re: Blank File in Uploads Module

Posted: Wed Feb 09, 2011 11:31 pm
by jmcgin51
can you be more specific? what exactly happens?? errors? no page html at all? etc...

Re: Blank File in Uploads Module

Posted: Thu Feb 10, 2011 6:27 pm
by jtcreate
It gives this error:

Code: Select all

string(193) "Smarty error: [in module_db_tpl:Uploads;summaryrpt_SC-SUMMARY-TEMPLATE line 35]: syntax error: mismatched tag {/if}. expected {/foreach} (opened line 26). (Smarty_Compiler.class.php, line 2303)" string(160) "Smarty error: [in module_db_tpl:Uploads;summaryrpt_SC-SUMMARY-TEMPLATE line 39]: syntax error: mismatched tag {/foreach}. (Smarty_Compiler.class.php, line 2303)" 
Parse error: syntax error, unexpected T_ENDIF in /path/to/home/public_html/tmp/templates_c/Uploads^%%C3^C3E^C3E6AECD%%module_db_tpl%3AUploads%3Bsummaryrpt_SC-SUMMARY-TEMPLATE.php on line 70

Re: Blank File in Uploads Module

Posted: Thu Feb 10, 2011 11:04 pm
by jmcgin51
that's because you removed the opening {if} statement, but left the closing {/if} tag. If you remove one, you have to remove the other. If you remove a {foreach}, you have to remove its companion {/foreach}, etc.

Like in HTML. For every <p>, you have to have a </p>. If you remove a <p>, you have to remove the corresponding </p>.

Re: Blank File in Uploads Module

Posted: Fri Feb 11, 2011 1:49 pm
by jtcreate
True. My error when I removed the code. However, I did go back and remove everything properly and I still see the blank file. Thanks for the catch.

Re: Blank File in Uploads Module

Posted: Thu Jun 23, 2011 1:15 pm
by zounars
hello all,
I have the same problem, a blank file on the front end.

Please let me know if you got a solution for this.

i'm using this tag {cms_module module="Uploads" category="all" mode="summary"} with the default templates.

CMSMS 1.9.3
Uploads 1.12
php 5.2.15
MySQL 5.1.52

Thanks in advance.

Re: Blank File in Uploads Module

Posted: Thu Jun 23, 2011 1:18 pm
by jtcreate
Unfortunately, no. I would LOVE to find a solution.

Re: Blank File in Uploads Module

Posted: Wed Oct 12, 2011 8:47 pm
by jtcreate
Refreshing this topic... anyone have a solution for this? Help is appreciated.