Blank File in Uploads Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Blank File in Uploads Module

Post 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.
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post 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.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Blank File in Uploads Module

Post by jmcgin51 »

is this showing up in the backend or the frontend, or both?
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post by jtcreate »

I only see the file on the frontend.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Blank File in Uploads Module

Post 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?
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post 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.
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post by jtcreate »

If I remove it, it kills the page (just tested it).
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Blank File in Uploads Module

Post by jmcgin51 »

can you be more specific? what exactly happens?? errors? no page html at all? etc...
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post 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
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Blank File in Uploads Module

Post 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>.
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post 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.
User avatar
zounars
Forum Members
Forum Members
Posts: 41
Joined: Tue Jun 20, 2006 11:38 am

Re: Blank File in Uploads Module

Post 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.
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post by jtcreate »

Unfortunately, no. I would LOVE to find a solution.
User avatar
jtcreate
Forum Members
Forum Members
Posts: 168
Joined: Wed Mar 21, 2007 11:01 am

Re: Blank File in Uploads Module

Post by jtcreate »

Refreshing this topic... anyone have a solution for this? Help is appreciated.
Post Reply

Return to “Modules/Add-Ons”