Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect default language #176

Closed
wants to merge 172 commits into from

Conversation

@nsorosac
Copy link
Contributor

commented Jan 14, 2013

The default language detection from Tools::setCookieLanguage is never processed because Cookie::$id_lang is populated before this method is called.

To allow automatic language detection base on the client HTTP headers, I moved the language detection code from Tools::setCookieLanguage to Cookie::update.

To test this feature : access the base URL of a multilingual PrestaShop 1.5.3.1 ; without language suffix, and let the default language redirection happen: without this fix, PS_LANG_DEFAULT is always used. With this fix, the browser language is used (fallback = default language).

Damien Metzger and others added 30 commits Dec 13, 2012
…SCFV-6157 #PSCFV-5862 #PSCFV-5756 #PSCFV-6074 #PSCFV-5459
vAugagneur and others added 25 commits Jan 9, 2013
@nsorosac nsorosac closed this Jan 14, 2013
@nsorosac nsorosac deleted the axome:detect_default_language branch Jan 14, 2013
@nsorosac

This comment has been minimized.

Copy link
Contributor

commented on a54df8e Feb 11, 2013

👍

@wlongdonstudio

This comment has been minimized.

Copy link

commented on 3d16632 Feb 20, 2013

i have 1.5.3.1

i'm still getting this undefined error
this has already been done
still having the error..
how to fix this?

how to fix this problem

recently when i try to upload images in the product category it pops up saying undefined but when i press save and stay i see the images there but when i go to view the product of the front end there's suddently no image

please help

http://laloptical.co.../49-krista.html

This comment has been minimized.

Copy link
Contributor

replied Feb 21, 2013

This comment has been minimized.

Copy link

replied Mar 3, 2013

Thank you going to try that now

This comment has been minimized.

Copy link

replied Mar 3, 2013

Where to put this file? where is the existing file?

This comment has been minimized.

Copy link

replied Mar 3, 2013

found it thxs

This comment has been minimized.

Copy link

replied Dec 26, 2013

I use PS 1561 too, but solution from gRoussac comment doesn't work for me.

the "undefined" appear only when upload product image. there is no problem when upload category image.

please help. thank you.

This comment has been minimized.

Copy link
Contributor

replied Jan 5, 2014

I can confirm this issue in 1.5.6.1. The real issue is the legend length as mentioned by @hombean. The undefined popup dissapear when you put a short legend and the image is uploaded. If you use a major length it always fails. Note that I apply too 2a1c991 commit. Maybe should exist a constraint for legend length or split in several fields the legend data for avoid issues with ajax legend length

This comment has been minimized.

Copy link
Contributor

replied Jan 6, 2014

Hi @shakaran,

Thank you for your feedback. This commit should at least make the error display.

b44ed30

Regards

This comment has been minimized.

Copy link

replied Jan 6, 2014

If you are using cloudfare you can avoid this error by uploading the picture accesing with the IP instead of the webname.

This comment has been minimized.

Copy link

replied Jan 7, 2014

Same error here. I tried changing JS file as @adm666 sais, but can't get any possitive result.

Without changing..
POST http://www.domain.com/tienda/admin1060/ajax-tab.php?id_product=8&id_categ…3n+ADAPTA&legend%5B3%5D=Colch%C3%B3n+ADAPTA&qqfile=WIN_20131216_141048.JPG 400 (Bad Request) fileuploader.js:1080
qq.extend._upload fileuploader.js:1080
qq.UploadHandlerAbstract.upload fileuploader.js:767
qq.FileUploaderBasic._uploadFile fileuploader.js:401
qq.FileUploaderBasic._uploadFileList fileuploader.js:392
qq.FileUploaderBasic._onInputChange fileuploader.js:375
qq.UploadButton.onChange fileuploader.js:312
(anonymous function)
Changing it:
POST http://www.domain.com/tienda/admin1060/ajax-tab.php?id_product=8&id_categ…3n+ADAPTA&legend%5B3%5D=Colch%C3%B3n+ADAPTA&qqfile=WIN_20131216_141048.JPG 501 (Method Not Implemented) fileuploader.js:1080
qq.extend._upload fileuploader.js:1080
qq.UploadHandlerAbstract.upload fileuploader.js:767
qq.FileUploaderBasic._uploadFile fileuploader.js:401
qq.FileUploaderBasic._uploadFileList fileuploader.js:392
qq.FileUploaderBasic._onInputChange fileuploader.js:375
qq.UploadButton.onChange fileuploader.js:312
(anonymous function)

Legend name is about 6 characters
sin ttulo

Prestashop 1.5.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.