#1 Re: Bug Reports » Image UPLOAD feature not working... » August 14, 2016 1:16am

Hi Tim, I have installed BigTree on a NearlyFreeSpeech hosting account, and I'm experiencing the same errors as above in the /core/admin/ajax/file-browser/upload.php file. It appears that there is something weird about the /tmp folder permissions? I set up and linked to a Google Cloud Storage service to see if that would clear up the issues, but it doesn't appear to help. My hosting account limits permission to most folders outside of the /public folder. To expand upon the previous person's request, I noticed the following is shown in the file_manager_upload_frame iframe as well:

<html><head></head><body><script><br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1105</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1321</b><br />
<br />
<b>Warning</b>:  unlink(/home/tmp/phpaQFUxt): No such file or directory in <b>/home/public/core/admin/ajax/file-browser/upload.php</b> on line <b>102</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1105</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1321</b><br />
<br />
<b>Warning</b>:  unlink(/home/tmp/phpaQFUxt): No such file or directory in <b>/home/public/core/admin/ajax/file-browser/upload.php</b> on line <b>102</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1105</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1321</b><br />
<br />
<b>Warning</b>:  unlink(/home/tmp/phpaQFUxt): No such file or directory in <b>/home/public/core/admin/ajax/file-browser/upload.php</b> on line <b>102</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1105</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1321</b><br />
<br />
<b>Warning</b>:  unlink(/home/tmp/phpaQFUxt): No such file or directory in <b>/home/public/core/admin/ajax/file-browser/upload.php</b> on line <b>102</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1105</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1321</b><br />
<br />
<b>Warning</b>:  fopen(/home/public/site/files/temp-57b00a2e9aa27.png): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>874</b><br />
<br />
<b>Warning</b>:  filesize(): stat failed for /home/public/site/files/temp-57b00a2e9aa27.png in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>875</b><br />
<br />
<b>Warning</b>:  curl_setopt(): supplied argument is not a valid File-Handle resource in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>436</b><br />
<br />
<b>Warning</b>:  fclose() expects parameter 1 to be resource, boolean given in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>876</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>884</b><br />
<br />
<b>Warning</b>:  unlink(/home/public/site/files/temp-57b00a2e9aa27.png): No such file or directory in <b>/home/public/core/inc/bigtree/apis/storage.php</b> on line <b>240</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1105</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1321</b><br />
<br />
<b>Warning</b>:  fopen(/home/public/site/files/temp-57b00a2eab7e5.png): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>874</b><br />
<br />
<b>Warning</b>:  filesize(): stat failed for /home/public/site/files/temp-57b00a2eab7e5.png in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>875</b><br />
<br />
<b>Warning</b>:  curl_setopt(): supplied argument is not a valid File-Handle resource in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>436</b><br />
<br />
<b>Warning</b>:  fclose() expects parameter 1 to be resource, boolean given in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>876</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>884</b><br />
<br />
<b>Warning</b>:  unlink(/home/public/site/files/temp-57b00a2eab7e5.png): No such file or directory in <b>/home/public/core/inc/bigtree/apis/storage.php</b> on line <b>240</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1105</b><br />
<br />
<b>Warning</b>:  getimagesize(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>1321</b><br />
<br />
<b>Warning</b>:  fopen(/home/public/site/files/temp-57b00a2eba1d2.png): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>874</b><br />
<br />
<b>Warning</b>:  filesize(): stat failed for /home/public/site/files/temp-57b00a2eba1d2.png in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>875</b><br />
<br />
<b>Warning</b>:  curl_setopt(): supplied argument is not a valid File-Handle resource in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>436</b><br />
<br />
<b>Warning</b>:  fclose() expects parameter 1 to be resource, boolean given in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>876</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>884</b><br />
<br />
<b>Warning</b>:  unlink(/home/public/site/files/temp-57b00a2eba1d2.png): No such file or directory in <b>/home/public/core/inc/bigtree/apis/storage.php</b> on line <b>240</b><br />
<br />
<b>Warning</b>:  fopen(/home/tmp/phpaQFUxt): failed to open stream: No such file or directory in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>874</b><br />
<br />
<b>Warning</b>:  filesize(): stat failed for /home/tmp/phpaQFUxt in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>875</b><br />
<br />
<b>Warning</b>:  curl_setopt(): supplied argument is not a valid File-Handle resource in <b>/home/public/core/inc/bigtree/utils.php</b> on line <b>436</b><br />
<br />
<b>Warning</b>:  fclose() expects parameter 1 to be resource, boolean given in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>876</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/public/core/inc/bigtree/apis/cloud-storage.php</b> on line <b>884</b><br />
<br />
<b>Warning</b>:  unlink(/home/tmp/phpaQFUxt): No such file or directory in <b>/home/public/core/inc/bigtree/apis/storage.php</b> on line <b>240</b><br />
parent.BigTreeFileManager.uploadError("site-logo.png is too large for the server to manipulate. Please upload a smaller version of this image.<br />site-logo.png is too large for the server to manipulate. Please upload a smaller version of this image.<br />site-logo.png is too large for the server to manipulate. Please upload a smaller version of this image.<br />site-logo.png is too large for the server to manipulate. Please upload a smaller version of this image.<br />site-logo.png is too large for the server to manipulate. Please upload a smaller version of this image.<br />Uploading site-logo.png failed (unknown error).","-5 files uploaded successfully.");</script></body></html>

Could I possibly set up a /tmp folder inside of the /home/public/ site root, instead of in /home/tmp/? Maybe I'm incorrect in my assumption though. Any help is appreciated. FYI, the file I'm attempting to upload is only 7-8 kb, so I don't think it's a file size issue.

Thanks as usual.

#2 Re: Developer Help » Image Crop Horizontal or Vertical » January 15, 2016 2:34pm

Thanks Tim. I'll see what I can do. Probably sounds more difficult than it actually is smile

#3 Re: Developer Help » Image Crop Horizontal or Vertical » January 15, 2016 2:31pm

Also, I guess I don't really want to crop now that I think of it. I'm interested in resizing the images. If the width is greater than the height, then scale it to a certain width, retaining the aspect ratio, and for images that are taller than they are wide, scale based on height.

#4 Developer Help » Image Crop Horizontal or Vertical » January 15, 2016 2:27pm

jesse.glaves
Replies: 4

I'm trying to build a module that can process photos of various sizes and orientation. I wanted to use the crops in the Upload field options to make a few different sizes (thumb, mid, large), but I'm not seeing a way to deal with photos when the orientation is unknown (may be vertical or horizontal). I'm probably overlooking a simple solution, but any help is appreciated. Thanks.

#5 Re: Developer Help » Media Gallery Field Type Extension Install Error » September 11, 2015 1:29pm

Very strange, I used curl, and now it says: The zip file uploaded was corrupt.

#6 Developer Help » Media Gallery Field Type Extension Install Error » September 11, 2015 1:14pm

jesse.glaves
Replies: 2

Hi there, I've upgraded to 4.2.7, and I'm trying to install the Media Gallery Field Type extension, and I'm receiving the error: The zip file uploaded does not appear to be a BigTree extension. Any ideas? Thanks.

#8 Developer Help » Conditional Cascading Module Form Design » August 26, 2015 1:12pm

jesse.glaves
Replies: 2

Is there any way in the current module design framework to build conditional cascading form elements? For example if a particular choice is selected in a dropdown another field can be shown or hidden.

#9 Re: Bug Reports » Photo Gallery after 4.2.5 update » August 13, 2015 1:12pm

Thanks Tim. I used the new code, but I'm getting a different error now. Before I dig into it, I thought I'd check to see if you might know what's going on first:

Uncaught TypeError: Cannot read property 'toString' of undefined        lib.js:45
        htmlspecialchars @ lib.js:45
        editPhoto @ demo.js:60
        x.event.dispatch @ lib.js:3
        x.event.add.v.handle @ lib.js:3

#10 Bug Reports » Photo Gallery after 4.2.5 update » August 7, 2015 1:43pm

jesse.glaves
Replies: 3

Hi there, Im experiencing some strange behavior with the Photo Gallery after updating to 4.2.5. I can't remember if I did something special to it or not, but here are the Javascript errors I am getting when I try to edit or delete photos from a Photo Gallery:

Uncaught TypeError: BigTreePhotoGallery.extend is not a function
Uncaught TypeError: CustomPhotoGallery is not a function

The icons do not respond when clicked. Thanks for the help.

#11 Re: Developer Help » 4.2.4 manual update » August 5, 2015 2:21pm

Updated to 5.2.5, and patched the Events module. Everything is working, thanks for the help.

#12 Re: Developer Help » 4.2.4 manual update » August 5, 2015 1:50pm

Great. Thanks Tim, that seems relatively painless.

#13 Developer Help » 4.2.4 manual update » August 4, 2015 5:59pm

jesse.glaves
Replies: 3

Hey there. What is the process for doing a manual update from 4.2.1 to 4.2.5? I received an early version of the Events extension from Tim a while back (before its official release), and the update to 4.2.1 appears to have broken the "all day" functionality of the Events - Date Chooser field. Also, when I click the blue wrench on that field, there are no configuration options available (maybe it has always been this way?). If I currently choose 'all day' on that field within the module, no value is written into the table column. On the official Events extension release page, the events module says that it only works on 4.2.4+, so I'm thinking that an update from 4.2.1 to 4.2.5 could possibly help with this situation? Again, Tim sent me an early version of the Events extension, so I'm wondering if an update to 4.2.5, and perhaps an additional update of the Events extension could fix this issue, but I'm not sure how to manually update the site files, and run the sql updates without being prompted by the CMS to do the update like I experienced with the major 4.2 release. The site is not currently prompting me to update anything. Thanks.

#14 Re: Developer Help » Matrix Field Titles and Subtitles » June 25, 2015 1:42pm

Another issue that I'm having with the matrix field is that the list items always appear blank for some reason. It would be nice if I could choose one of the values to be the display text. I've tried checking the "Use as Title" checkbox but it doesn't seem to make a difference.

OF_Qu85kVgCTbBqNkmC8esz0-zvC0ZZebUQlm2_q9iM?size=1600x1200&size_mode=2

#15 Re: Developer Help » Matrix Field Titles and Subtitles » June 25, 2015 12:54pm

Thanks Tim. I'm working on a College Council Reports page. The module will allow a user in the Director's office to enter multiple reports, a single compiled full packet file, a single agenda file, and a single minutes file for each month's council meeting. Each month is one entry in the module. Reports from different areas/departments of the college are prepared for the council to keep them informed about the activities in the various areas of the college. I want to have a slot to upload each report as they are received from the departments, because they don't all come in at the same time.

The fields are as follows:

Date > Date Field
Reports > Matrix Field
        College Director (id: director) > Upload Field
        Administrative Services (id: admin_services) > Upload Field
        Assistant Director for Academic Affairs (id: asst_dir_academic_affairs) > Upload Field
        etc...
Full Meeting Packet > Upload Field
Agenda > Upload Field
Minutes > Upload Field

When a meeting entry in the module is archived, it is added to an archive of previous meetings that can still be accessed.

So the issue is specifically with the matrix field that I am using for the reports. I don't really need the name of the file like you mentioned, although I could see how that would be very useful for other applications. I want to be able to access the Title and Subtitle values that are entered when creating the matrix > upload fields:

matrix

With the current functionality, because my ID value doesn't usually match the value I want to show for the title, I would currently have to write code to manually enter the title like so:

echo "<tr><td>College Director</td><td><a href="\"".$report["director"]."\">Download</a></td></tr>";
echo "<tr><td>Administrative Services</td><td><a href="\"".$report["admin_services"];
echo "<tr><td>Assistant Director for Academic Affairs</td><td><a href="\"".$report["asst_dir_academic_affairs"];

Because those values don't seem to be included in the reports column:

[{"__internal-title":"","__internal-subtitle":"","director":"{staticroot}files\/pages\/director.pdf","admin_services":"{staticroot}files\/pages\/adminservices.pdf","asst_dir_academic_affairs":"{staticroot}files\/pages\/asstdiracademicaffairs.pdf"}]

I was able to find the titles and subtitles in the bigtree_modules_forms table. I guess I could figure out a way to blend these two columns' values in PHP, but that seems like an extra step that shouldn't be necessary.

{"title":"Reports","subtitle":"Upload the individual reports here","type":"matrix","options":{"max":"1","style":"callout","columns":
[{"type":"upload","id":"director","title":"College Director","subtitle":"test","display_title":"on","options":""},
{"type":"upload","id":"admin_services","title":"Administrative Services","subtitle":"test","display_title":"on","options":""},
{"type":"upload","id":"asst_dir_academic_affairs","title":"Assistant Director for Academic Affairs","subtitle":"test","display_title":"on","options":""}
]},"column":"reports"}

Maybe I'm just thinking of this the wrong way, but it seems like any values you enter for each field when creating the module should show up in that field's column in the table. Any help is appreciated!

Thanks Tim.

#16 Developer Help » Matrix Field Titles and Subtitles » June 24, 2015 4:33pm

jesse.glaves
Replies: 4

Hi there. I'm trying to use the Matrix field that contains a list of upload fields. I've went through and filled out the title for each of the upload fields, and tried a couple of the subtitles too, but the title and subtitle info doesn't seem to be showing in the database anywhere. I can't find where to retrieve that information. There is a blank "__internal-title":"","__internal-subtitle":"" record before everything else in the database value, but they are empty and they only appear once, not a pair for each upload field like I would expect. Thanks!

#18 Re: Bug Reports » Upload Selector Required Field » April 29, 2015 12:11pm

No /custom/ changes to upload.php. I took a good look at the admin > form-field-types > draw > upload.php, and didn't see anything that looked suspicious. I actually temporarily put the old upload.php code in there just to see if that made any difference, and I still experienced the same issue. So, whatever is happening doesn't seem to be directly related to the upload.php code itself. I'll email the db. Thanks Tim.

#19 Re: Bug Reports » Upload Selector Required Field » April 28, 2015 1:01pm

It sounds like this behavior is not by design, and has not been experienced by anyone else post-4.1.7/4.2.1 upgrade. I'm always the lucky one smile I'm definitely lost on how I should proceed. I could try adding a new upload field to the module, and re-enter all of the images that have been uploaded since launch, but I really can't afford to spend that much time on this at the moment. However, leaving it as is; forcing users to re-upload a photo every time they make a change to a module record is not really realistic either. I don't even think we could track down all of the original images at this point. And I can't just remove the required validation on the field either. Leaving it empty will not satisfy the requirements of the templates. I'll take a look at the upload field code and see if I can spot the issue.

#20 Re: Bug Reports » Array of Items Fields » April 27, 2015 7:51pm

I was using Array of Items to choose from a list of Job Type checkboxes. There are a lot of job types, so I wasn't looking forward to redoing it! smile

#21 Re: Bug Reports » Array of Items Fields » April 27, 2015 7:49pm

Specifically, it's module ID 30 that I'm currently experiencing issues with.

#23 Re: Bug Reports » Upload Selector Required Field » April 27, 2015 7:39pm

Just a standard upload field, with required checked and some crops manually set up.

#24 Re: Bug Reports » Upload Selector Required Field » April 27, 2015 7:11pm

I haven't tried it in a clean install, but I could snap a screenshot of the issue if you like. I'm currently running 4.2.1 though.

#25 Bug Reports » Array of Items Fields » April 27, 2015 7:10pm

jesse.glaves
Replies: 4

Any modules where I previously used the array of items fields seem to be broken. The fields are no longer showing on the edit page, and if the module is edited, blank values are inserted into those columns, effectively deleting previous content. I've played with the matrix field, and it seems to do a much better job, so I'll use that going forward. I was kind of expecting array of items to least be supported, or upgraded, but it looks like I'll need to go through and identify all modules that use this functionality and convert to matrix fields asap before anything else gets deleted on accident.

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.