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 louisstephens
      So I ran into a very strange issue today. I have a template with a pagetable and I went to add an item to it, when I went to select an image (for an image field) the page instantly threw up an error
      "ProcessPageSearchLive: No search specified"
      The page's content also switched to the image attached. This all worked perfectly last week (local mamp box). Has anyone experienced this before, and how did you solve it?
       

    • By arnd
      Hi,
      I have a repeater with some images in it.
      As Superuser I can work with the Actions (rotate...). But my Users with lower Rights can't use this Actions.
      The same User can use the Actions on images outsite a Repeter-Field. So I think it's not a Problem of Rights-Management but from Images in Repeater Fields.
      ProcessWire 3.0.164.  Bug? Or can I manage this in the settings?
      Thanks in advance
    • By Pip
      Hi everyone, 
      Is there a way for us to replicate the "http://mydomain.com/processwire/page/edit/?id=xxx" and change the template to match my site template? 
      I'm terribly happy with the admin / backend page edit. It covers literaly everything I want to empower my non super admin user in updating pages such as validation, repeater management, file upload. 
      I wish not to allow the users to see the backend for both security and aesthetic reasons. 
      Thanks and hope to hear from you soon. 
       
    • 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/
×
×
  • Create New...