TAPevents / tap-i18n-db

MIT License
51 stars 17 forks source link

Exception on i18nFind with meteorjs 1.2.0.1 #22

Open vuongngo opened 9 years ago

vuongngo commented 9 years ago

Hi, I just update all meteor packages and got this error. Current tap-i18n-db package is 0.4.0 and meteorjs is 1.2.0.1. I reckon that similar issue has been fixed with meteorjs 1.2 but not sure if it is identical with this. Thanks!


I20150925-22:35:30.833(10)? Exception from sub book id 7EAiyoTETFPtsYxbk TypeError: Array.prototype.indexOf called on null or undefined
I20150925-22:35:30.833(10)?     at indexOf (native)
I20150925-22:35:30.833(10)?     at [object Object].obj.i18nFind (meteor://💻app/packages/tap_i18n-db/packages/tap_i18n-db.js:352:1)
I20150925-22:35:30.833(10)?     at [object Object]. (meteor://💻app/server/book.js:2:1)
I20150925-22:35:30.833(10)?     at [object Object].i18n_handler [as _handler](meteor://💻app/packages/tap_i18n-db/packages/tap_i18n-db.js:429:1)
I20150925-22:35:30.834(10)?     at maybeAuditArgumentChecks (meteor://💻app/livedata_server.js:1692:12)
I20150925-22:35:30.834(10)?     at [object Object]._.extend._runHandler (meteor://💻app/livedata_server.js:1023:17)
I20150925-22:35:30.834(10)?     at [object Object].subscriptionProto._runHandler (meteor://💻app/packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2604:1)
            
Kostanos commented 9 years ago

Same error here

vuongngo commented 9 years ago

A dirty way to fix it is to assign TAPi18n.conf.supported_languages with a list of langs. Hope it helps!

davidecantini commented 9 years ago

Same error here (packages/tap_i18n-db/packages/tap_i18n-db.js:352:1 same as issue 19) Tested on Meteor 1.2.0.2

@theosp Is this package being actively maintained?

Thanks for your attention.

timbrandin commented 8 years ago

Same issue here.

timbrandin commented 8 years ago

@vuongngo you solution works, but it seams like TAPi18n doesn't pick up the supported languages or they have moved to somewhere else than TAPi18n.config.supported_languages

ddaydd commented 8 years ago

@vuongngo thanks,

work with TAPi18n.conf.supported_languages = ['en', 'fr'];

timbrandin commented 8 years ago

I guess this should be solved so that the actual implementation should work, rather than us all doing workarounds.

samuelluis commented 8 years ago

Works for me, thanks