Cannot change locale in DEV

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason

···

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

···

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

···

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Keep in mind that the system settings API endpoint only accepts text/plain, not json. So the value should be just es without quotes, not “es” with quotes:

curl -u admin:district https://play.dhis2.org/dev/api/systemSettings/keyUiLocale -X POST -H ‘Content-Type: text/plain’ -d es

···

On Mon, Oct 3, 2016 at 2:13 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

On Mon, Oct 3, 2016, 2:04 PM Nicolay Ramm nicolay@dhis2.org wrote:

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

It’s currently broken on /dev, so I’m guessing you didn’t deploy…

···

On Mon, Oct 3, 2016 at 2:20 PM, Nicolay Ramm nicolay@dhis2.org wrote:

Keep in mind that the system settings API endpoint only accepts text/plain, not json. So the value should be just es without quotes, not “es” with quotes:

curl -u admin:district https://play.dhis2.org/dev/api/systemSettings/keyUiLocale -X POST -H ‘Content-Type: text/plain’ -d es


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:13 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

On Mon, Oct 3, 2016, 2:04 PM Nicolay Ramm nicolay@dhis2.org wrote:

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Halvdan Hoem Grelland

Software developer, DHIS 2

University of Oslo

http://www.dhis2.org

OK, I tried in incognito mode on https://play.dhis2.org/dev/ and got the same error.

Still cache?

Regards,

Jason

···

On Mon, Oct 3, 2016 at 2:20 PM, Nicolay Ramm nicolay@dhis2.org wrote:

Keep in mind that the system settings API endpoint only accepts text/plain, not json. So the value should be just es without quotes, not “es” with quotes:

curl -u admin:district https://play.dhis2.org/dev/api/systemSettings/keyUiLocale -X POST -H ‘Content-Type: text/plain’ -d es

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:13 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

On Mon, Oct 3, 2016, 2:04 PM Nicolay Ramm nicolay@dhis2.org wrote:

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

I also tried in incognito mode on https://play.dhis2.org/dev/ and I got no error…

What exactly are you doing? And which browser/version are you on?

···

On Mon, Oct 3, 2016 at 2:27 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK, I tried in incognito mode on https://play.dhis2.org/dev/ and got the same error.

Still cache?

Regards,

Jason

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:20 PM, Nicolay Ramm nicolay@dhis2.org wrote:

Keep in mind that the system settings API endpoint only accepts text/plain, not json. So the value should be just es without quotes, not “es” with quotes:

curl -u admin:district https://play.dhis2.org/dev/api/systemSettings/keyUiLocale -X POST -H ‘Content-Type: text/plain’ -d es


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:13 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

On Mon, Oct 3, 2016, 2:04 PM Nicolay Ramm nicolay@dhis2.org wrote:

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Browser = Version 53.0.2785.116 (64-bit ) on Ubuntu

All I am doing is changing the locale from English to Spanish (or vice versa).

···

On Mon, Oct 3, 2016 at 2:30 PM, Nicolay Ramm nicolay@dhis2.org wrote:

I also tried in incognito mode on https://play.dhis2.org/dev/ and I got no error…

What exactly are you doing? And which browser/version are you on?

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:27 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK, I tried in incognito mode on https://play.dhis2.org/dev/ and got the same error.

Still cache?

Regards,

Jason

On Mon, Oct 3, 2016 at 2:20 PM, Nicolay Ramm nicolay@dhis2.org wrote:

Keep in mind that the system settings API endpoint only accepts text/plain, not json. So the value should be just es without quotes, not “es” with quotes:

curl -u admin:district https://play.dhis2.org/dev/api/systemSettings/keyUiLocale -X POST -H ‘Content-Type: text/plain’ -d es


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:13 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

On Mon, Oct 3, 2016, 2:04 PM Nicolay Ramm nicolay@dhis2.org wrote:

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Right, I was looking at the system settings app. I can reproduce in the user profile app. Will deploy a new version.

···

On Mon, Oct 3, 2016 at 2:33 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Browser = Version 53.0.2785.116 (64-bit ) on Ubuntu

All I am doing is changing the locale from English to Spanish (or vice versa).

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:30 PM, Nicolay Ramm nicolay@dhis2.org wrote:

I also tried in incognito mode on https://play.dhis2.org/dev/ and I got no error…

What exactly are you doing? And which browser/version are you on?


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:27 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK, I tried in incognito mode on https://play.dhis2.org/dev/ and got the same error.

Still cache?

Regards,

Jason

On Mon, Oct 3, 2016 at 2:20 PM, Nicolay Ramm nicolay@dhis2.org wrote:

Keep in mind that the system settings API endpoint only accepts text/plain, not json. So the value should be just es without quotes, not “es” with quotes:

curl -u admin:district https://play.dhis2.org/dev/api/systemSettings/keyUiLocale -X POST -H ‘Content-Type: text/plain’ -d es


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:13 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

On Mon, Oct 3, 2016, 2:04 PM Nicolay Ramm nicolay@dhis2.org wrote:

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Should be fixed in the latest version (user profile app v25.0.5). It could take a while before the new version is on play.dhis2.org/dev though.

Thanks for reporting!

···

On Mon, Oct 3, 2016 at 2:40 PM, Nicolay Ramm nicolay@dhis2.org wrote:

Right, I was looking at the system settings app. I can reproduce in the user profile app. Will deploy a new version.

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:33 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Browser = Version 53.0.2785.116 (64-bit ) on Ubuntu

All I am doing is changing the locale from English to Spanish (or vice versa).

On Mon, Oct 3, 2016 at 2:30 PM, Nicolay Ramm nicolay@dhis2.org wrote:

I also tried in incognito mode on https://play.dhis2.org/dev/ and I got no error…

What exactly are you doing? And which browser/version are you on?


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:27 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK, I tried in incognito mode on https://play.dhis2.org/dev/ and got the same error.

Still cache?

Regards,

Jason

On Mon, Oct 3, 2016 at 2:20 PM, Nicolay Ramm nicolay@dhis2.org wrote:

Keep in mind that the system settings API endpoint only accepts text/plain, not json. So the value should be just es without quotes, not “es” with quotes:

curl -u admin:district https://play.dhis2.org/dev/api/systemSettings/keyUiLocale -X POST -H ‘Content-Type: text/plain’ -d es


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 2:13 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

OK. I tried a direct post without the app,and got the same thing. Will try again however just to be sure.

Regards,

Jason

On Mon, Oct 3, 2016, 2:04 PM Nicolay Ramm nicolay@dhis2.org wrote:

Hi Jason,

is this happening with the settings app? It sounds like an issue that was fixed recently, where plain text values were being encoded as JSON.

As long as you’re running v25.0.5 or higher of the settings app, you should be fine. Check the browser console when you start the app. The version included with the latest snapshot should actually be v25.0.6, so your browser cache may be stale.

Best regards,

Nicolay Ramm

Front end developer, DHIS 2

University of Oslo

https://www.dhis2.org

On Mon, Oct 3, 2016 at 9:32 AM, Jason Pickering jason.p.pickering@gmail.com wrote:

Hi Devs,
There seem to be some issues updating a users locale in the latest dev snapshot. It is not possible to update a users locale.

POST to

https://play.dhis2.org/dev/api/25/userSettings/keyUiLocale

with “es” (the header sent by the app when swtiching from English to Spanish)

yields an HTTP 500

{
“httpStatus”: “Internal Server Error”,
“httpStatusCode”: 500,
“status”: “ERROR”,
“message”: “Invalid locale format: “es””
}

With GET to the same URL yields

Unexpected ‘e’

which seems strange.

Version:2.25-SNAPSHOT
Build revision:0cf6645

Regards,

Jason


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp