Jump to content
EyeDentify

(SOLVED) Strange Error Uploading Image (SQLSTATE[01000]: Warning: 1265 Data truncated for column 'ratio' at row 1)

Recommended Posts

Posted (edited)

Hello dear PW gurus.

I have stumbled over a strange error that i all of sudden got when trying to upload an image to a images field on a page.
There where images allready stored in the field that i wanted to keep, but during the upload the error apear and after that all images are gone from the field and i can´t upload any, i just get the error every time.

I am running ProcessWire 3.0.153 dev.

Update:

After looking in the assets folder i find the folder for the page and the image files seems to be there including the ones i tried to upload when the error occured.
But they don´t show up in the images field in the page editor.

 

The error reported:
 

SQLSTATE[01000]: Warning: 1265 Data truncated for column 'ratio' at row 1

And here is a screenshot of the event:

img_upload_error.thumb.png.87f33ff8e55e4166cf60a8e79ac760cf.png

The TracyDebugger Error reporting:
tracy_Debugger_upload_image_error.thumb.png.a41846205827adc7a8303669a409dea3.png

I hope you fine folks could point me in a direction.
But it seems our old pal set_time_limit() is back.

Regards, EyeDentify

Edited by EyeDentify
Changed title to convey Solved status.

Share this post


Link to post
Share on other sites

I think this is your issue:

Is the language set to Swedish on your site? Or, on this site, do you use commas for decimals?

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, kongondo said:

I think this is your issue:

Is the language set to Swedish on your site? Or, on this site, do you use commas for decimals?

Yes Swedish, and yes commas for decimals.

Share this post


Link to post
Share on other sites

@kongondo

Why does TracyDebugger talk about set_time_limit() error in the image resizer module?

PHP Warning: set_time_limit(): Cannot set max execution time limit due to system policy in .../httpd.www/wire/core/ImageSizerEngine.php:1168

 

Share this post


Link to post
Share on other sites

@adrian and @kongondo

I did some checking and turns out i am running a Maria-DB for my PW install.
one.com does not show me what version of Maria-DB.

i also checked my config file and there i set the following locale:
 

setlocale(LC_ALL, 'sv_SE.utf8', 'sv_SE.UTF-8', 'en_US.UTF-8', 'en_US.utf8');

So what am i doing in the meantime the Imagesfield gets updated to account for this problem?

Do i have to change to English locale?
I rather not have to.

Thanks again.

Share this post


Link to post
Share on other sites

Its not a long term solution but for now i am using the files field, it at least let me upload files and output them in the template.
But ofcourse i have to do all my image resizing before upload.

I realy wish we could find a solution to this.

Share this post


Link to post
Share on other sites
1 hour ago, EyeDentify said:

I realy wish we could find a solution to this.

A bug report was filed a week ago. Ryan will get to it and sort it out, I'm sure. Meanwhile, your choices are:

  1. Downgrade your ProcessWire version.
  2. Make the manual db column type change if you can live with it.
  3. Write a hook to convert the value before it is saved  (using a period for decimals) and another hook for display (using comma for decimals) during render.
  4. If you really have to (usually not recommended), change the code in the core knowing full well this will be overwritten when you upgrade.
  • Like 2

Share this post


Link to post
Share on other sites
49 minutes ago, kongondo said:

A bug report was filed a week ago. Ryan will get to it and sort it out, I'm sure. Meanwhile, your choices are:

  1. Downgrade your ProcessWire version.
  2. Make the manual db column type change if you can live with it.
  3. Write a hook to convert the value before it is saved  (using a period for decimals) and another hook for display (using comma for decimals) during render.
  4. If you really have to (usually not recommended), change the code in the core knowing full well this will be overwritten when you upgrade.

Hello @kongondo

1. is out.
2. I am not sure how to do this whitin PW?
3. Could i get a pointer to how i should go about this?, and why is this comma usefull for an field holding images?
4. Do you know where i should start looking in the code?

In the meanwhile, guess i will have to use files fields.

Thank you.

Share this post


Link to post
Share on other sites
27 minutes ago, EyeDentify said:

and why is this comma usefull for an field holding images?

Did you get a chance to read the post I linked to? It's all explained there :-).

  • Like 2

Share this post


Link to post
Share on other sites

 

8 hours ago, EyeDentify said:

But it seems our old pal set_time_limit() is back.

This is why I keep saying that PW is not going to be compatible with one.com - there are several places in the core that use it.

  • Like 2

Share this post


Link to post
Share on other sites

 

@EyeDentify get a serious host, if you are building a serious application. The money you save on a cheap host, is wasted on time debugging various problems.

 

  • Like 3

Share this post


Link to post
Share on other sites

Ryan just pushed a fix for this 🙂 

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, eydun said:

 

@EyeDentify get a serious host, if you are building a serious application. The money you save on a cheap host, is wasted on time debugging various problems.

 

Some of us do not have that luxery sir. We have to work with what we have.

Share this post


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

Some of us do not have that luxery sir. We have to work with what we have.

You can get a VPS at Linode or Digital Ocean for $5 / month. Throw Server Pilot on that and you have a great setup with all the control you need.

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, bernhard said:

Ryan just pushed a fix for this 🙂 

Sounds great 🙂 How do i apply it? Just download PW 3.0.155 dev?

9 hours ago, bernhard said:

Ryan just pushed a fix for this 🙂 

Yes @adrian i know you have been saying this and your right.
But like i said before, i can´t at the moment.

Share this post


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

But like i said before, i can´t at the moment.

Fair enough - it just sounded strange to call a good host a luxury in response to Eydun's attempt to help, and also to keep bringing up that set_time_limit error. Not everyone reading this thread will know about the other thread where we figured out the cause of that error so it just confounds those trying to help you here - make sense?

  • Like 1

Share this post


Link to post
Share on other sites
2 minutes ago, adrian said:

Fair enough - it just sounded strange to call a good host a luxury in response to Eydun's attempt to help, and also to keep bringing up that set_time_limit error. Not everyone reading this thread will know about the other thread where we figured out the cause of that error so it just confounds those trying to help you here - make sense?

I hear you @adrian 

but i was not calling one.com luxury, it was more a saying that i did not have the luxury to change right now and have to work with what i got.

There was no ill will towards @eydun i know "he" was trying to help.

Share this post


Link to post
Share on other sites
1 minute ago, EyeDentify said:

it was more a saying that i did not have the luxury to change right now and have to work with what i got.

Sorry, I thought you were calling a "good host" a luxury.

Anyway, I am sure there are no ill feelings - sorry if I over-analyzed things 🙂

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks to @kongondo @adrian @bernhard and @eydun

That helped me with this.

Following @ryan pushing a fix for this to the PW 3.0.155 dev branch i do not have to pull my hair any longer 🙂

Also @adrian for some reason TracyDebugger is not freaking out about the Console panel anymore even after i applied 3.0.155 dev update.

Knock on wood...

Edited by EyeDentify
changed spelling misstakes.
  • Like 3

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 Mats
      BETA: SplashAndGrab
      https://github.com/madebymats/InputfieldSplashAndGrab
      This module attaches a search input to selected image fields that lets you search and download images from Unsplash.
      (Unsplash is a stock photo service where you can download images for free and use as you wish. No strings attached.)   
      You can search by string, colors, orientation/crop and order by relevance or time published
      I find Unsplash useful both for placeholder images when building sites but also as a time saver for editors if they don’t have any images at hand, just search, download and publish.

      Thanks to @apeisa for building the  FlickrInputField Module and @Robin S for AddImageUrls,  took a lot ideas and code from those modules.
    • By Markus (Blue Tomato)
      We have created a module to create BlurHash strings for images while uploading in ProcessWire. This blurry images will be saved in the database because they are very small (20-30 characters) and can be used for Data-URL's  as placeholders for image-lazy loading.
      https://github.com/blue-tomato/ImageBlurhash
      E.g. where we use this in production:
      https://www.blue-tomato.com/en-INT/blue-world/ https://www.blue-tomato.com/en-INT/blue-world/products/girls-are-awesome/ https://www.blue-tomato.com/en-INT/buyers-guides/skateboard/skateboard-decks/ https://www.blue-tomato.com/en-INT/team/anna-gasser/
    • By horst
      Hi, on a site I want to disable access to original images and only allow to access thumbnails and watermarked image variations.
      EDIT:
      A good solution for protecting original images can be found a bit down in this thread:
       
      Old content of this initial post:
       
    • By Guy Incognito
      I seem to be running into a repeated fatal error in a fresh PW install version 3.0.148. I can't quite put my finger on the pattern but it seems to be around deleting image fields or removing images from certain image fields.
      This is the trace from the log generated by trying to save a page and delete an image from an image field:
      Fatal Error: Uncaught Error: Cannot access protected property Pageimage::$original in /wire/core/PageimageVariations.php:256 Stack trace: 1. /wire/core/Pageimage.php(1327): PageimageVariations->getInfo() 2. /wire/core/Wire.php(386): Pageimage->___isVariation() 3. /wire/core/WireHooks.php(823): Wire->_callMethod() 4. /wire/core/Wire.php(450): WireHooks->runHooks() 5. /wire/core/Pageimage.php(1369): Wire->__call() 6. /wire/core/Pageimage.php(399): Pageimage->getOriginal() 7. /wire/core/WireData.php(333): Pageimage->get() 8. /wire/core/PageimageVariations.php(256): Pro Line 256 of /wire/core/PageimageVariations.php Earlier in the day I was experimenting with custom fields for images for the first time and kept running into this error, thinking it was me using this feature wrong and not having time to read up I deleted the custom image fields template and went about my business. So now I don't know if I triggered an issue or whether it was never related to the custom image fields in the first place?
      Any ideas?
    • By humanafterall
      I'm using some Custom fields for images: 
      https://processwire.com/blog/posts/pw-3.0.142/#custom-fields-for-files-images

      When I save the page, and return the fields are blank. When I re-add the text to the fields and save again then the fields save as expected.

      I know this is stated as being quite experimental but it's super useful feature I'd love to get working correctly.
      I have fields that are CKEditor fields but have overidden this on the image specific template. I've also tried it with regular text fields and I get the same bug.
      (currently using Processwire 3.0.155)
      **UPDATE**
      I've found this issue is specific to editing on pages using the PageTable fieldtype. The fields are not saving when I save the page in the PageTable.
×
×
  • Create New...