I just discovered an error on a site I built in 2007. The site uses Huot’s File version 2.1.2 and I just updated to EE 1.6.6. The error occurs when I remove the LAST file in a custom field of type “File,” (it is set to allow multiple files per field). When I remove the LAST file, I end up with a blank line at the end of the field in the database (like a carriage return), which EE thinks is a line I guess indicating a file that has no name?
My template looks like this:
{if photos_after}
{photos_afters}
<a href="http://{photos_after}">"]_ http://chrisdavisdesign.com/phpThumb/phpThumb.php?src={photos_after}&w=78&h=78&zc=1&new;</a>
{/photos_afters}
{/if}
If I start with, say, 6 files in this field, when I remove the sixth file, the file itself is removed from the server, and the file name is removed from the database, but when the template runs EE returns 6 lines for the field, where the sixth one just has a blank file name (so it ends up being a link to the parent folder):
“]http://chrisdavisdesign.com/phpThumb/phpThumb.php?src=/images/uploads/&w=78&h=78&zc=1&new;.
Looking in phpMyAdmin, I see a sort of carriage return at the end of the database field where the sixth entry was. When I remove this, EE returns the 5 correct entries, and the weird sixth entry no longer appears.
I know this extension is no longer in development, but since everything else on this site is working fine I would prefer the fast solution over the best solution.
Help?
Hey Mark, I dont know if you or anyone here can help us with this but we seem to be having an issue with items added using file… for some reason the field_XX_ft cell is filling in as null instead of “xhtml” or anything like that which is causing templates not to render at all.,.
Seems very strange..
We had to do some upgrades and we had sort of panic few days where we were enabling and disablign all sorts of things across the site. We think we put everything back together, this is the one remaining piece
Any help would be amazing
thanks everyone!
Hello there, sorry maybe this was discussed here - i tried to find but with no sucess. I’m trying to get the total number of uploaded files with this extension by:
{custom_field}
{total_results}
{/custom_field}
but this outputs me the paths of the images (+ the total number) Is there some way to get rod of the paths and get only the number outputted ?
bump? playing with file field trying to use SWITCH to place output images in two columns
{my_custom_field}
<div class="{switch='img-left|img-right|clear'}">
<a href="http://{file_url}">{exp:imgsizer:size src="{file_url}" width="400" alt="{title}"}</a>
</div>
{/my_custom_field}
…but my output is only …div class=”img-left” and nothing else any ideas ?
I’m really sorry but I have to go back a couple of pages and again try returning the total results of uploaded images JUST ONCE:
{exp:weblog:entries weblog="{wb}" disable="pagination|trackbacks|member_data" show_expired="yes"}
Total Images: {event_pictures}{total_results}{/event_pictures}
This is my Image URL: {event_pictures}{file_url}{/event_pictures}
{/exp:weblog:entries}
this way and all ways on page 49 and 50 always returning me a loop through all the uploaded files - 9 9 9 9 9 9 9 9 9 for nine files Can anyone did this counting with PHP and how?
Have you tried using {if count = total_results}{total_results}{/if} to just output it on the last page? Or to use PHP do something like:<?php $count = 0; ?> {event_pictures} "Output the pictures however" <?php $count++; ?> {/event_pictures} <?php echo $count; ?>
This works in both ways - many many thanks!
Hello!
I have not run as downloading a few pictures. Item “Allow Multiple” is turned on and allows you to add multiple files. But after saving the recording I get only the first image in the quantities that I downloaded and the same number of thumbnails.
If you upload one picture at a time - everything works fine. What I can not work properly?
Hi. When I installed this extension and enabled extensions on my EE Core installation, I get a nasty error that will not let me access my CP any more. I followed your instructions explicitly for installing then enabling extensions. Your extension is the only one I have on this site.
The errors I get are:
Warning: Missing argument 1 for edit_upload_prefs() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 326
Warning: Missing argument 1 for edit_field_groups() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 183
I also get the following errors when I load the site itself:
Warning: Missing argument 1 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109
Warning: Missing argument 2 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109
Warning: Missing argument 1 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109
Warning: Missing argument 2 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109
Warning: Missing argument 1 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109
Warning: Missing argument 2 for modify_template() in /nfs/c02/h07/mnt/18903/domains/click-boom.com/html/click/boom/extensions/ext.mh_file_ext.php on line 1109
Any ideas here?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.