Localization fails when pretender.js is running

Answered
Luke Deniston asked on February 15, 2019

This might be a bug with pretender.js instead, but I’m filing it here just in case anyone is confused as to why the localization isn’t working.
When pretender.js is running to intercept XHR requests, localization files will fail to load even if the request is passed through. There’s something about the xhr.response still being null when Flexmonster checks, causing Flexmonster to think that the network request failed.
This was found using pretender v1.6.1, I haven’t tested with newer versions.

3 answers

Public
Dmytro Zvazhii Flexmonster February 18, 2019

Hello Luke,
Thank you for letting us know about the issue with pretender.js
Could please check it with the version 2.0+? Currently, the latest available version is 2.1.1.
Also, please let us know how critical it is for you to use the version 1.6.1?
Waiting to hear from you.
Regards,
Dmytro

Public
Luke Deniston February 18, 2019

Hi Dmytro,
I’m not able to test with 2.x. Tried updating but ran into conflicts with some dependencies. This is a very low priority for us, as we only run pretender in our development environment. We’re not locked into 1.6.1, but we’ll have to schedule some time to update our libraries.
I most just filed this bug in case someone is combing the forums trying to figure out why localization isn’t working. 😉

Public
Dmytro Zvazhii Flexmonster February 19, 2019

Hello Luke,
Thank you for your feedback.
We will add this thing to our backlog.
Please let us know in case of any other question.
Regards,
Dmytro

Please login or Register to Submit Answer