texobyte

Odd behavior when uploading images

Recommended Posts

I have been plagued by this issue since day one. I cannot access or use any image I have uploaded. I can see them in the directory on the server and when I click on an image I can see a preview in the editor but as the video Video in my dropbox shows it doesn't provide me with a way to utilize those images. I can't see anything obvious.

I did upgrade to 3.0.34 and have left the site pretty bare bones until this issue is resolved.

 

Thanks in advance!

processwire-images-bug.mp4

Share this post


Link to post
Share on other sites

My guess would be that your assets/files folder doesn't have read permission.

Do a quick recursive change (to get all the subfolders as well) to 777 to test and if that works, then sort out the proper owner/permission settings.

Share this post


Link to post
Share on other sites

What seems a bit strange is that the full image is displayed alright on click on the thumbnail, but the thumbnails and pwimage don't work. If it were read permissions, the full image shouldn't be visible either.

My first three items to check would be:

  • Third party modules
  • Apache's mod_security
  • Browser security plugins

The raw requests made for the thumbnails might also be worth a look.

Share this post


Link to post
Share on other sites

Permissions changed.

I noticed in the response header the x-xss-protection: 1; mode = block: is that an issue?

HTTP/1.1 200 OK
Date: Wed, 28 Sep 2016 17:41:41 GMT
Content-Type: image/jpeg
Content-Length: 42
Server: Apache/2
X-Frame-Options: SAMEORIGIN
Last-Modified: Wed, 28 Sep 2016 17:41:39 GMT
Etag: "2a-53d94dfa00482"
Accept-Ranges: bytes, bytes
Cache-Control: max-age=2592000
Expires: Fri, 28 Oct 2016 17:41:41 GMT
x-xss-protection: 1; mode=block
Connection: Keep-Alive
Age: 0

 

Share this post


Link to post
Share on other sites
Just now, texobyte said:

Permissions changed.

I noticed in the response header the x-xss-protection: 1; mode = block: is that an issue?


HTTP/1.1 200 OK
Date: Wed, 28 Sep 2016 17:41:41 GMT
Content-Type: image/jpeg
Content-Length: 42
Server: Apache/2
X-Frame-Options: SAMEORIGIN
Last-Modified: Wed, 28 Sep 2016 17:41:39 GMT
Etag: "2a-53d94dfa00482"
Accept-Ranges: bytes, bytes
Cache-Control: max-age=2592000
Expires: Fri, 28 Oct 2016 17:41:41 GMT
x-xss-protection: 1; mode=block
Connection: Keep-Alive
Age: 0

 

Never mind - that's not it according to Google.

Share this post


Link to post
Share on other sites

Ok on the server when viewing the .jpgs I click on the full size images and I get the image but on the thumbnails that are generated I get

Quote

The image "http://texobyte.com/site/assets/files/1021/zenbook_review-10.0x260.jpg" cannot be displayed because it contains errors.

Thumb: http://texobyte.com/site/assets/files/1021/zenbook_review-10.0x260.jpg

Full size: http://texobyte.com/site/assets/files/1021/zenbook_review-10.jpg

Share this post


Link to post
Share on other sites

Might also be a memory issue or a case of format incompatibility between your images and GD. Maybe this thread could be helpful:

 

  • Like 1

Share this post


Link to post
Share on other sites

It is a memory issue, this is the error in the log.

Quote

/hermes/bosnaweb17a/b2188/ipg.texobytecom/texobyte/site/assets/files/1021/zenbook_review-2.1080x0.jpg - zenbook_review-2.1080x0.jpg - not enough memory to load

ill take a look down this path.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By benbyf
      One of my clients found a bug when viewing the PW admin on chrome using windows - the admin tab nav doesn't appear, they could only see the tool icon either though they were a superadmin user. When viewed on Edge the tabs where present. The site is running on PW 3.0.62 with the default admin.
      I was screen sharing with my client when we found the bug, I don't actually have anyway to test this and see what's wrong myself as I dont run windows and dont currently have a cross broswer testing suite. Could someone please look into it briefly?
    • By ridgedale
      Reference: PW 3.0.62 and uikit3 based site using the Regular-Master profile.
      I wonder if anyone has come across the problem of displaying images within the <figure> element before.
      When editing a page:
      If an image is added inside <p></p> tags without any align assigned, it displays normally at the size the user has specified. See screen grab example 1.
      If an image is placed inside the <figure> element and left or right alignment applied, the size the image is displayed as in the editing view is significantly reduced. See screen grab example 2.
      If an image is placed inside the <figure> element and center alignment applied, the size the image completely disappears in the editing view with only the caption text showing. See screen grab example 3.
      The code used to display an image in <p></p> tags without aligment assigned is standard:
      <p><img alt="" src="/<path-to-image>/image.jpg" width="128" /></p> Examples of the code automatically being generated by PW3/UiKit3 from within the image editing interface are:
      <figure class="align_left"><img alt="" src="/<path-to-image>/image.jpg>" width="128" /> <figcaption>Caption text</figcaption> </figure> <figure class="align_right"><img alt="" src="/<path-to-image>/image.jpg>" width="128" /> <figcaption>Caption text</figcaption> </figure> <figure class="align_center"><img alt="" src="/<path-to-image>/image.jpg>" width="128" /> <figcaption>Caption text</figcaption> </figure> Important Note: The images and and captions actually do display correctly when the website is browsed, but from the editing perspective it is not practical.
      Any thoughts or advice would be appreciated.



    • By jploch
      Hi!
      I have a problem with uploading animated GIFs again.
      The upload starts, but never finishes and just loads forever.
      Iam running PW 3.0.62 and have the Image Animated GIF Module installed.

      I also increased the memory limit in the htaccess file in PW root directory like this:
      <IfModule mod_php5.c>
      php_value memory_limit 256
      php_value upload_max_filesize 64M
      php_value post_max_size 64M
      php_value max_execution_time 300
      php_value max_input_time 1000
      </IfModule> 
      I had this problem before, but was able to fix it with the Animated GIF Module and the modification of the htaccess file.
      So maybe this is related to the provider (strato).
      Here is the error I get, when uploading the GIF (1.1 MB filesize)
      Warning: preg_match_all() expects at least 3 parameters, 2 given in /mnt/web216/a2/50/51925650/htdocs/processwire/wire/core/PWGIF.php on line 252 Warning: preg_match_all() expects at least 3 parameters, 2 given in /mnt/web216/a2/50/51925650/htdocs/processwire/site/assets/cache/FileCompiler/site/modules/ImageAnimatedGif/ImageAnimatedGif.module on line 285 Warning: preg_match_all() expects at least 3 parameters, 2 given in /mnt/web216/a2/50/51925650/htdocs/processwire/wire/core/PWGIF.php on line 252 Warning: preg_match_all() expects at least 3 parameters, 2 given in /mnt/web216/a2/50/51925650/htdocs/processwire/wire/core/PWGIF.php on line 252 Warning: preg_match_all() expects at least 3 parameters, 2 given in /mnt/web216/a2/50/51925650/htdocs/processwire/site/assets/cache/FileCompiler/site/modules/ImageAnimatedGif/ImageAnimatedGif.module on line 285 Warning: preg_match_all() expects at least 3 parameters, 2 given in /mnt/web216/a2/50/51925650/htdocs/processwire/wire/core/PWGIF.php on line 252 [{"error":false,"message":"Added file: test.gif","file":"\/processwire\/site\/assets\/files\/1098\/test.gif","size":101734,"markup":"<li id='file_daf280af792fd5b906511363ae2bc39d' class='ImageOuter gridImage ui-widget'><div class='gridImage__tooltip'><table><tr><th>Dimensions<\/th><td>500x333<\/td><\/tr><tr><th>Filesize<\/th><td>99&nbsp;kB<\/td><\/tr><tr><th>Variations<\/th><td>0<\/td><\/tr><\/table><\/div>\n\t\t\t<div class='gridImage__overflow'>\n\t\t\t\t<img src=\"\/processwire\/site\/assets\/files\/1098\/test.0x260.gif?nc=1509109293\" alt=\"\" data-w=\"500\" data-h=\"333\" data-original=\"\/processwire\/site\/assets\/files\/1098\/test.gif?nc=1509109293\" \/>\n\t\t\t<\/div>\n\t\t\t\n\t\t\t\t<div class='gridImage__hover'>\n\t\t\t\t\t<div class='gridImage__inner'>\n\t\t\t\t\t\t<label for='' class='gridImage__trash'>\n\t\t\t\t\t\t\t<input class='gridImage__deletebox' type='checkbox' name='delete_thumbnail_daf280af792fd5b906511363ae2bc39d' value='1' title='Delete' \/>\n\t\t\t\t\t\t\t<span class='fa fa-trash-o'><\/span>\n\t\t\t\t\t\t<\/label>\n\t\t\t\t\t\t<a class='gridImage__edit'>\n\t\t\t\t\t\t\t<span>Edit<\/span>\n\t\t\t\t\t\t<\/a>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\t\t\t\t<div class='ImageData'>\n\t\t\t\t\t<h2 class='InputfieldImageEdit__name'><span contenteditable='true'>test<\/span>.gif<\/h2>\n\t\t\t\t\t<span class='InputfieldImageEdit__info'>99&nbsp;kB, 500&times;333 <\/span>\n\t\t\t\t\t<div class='InputfieldImageEdit__errors'><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__buttons'><small><button type='button' data-href='\/processwire\/admin\/page\/image\/edit\/?id=1098&file=1098,test.gif&rte=0&field=thumbnail' class='InputfieldImageButtonCrop ui-button ui-corner-all ui-state-default pw-modal-large pw-modal' data-buttons='#non_rte_dialog_buttons button' data-autoclose='1' data-close='#non_rte_cancel'><span class='ui-button-text'><span class='fa fa-crop'><\/span> Crop<\/span><\/button><button type='button' data-href='\/processwire\/admin\/page\/image\/variations\/?id=1098&file=test.gif&modal=1&varcnt=varcnt_thumbnail_daf280af792fd5b906511363ae2bc39d' class='ui-button ui-corner-all ui-state-default pw-modal-large pw-modal' data-buttons='button'><span class='ui-button-text'><span class='fa fa-files-o'><\/span> Variations <span class='ui-priority-secondary'>(0)<\/span><\/span><\/button><\/small><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__core'><div class='InputfieldFileDescription'><label for='description_thumbnail_daf280af792fd5b906511363ae2bc39d' class='detail'>Description<\/label><input type='text' name='description_thumbnail_daf280af792fd5b906511363ae2bc39d' id='description_thumbnail_daf280af792fd5b906511363ae2bc39d' value='' \/><\/div><\/div>\n\t\t\t\t\t<div class='InputfieldImageEdit__additional'><\/div>\n\t\t\t\t\t<input class='InputfieldFileSort' type='text' name='sort_thumbnail_daf280af792fd5b906511363ae2bc39d' value='1' \/>\n\t\t\t\t\t<input class='InputfieldFileReplace' type='hidden' name='replace_thumbnail_daf280af792fd5b906511363ae2bc39d' \/>\n\t\t\t\t\t<input class='InputfieldFileRename' type='hidden' name='rename_thumbnail_daf280af792fd5b906511363ae2bc39d' \/>\n\t\t\t\t<\/div>\n\t\t\t<\/li>","replace":true,"overwrite":0}]  
    • By dreerr
      In PW 3.0.80 I've experienced a bug when using multiple Page Ref fields. The Select button keeps fading in and out again. I've made a video to illustrate the problem. Any ideas how to solve this?
      video showing the error: PageRefError.mov
      greetings, d.
    • By theoretic
      Hi everyone! And thanks again for a perfect product.
      It appears there's a small bug in the implementation of fieldset. If we rename a field of type FieldsetTabOpen, the auto-created field of type FieldsetTabClose won't auto-rename. E.g. if we create a fieldset called "noises", two fields will be created -- "noise" (type: FieldsetTabOpen) and "noise_END" (type: FieldsetTabClose). And when we later rename the field "noise" to "acoustics", the field "noise_END" still keeps its name. The auto-generated field description will also remain unchanged.
      This is only a minor bug, but removing it could make the Processwire even better. Thanks in advance!