simile-widgets / exhibit

Publishing Framework for Large-Scale Data-Rich Interactive Web Pages
MIT License
175 stars 94 forks source link

Timeline raises a TypeError: Timeline.DefaultEventSource is not a constructor #143

Open lmorillas opened 8 years ago

lmorillas commented 8 years ago

Sometimes, when reloaded, timeline raises a TypeError: Timeline.DefaultEventSource is not a constructor and doesn't draw the timeline.

For example with http://simile-widgets.org/exhibit3/examples/cereals/cereal-characters.html

TypeError: Timeline.DefaultEventSource is not a constructor
Exhibit.TimelineView.prototype._initializeUI()time-ex...ndle.js (línea 1)
Exhibit.TimelineView.createFromDOM()time-ex...ndle.js (línea 1)
Exhibit.ViewPanel.prototype._createView()exhibit...ndle.js (línea 1)
Exhibit.ViewPanel.prototype._switchView()exhibit...ndle.js (línea 1)
Exhibit.ViewPanel.prototype.importState()exhibit...ndle.js (línea 1)
Exhibit.History.stateListener()exhibit...ndle.js (línea 1)
Exhibit.History.init()exhibit...ndle.js (línea 1)
exhibit-scripted-bundle.js()exhibit...ndle.js (línea 1)
.on/e()jquery-....min.js (línea 3)
f.event.dispatch()jquery-....min.js (línea 3)
f.event.add/i()jquery-....min.js (línea 3)
f.event.trigger()jquery-....min.js (línea 3)
.trigger/<()jquery-....min.js (línea 3)
f</<.each()jquery-....min.js (línea 2)
f</e.prototype.each()jquery-....min.js (línea 2)
.trigger()jquery-....min.js (línea 3)
Exhibit._Impl.prototype.configureFromDOM()exhibit...ndle.js (línea 1)
Exhibit.autoCreate/fDone()exhibit...ndle.js (línea 1)
.on/e()jquery-....min.js (línea 3)
f.event.dispatch()jquery-....min.js (línea 3)
f.event.add/i()jquery-....min.js (línea 3)
f.event.trigger()jquery-....min.js (línea 3)
.trigger/<()jquery-....min.js (línea 3)
f</<.each()jquery-....min.js (línea 2)
f</e.prototype.each()jquery-....min.js (línea 2)
.trigger()jquery-....min.js (línea 3)
Exhibit.Database._LocalImpl.prototype._loadLinks/fNext()exhibit...ndle.js (línea 1)
Exhibit.Importer.prototype.load/finish()exhibit...ndle.js (línea 1)
Exhibit.Database._LocalImpl.prototype.loadItems/wrapFinish()exhibit...ndle.js (línea 1)

...est,latest,totalDuration,totalEventCount,totalDensity,intervalDuration,eventsPer...

time-ex...ndle.js (línea 1)
TypeError: Timeline.DefaultEventSource is not a constructor
Exhibit.Debug.exception/f(e2=
TypeError: Timeline.DefaultEventSource is not a constructor

...est,latest,totalDuration,totalEventCount,totalDensity,intervalDuration,eventsPer...

, msg2=undefined)exhibit...ndle.js (línea 1)
Exhibit.Debug.exception(e=
TypeError: Timeline.DefaultEventSource is not a constructor

...est,latest,totalDuration,totalEventCount,totalDensity,intervalDuration,eventsPer...

, msg=undefined)exhibit...ndle.js (línea 1)
Exhibit.ViewPanel.prototype._createView()exhibit...ndle.js (línea 1)
Exhibit.ViewPanel.prototype._switchView(newIndex=1)exhibit...ndle.js (línea 1)
Exhibit.ViewPanel.prototype.importState(state=Object { viewIndex=1})exhibit...ndle.js (línea 1)
Exhibit.History.stateListener(evt=undefined)exhibit...ndle.js (línea 1)
Exhibit.History.init(ex=Object { _database={...}, _uiContext={...}, _registry={...}, más...}, persist=true)exhibit...ndle.js (línea 1)
exhibit-scripted-bundle.js(evt=Object { type="exhibitConfigured", timeStamp=1441215515284, jQuery17209661653833930088=true, más...}, ex=Object { _database={...}, _uiContext={...}, _registry={...}, más...})exhibit...ndle.js (línea 1)
.on/e(a=Object { type="exhibitConfigured", timeStamp=1441215515284, jQuery17209661653833930088=true, más...})jquery-....min.js (línea 3)
f.event.dispatch(c=Object { type="exhibitConfigured", timeStamp=1441215515284, jQuery17209661653833930088=true, más...})jquery-....min.js (línea 3)
f.event.add/i(a=Object { type="exhibitConfigured", timeStamp=1441215515284, jQuery17209661653833930088=true, más...})jquery-....min.js (línea 3)
f.event.trigger(c=Object { type="exhibitConfigured", timeStamp=1441215515284, jQuery17209661653833930088=true, más...}, d=[Object { type="exhibitConfigured", timeStamp=1441215515284, jQuery17209661653833930088=true, más...}, Object { _database={...}, _uiContext={...}, _registry={...}, más...}], e=Document cereal-characters.html, g=undefined)jquery-....min.js (línea 3)
.trigger/<()jquery-....min.js (línea 3)
f</<.each(a=Object[Document cereal-characters.html], c=function(), d=undefined)jquery-....min.js (línea 2)
f</e.prototype.each(a=function(), b=undefined)jquery-....min.js (línea 2)
.trigger(a="exhibitConfigured.exhibit", b=Object { _database={...}, _uiContext={...}, _registry={...}, más...})jquery-....min.js (línea 3)
Exhibit._Impl.prototype.configureFromDOM(root=undefined)exhibit...ndle.js (línea 1)
Exhibit.autoCreate/fDone()exhibit...ndle.js (línea 1)
.on/e(a=Object { type="dataload", timeStamp=1441215514480, jQuery17209661653833930088=true, más...})jquery-....min.js (línea 3)
f.event.dispatch(c=Object { type="dataload", timeStamp=1441215514480, jQuery17209661653833930088=true, más...})jquery-....min.js (línea 3)
f.event.add/i(a=Object { type="dataload", timeStamp=1441215514480, jQuery17209661653833930088=true, más...})jquery-....min.js (línea 3)
f.event.trigger(c=Object { type="dataload", timeStamp=1441215514480, jQuery17209661653833930088=true, más...}, d=[Object { type="dataload", timeStamp=1441215514480, jQuery17209661653833930088=true, más...}], e=body, g=undefined)jquery-....min.js (línea 3)
.trigger/<()jquery-....min.js (línea 3)
f</<.each(a=Object[body], c=function(), d=undefined)jquery-....min.js (línea 2)
f</e.prototype.each(a=function(), b=undefined)jquery-....min.js (línea 2)
.trigger(a="dataload.exhibit", b=undefined)jquery-....min.js (línea 3)
Exhibit.Database._LocalImpl.prototype._loadLinks/fNext()exhibit...ndle.js (línea 1)
Exhibit.Importer.prototype.load/finish()exhibit...ndle.js (línea 1)
Exhibit.Database._LocalImpl.prototype.loadItems/wrapFinish()exhibit...ndle.js (línea 1)

...=function(){Exhibit.Backwards.enabled.Attributes=true;Exhibit.getAttribute=Exhib...

error_timeline

lmorillas commented 8 years ago

The bug is reported with Firefox 40.0.3 running on Ubuntu 15.04

lmorillas commented 8 years ago

Firefox doesn't load timeline-bundle.js

karger commented 8 years ago

This is probably a race condition. Timeline is very old and uses no-longer-suitable methods for asynchronously loading its data and excutables. Not clear we can fix it until we modernize the loading process.

lmorillas commented 8 years ago

Yes, I think so too. The loadSimileAjax is a bit old and maybe it's better to write a new load code.

joerg-rade commented 8 years ago

Looks like I'm bitten by the same bug (on 2.3.1 though). FF 47.0 and Chrome 41 show the same behaviour. Should I upgrade to exhibit? Where can I vote for modernizing the loading process?

In http://forum.zkoss.org/question/50873/no-event-delivy-when-using-timeplotz-component/ there is an analysis of the call stack.

karger commented 8 years ago

I've got a student looking into how hard it will be to modernize timeline's load process.

On 6/22/2016 6:16 AM, Jörg Rade wrote:

Looks like I'm bitten by the same bug (on 2.3.1 though). FF 47.0 and Chrome 41 show the same behaviour. Should I upgrade to exhibit? Where can I vote for modernizing the loading process?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/simile-widgets/exhibit/issues/143#issuecomment-227702401, or mute the thread https://github.com/notifications/unsubscribe/ABFpXqUTWZ-nEjAzxiVZIq46RQv-ft1Hks5qOQuNgaJpZM4F2r6p.

lmorillas commented 8 years ago

Maybe it could be interesting to have a roadmap. I think some of the exhibit components can be uncoupled, so the modernization process will be easier

joerg-rade commented 8 years ago

Thanks for the fast response!

Far from beeing a JS expert - I would look for best practices in widespread frameworks (eg. angular) and either mimic it or use an API. Do not optimize for bandwitdth / latency to begin with. In my scenario (SIMILE Timeline wrapped by Apache Wicket, wicketstuff-simile-timeline), embedded files will be used and cross loading from http://api.simile-wifgets.org is not required.

If I had enough time, I'ld do a reimplementation in amber (https://github.com/amber-smalltalk/amber) .

My 2c

pitchke commented 6 years ago

If I understand this correctly it seems that this is resolved for SemanticMediaWiki/SemanticResultFormats. Is it possible to have this fix implemented for Exhibit so that we can load a corrected version from i.e.

I am pleased to test/help if I can (as a user, not a developer expert ;-) Many thanks !