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

Undefined: Timeline.GregorianDateLabeller.getMonthNames #494

Open
GoogleCodeExporter opened this issue Aug 19, 2015 · 1 comment
Open

Undefined: Timeline.GregorianDateLabeller.getMonthNames #494

GoogleCodeExporter opened this issue Aug 19, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

Timeline.GregorianDateLabeller.getMonthNames not defined:
Uncaught TypeError: Cannot read property '3' of undefined 

What steps will reproduce the problem?
I installed timeline.js on Drupal 7.

What is the expected output? What do you see instead?

The timeline should show up.
Instead I get a blank map and timeline.

What version of the product are you using? On what browser and what
operating system?

I have tried this with simile_timeline 3.0 and 2.3. 
I have tried 'bundle=true' and 'bundle=false'

Please provide any additional information below.

I added js files:
 'src/webapp/api/timeline-api.js',
 'src/ajax/api/simile-ajax-api.js',
'src/ajax/api/simile-ajax-bundle.js',
'src/webapp/api/timeline-bundle.js',


The timeline does not show up

I see this error in chrome and it is similar to firebug
Uncaught TypeError: Cannot read property '3' of undefined 
Timeline.GregorianDateLabeller.getMonthName
http://<mysite>/simile_timeline/src/webapp/api/timeline-bundle.js?mnbcc6

output in Chrome debug:
Uncaught TypeError: Cannot read property '3' of undefined 
timeline-bundle.js?mnbcc6:1765
Timeline.GregorianDateLabeller.getMonthName timeline-bundle.js?mnbcc6:1765
Timeline.GregorianDateLabeller.defaultLabelInterval 
timeline-bundle.js?mnbcc6:1787
Timeline.GregorianDateLabeller.labelInterval timeline-bundle.js?mnbcc6:1769
createIntervalMarker timeline-bundle.js?mnbcc6:1558
Timeline.GregorianEtherPainter.paint timeline-bundle.js?mnbcc6:1345
Timeline._Band.paint timeline-bundle.js?mnbcc6:129
Timeline._Band.layout timeline-bundle.js?mnbcc6:127
Timeline._Band._recenterDiv timeline-bundle.js?mnbcc6:335
Timeline._Band.setViewLength timeline-bundle.js?mnbcc6:154
Timeline._Impl._distributeWidths timeline-bundle.js?mnbcc6:2774
Timeline._Impl._initialize timeline-bundle.js?mnbcc6:2741
Timeline._Impl timeline-bundle.js?mnbcc6:2633
Timeline.create timeline-bundle.js?mnbcc6:2556
TimeMap.initTimeline timemap.js?mnbcc6:581
TimeMap.init timemap.js?mnbcc6:280
Drupal.timelinemap.createWidget timelinemap.js?mnbcc6:104
(anonymous function) timelinemap.js?mnbcc6:252
e.extend.each jquery.min.js?v=1.7.1:2
(anonymous function) timelinemap.js?mnbcc6:250
e.extend.each jquery.min.js?v=1.7.1:2
e.fn.e.each jquery.min.js?v=1.7.1:2
Drupal.behaviors.timelinemap.attach timelinemap.js?mnbcc6:248
(anonymous function) drupal.js?mnbcc6:76
e.extend.each jquery.min.js?v=1.7.1:2
Drupal.attachBehaviors drupal.js?mnbcc6:74
Drupal.theme.placeholder drupal.js?mnbcc6:412
n jquery.min.js?v=1.7.1:2
o.fireWith jquery.min.js?v=1.7.1:2
e.extend.ready jquery.min.js?v=1.7.1:2
c.addEventListener.B

Original issue reported on code.google.com by [email protected] on 25 May 2013 at 6:35

@ankostis
Copy link

It seems it was an i18n error. I had the same problem, and it disappeared when i switched browser's default language to "English".

Fix

I went through the sources and added the week-day names in the respective i18n file for my language, e.g. for Italian, that would be: SemanticResultFormats/formats/Exhibit/timeline/api/scripts/l10n/it/labellers.js:

Timeline.GregorianDateLabeller.dayNames["it"] = [
    "Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants