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

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

Open
lmorillas opened this issue Sep 2, 2015 · 9 comments

Comments

@lmorillas
Copy link
Contributor

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
Copy link
Contributor Author

The bug is reported with Firefox 40.0.3 running on Ubuntu 15.04

@lmorillas
Copy link
Contributor Author

Firefox doesn't load timeline-bundle.js

@karger
Copy link
Member

karger commented Oct 9, 2015

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
Copy link
Contributor Author

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

@joerg-rade
Copy link

joerg-rade commented Jun 22, 2016

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
Copy link
Member

karger commented Jun 22, 2016

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
#143 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABFpXqUTWZ-nEjAzxiVZIq46RQv-ft1Hks5qOQuNgaJpZM4F2r6p.

@lmorillas
Copy link
Contributor Author

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
Copy link

joerg-rade commented Jun 24, 2016

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
Copy link

pitchke commented Aug 29, 2017

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.

<script src="http://api.simile-widgets.org/exhibit/HEAD/extensions/time/time-extension.js" type="text/javascript"></script>

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

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

No branches or pull requests

4 participants