We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Extension: nGen File Field for FieldFrame

Development and Programming

Jason Morehead's avatar
Jason Morehead
454 posts
16 years ago
Jason Morehead's avatar Jason Morehead

I’ve done a quick search of this thread, but couldn’t find any mention of this problem. But apologies in advance if it’s already been addressed.

I’ve got an issue where I can upload an image via the CP and I can see it in the CP, verify that it exists in the server directory, can navigate to it via its URL, etc. However, when I try an include the image in my template via the custom field, nothing’s there.

In other words, I have a custom field called “Page Photo” with the short name of “page_photo”. However, when I include the custom field in my template like so, nothing happens:

{page_photo}

I’m doing something similar on other templates with other weblogs, with no problem. The only difference that I can think of is that the weblog that this field is associated with is being managed via the Structure module (i.e., I’m using it for “static” pages).

I’m using FieldFrame 1.1.3 and nGen File Field 0.9.8. Also, to add some further excitement to the mystery, the site in question is using MSM to manage two sites. And on the second site, the above code works just fine.

       
Dan Lovejoy's avatar
Dan Lovejoy
115 posts
16 years ago
Dan Lovejoy's avatar Dan Lovejoy

Well, that was dead-obvious. A bug ate the jQuery extension. (The language file was still there, but not the extension - weird.)

(For future reference - you must have nGen/Ellis Lab’s jQuery for the CP installed: http://www.ngenworks.com/software/ee/cp_jquery/ for nGen File Field to work)

Thanks, Fred!

       
Austin Siewert's avatar
Austin Siewert
129 posts
16 years ago
Austin Siewert's avatar Austin Siewert

Not sure whats going on? Was working last week, and now I’m getting these fatal errors:

Warning: exif_imagetype(/var/www/vhosts/domain.com/httpdocs/assets/products/logos/f) [function.exif-imagetype]: failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 742

Warning: unlink(/var/www/vhosts/domain.com/httpdocs/assets/products/logos/f) [function.unlink]: No such file or directory in /var/www/vhosts/domain.com/httpdocs/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 335

Fatal error: Cannot unset string offsets in /var/www/vhosts/domain.com/httpdocs/system/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 340
       
Ridge's avatar
Ridge
44 posts
16 years ago
Ridge's avatar Ridge

OK this is weird. I’m using the File Field to upload images to entries. Everything was working fine until this afternoon - the image was outputting into the template code (where it was being sized by the Image Sizer plugin). Now, no image is being output. I’ve already tested to make sure Image Sizer isn’t to blame (it isn’t - the image still doesn’t output when I remove the reference to Image Sizer in the template), and I’m not sure where to look next.

I have the same template code, same markup, same images in the same entries as I did 6 hours ago. Nothing changed in the site at all. Only now, I don’t see any images, and 6 hours ago I did!

Oddly, I added another file field as a test, uploaded the SAME image as is in my original file field and called the new field name in my template code and it worked perfectly again. It’s almost as if it’s suddenly stopped displaying any images uploaded to the field called {main_image}.

Bizarre.

Edited to add version information: FieldFrame: 1.1.2 nGen File Field: 0.9.8 EE: 1.6.7 20090515

       
negs's avatar
negs
43 posts
16 years ago
negs's avatar negs

This add-on is great - very exciting.

I have one bug, which is that when I upload a file from the entry editor (publish and edit), in the control panel, the file can upload successfully, and I can click on the link to the image and view the image in the browser… BUT, there is no preview of the image shown in the entry editor. I looked at the rendered code through firebug, and it turns out that the path is being created incorrectly:

<a href="http://mydomain.com/images/uploads/team/dan.jpg%22class=%22ngen-file-link" class="ngen-file-link" target="_blank" rel="noopener">_http://mydomain.com/images/uploads/team/_dan.jpg_</a>

See how the image path is only the folder, and then the file name is outside the image tag?

Do you know what this is? I suppose it isn’t the end of the world, but I’d like to be able to pass this off to the client with as high ease of use as possible, and image previews help quite a bit.

I also checked if it was my upload directory preferences, by uploading an image through the default ‘upload file button’, into the same directory, and it appears without issue in the control panel.

The picture appears with no problem when I display it in the template.

Thanks!

       
Brian Litzinger's avatar
Brian Litzinger
693 posts
16 years ago
Brian Litzinger's avatar Brian Litzinger

negs, I have a similar problem, but in reverse. My images appear fine in the control panel, but in my template, the directory path is not there at all. In my template I have {home_photo}, which used to render the entire path to the image, but now I had to change the template to images/uploads/site-images/{home_photo}. The image appears fine in the control panel, just not the templates. This isn’t a huge issue, but doesn’t make it as easy to manage assets if I have to hard code the directory in the template.

       
Emily Heath's avatar
Emily Heath
197 posts
16 years ago
Emily Heath's avatar Emily Heath

My nGen file field, which is required, is not being recognised as a required field. I can save without uploading a file. Any ideas?

@Siebird I was having a similar problem as you - it was working before and then it wasn’t - but now that problem has gone and I have a new one!!! I had a fiddle around with settings to do with the nGen file field being a required field, and now I’m not getting that error anymore, but my error started “Warning: getimagesize” [and referred to the ft.ngen_file_field.php file].

       
Derek Hogue's avatar
Derek Hogue
316 posts
16 years ago
Derek Hogue's avatar Derek Hogue

I wonder if there’s anyway we can cut down on the number of queries run by File Field? I have a page displaying 40 images, which are being resized by Image Sizer. I’m getting 80 identical queries run like so:

SELECT * FROM exp_upload_prefs WHERE id = 2

I’m no MysQL whiz, but there must be some way to cache the upload path for a field?

Regardless - excellent extension, incredibly valuable - thanks.

Derek

       
Jorge Molina's avatar
Jorge Molina
12 posts
16 years ago
Jorge Molina's avatar Jorge Molina

Simple problem…I hope 😊

I installed File Field 0.9.8; everything is working except I don’t get the trash can icon or the chose button. I’m guessing is is related to the image or the styles folder, but can’t figure it out.

Jorge

       
illvibe's avatar
illvibe
19 posts
16 years ago
illvibe's avatar illvibe

I’m also running into troubles using the latest version. The extension seems be looking for the images in the wrong location by doubling the subfolder in the url. Eg:

Any ideas?

       
illvibe's avatar
illvibe
19 posts
16 years ago
illvibe's avatar illvibe

Ok, so I’m pretty sure the doubled up subfolder problem is stemming from this line in ft.ngen_file_field.php

$upload_prefs['server_url'] = $FNS->remove_double_slashes( $PREFS->ini('site_url') . $upload_prefs['server_uri'] );

Does anyone with some PHP skills have any ideas why?

Thanks in advance!

       
Fred Boyle's avatar
Fred Boyle
73 posts
16 years ago
Fred Boyle's avatar Fred Boyle

New release! - Several bug fixes - New parameter, show=”filename” to show only the file name - New feature, preview selected image when using existing files

Download v0.9.9 + Documentation: http://www.ngenworks.com/software/ee/ngen-file-field/

       
bobh's avatar
bobh
145 posts
16 years ago
bobh's avatar bobh

gone fishin

       
Jérôme Coupé's avatar
Jérôme Coupé
122 posts
16 years ago
Jérôme Coupé's avatar Jérôme Coupé

First of all, thanks for this “gem filetype” it’s really awsome !

2 Small problems here:

  1. After upgrading to nGen File Field v0.9.9 and FiledFrame 1.2.2, I get the following message on top of the CP page when I edit any custom field property:
Notice: Undefined property: Ngen_file_field::$upload_prefs in G:\weblocal\www\blog\system\extensions\fieldtypes\ngen_file_field\ft.ngen_file_field.php on line 310

Could anyone point me to a solution ? I have looked at my upload paths and they haven’t changed (Working on a local WAMP install). The message appears every time I edit the properties of any field.

  1. When uploading a new pict for the first time, the picture is not uploaded and exif_imagetype throws an error. When I reupload image for the 2nd time, it works. This happens in standalone fileds and in FF matrix.

Reverted back to the previous working version (0.9.7). With 0.9.8 I had the duplicate folder bug mentioned above (was ok if a relative path was specified instead of an absolute one for the upload dir).

*** UPDATE: everything was solved using the v0.9.10 ! Many thanks to Fred Boyle for the super quick and efficient support.

       
Jérôme Coupé's avatar
Jérôme Coupé
122 posts
16 years ago
Jérôme Coupé's avatar Jérôme Coupé

@bobh

What version of imgsizer are you using ? Some of us had the same folder duplication problem a while back with that plugin. Was solved by upgrading. Have a look to the linked thread … HTH

       
First 17 18 19 20 21 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.