Closed Bug 1194468 Opened 9 years ago Closed 9 years ago

gettext_lazy intermittently failing

Categories

(Marketplace Graveyard :: Consumer Pages, defect)

Avenir
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chuck, Assigned: chuck)

Details

Davor and I have both run into instances where this exception has blocked page loading:

	TypeError: can't convert ({toString:(function () {
	                return get(str, args, context);
	            })}) to primitive type

Davor's happened in header.html. Mine in platform_selector.html, on this line:

https://github.com/mozilla/fireplace/blob/4cadb7b51e600e427d59a884f889ca418c29bed0/src/templates/_includes/platform_selector.html#L10

Davor fixed his issue by deleting his repo entirely and rebuilding. I got mine functional by changing this line to not use gettext_lazy:

https://github.com/mozilla/fireplace/blob/master/src/media/js/compat_filter.js#L28
I updated marketplace-core module version to 2.12.0 in bower.json after
https://github.com/mozilla/marketplace-core-modules/pull/49
and then `make install`

Is this relevant?
Good suggestion, Trishul! Unfortunately not, this is still happening on 2.13.0.
I have a pull request up to revert all the gettext_lazy changes, in case it becomes an issue on stage or prod: 

https://github.com/mozilla/fireplace/pull/1441

It can be applied locally if this is blocking your development:

https://patch-diff.githubusercontent.com/raw/mozilla/fireplace/pull/1441.patch
This is fixed by running `./node_modules/commonplace/bin/commonplace langpacks` in your local environment. Thanks to mstriemer on the assist!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.