Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2008
    Location
    Utah, USA
    Posts
    182
    Plugin Contributions
    10

    Default Error: File type not allowed. .0

    I upgraded my zencart website to the latest release (1.56). The site has been working for about 10 years. Some of our products have the file upload attribute. After upgrading I am getting an error that the file type is not allowed (.jpg). The error is: "Error: File type not allowed. .0"

    I can not determine how to fix it, or set what file types are allowed for the attribute upload. It worked before the upload.
    Zen Cart Help and Design

    If you donít build your dream, someone else will hire you to help them build theirs.

  2. #2
    Join Date
    Jan 2004
    Posts
    65,414
    Blog Entries
    7
    Plugin Contributions
    232

    Default Re: Error: File type not allowed. .0

    Why is the file coming in named as ".0" ? If you want to allow *.0 files, add the .0 to the list of supported file types.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2012
    Posts
    15,131
    Plugin Contributions
    17

    Default Re: Error: File type not allowed. .0

    Quote Originally Posted by DrByte View Post
    Why is the file coming in named as ".0" ? If you want to allow *.0 files, add the .0 to the list of supported file types.
    Unfortunately, the fix for ZC 1.5.6c, specifically set the check against items in the maximum configuration area to require being an integer. This was identified "later(?)" as being too stringent. A result of that is that when the error message for the upload class is generated:
    Code:
                   $this->message_stack(ERROR_FILETYPE_NOT_ALLOWED . ' .' . implode(', .', $this->extensions), 'error');
    It somewhat seems as if one has entered an extension of "0" or ".0", but as can be seen in the above message, the extension list is "pulled" from and a period is applied as a prefix. Therefore, even though a valid extension (or extension list) was present at some point, pre-processing of the extension list in ZC 1.5.6c (without the additional "fix" provided in the newer ZC v156 branch) causes the extension(s) to be 0 and not matching the attempted upload unless someone has actually renamed their file to have a ".0" extension. Could do that I guess if they left the expected extension before that. So a file called mypic.jpg could be stored on their own computer as mypic.jpg.0 and the store owner would have to remove the ".0" to get back to the original filename...

    See: https://github.com/zencart/zencart/b...ead.php#L24-25

    As compared to:
    https://github.com/zencart/zencart/b...ead.php#L24-25

    For those not seeing the lines being highlighted after following the above link(s), the lines in question are 24 and 25, specifically the differences in line 25...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  4. #4
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    230
    Plugin Contributions
    0

    Default Re: Error: File type not allowed. .0

    I'm having the same problem. My file type that I'm trying to upload is a .jpg (I've also tried .png) and it is not being allowed. The error message I'm getting in the shopping cart is "Error: File type not allowed. .0"
    Sorry MC1245678, I don't think I understand what changes I am to make.
    Running V1.5.6c
    Site: af-company.com
    Thanks, Colleen
    www.af-company.com
    To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

  5. #5
    Join Date
    Jul 2012
    Posts
    15,131
    Plugin Contributions
    17

    Default Re: Error: File type not allowed. .0

    Quote Originally Posted by margecc View Post
    I'm having the same problem. My file type that I'm trying to upload is a .jpg (I've also tried .png) and it is not being allowed. The error message I'm getting in the shopping cart is "Error: File type not allowed. .0"
    Sorry MC1245678, I don't think I understand what changes I am to make.
    Running V1.5.6c
    Site: af-company.com
    This is the specific change to incorporate:
    https://github.com/zencart/zencart/c...e29091be6c3b66
    It's result can be seen in the first link that I posted:
    See:
    https://github.com/zencart/zencart/b...ead.php#L24-25
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  6. #6
    Join Date
    Feb 2007
    Location
    Ontario, Canada
    Posts
    230
    Plugin Contributions
    0

    Default Re: Error: File type not allowed. .0

    That fix worked perfectly, thank you very much. Sorry mc12345678, now that I reread your original post was completely clear. This is what happens with you move to working from home and homeschooling at the same time. Your brain melts down.
    Thanks, Colleen
    www.af-company.com
    To err is human, but to really foul things up requires a computer. Farmers' Almanac, 1978

 

 

Similar Threads

  1. Replies: 12
    Last Post: 19 Apr 2017, 03:00 PM
  2. v151 Cannot install due to server error: .htaccess: IndexIgnore not allowed here
    By drmiller in forum Installing on a Linux/Unix Server
    Replies: 0
    Last Post: 21 Jun 2013, 05:52 PM
  3. v150 Downloads: Error for .prc e-book file type download
    By madmumbler in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Oct 2012, 03:54 PM
  4. Whoops! Sorry, but you are not allowed to perform the action requested error
    By akabin in forum Upgrading from 1.3.x to 1.3.9
    Replies: 12
    Last Post: 19 Nov 2010, 03:34 AM
  5. File Not within allowed path
    By megametta in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 13 Dec 2006, 07:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR