zepheira / backstage

The server-side sub-project of Exhibit3
55 stars 16 forks source link

generateIdentifier is not a function #29

Closed soloincc closed 12 years ago

soloincc commented 12 years ago

When exhibit(staged) is loading, firebug throws an error: __TypeError: this._uiContext.getBackstage().getRegistry().generateIdentifier is not a function__. The error is triggered on line 200 of http://localhost:8181/backstage/api/scripts/ui/facets/list-facet.js

Exhibit.Facet._registryKey 

This error is generated when the facet div has no id:

<td><div ex:role="facet" ex:expression=".collectionSite" ex:facetLabel="Collection Site"></div></td>
<td><div ex:role="facet" ex:expression=".organism" ex:facetLabel="Organism"></div></td>
<td><div ex:role="facet" ex:expression=".sampleType" ex:facetLabel="Sample Type"></div></td>

When I add an id to the divs the error gives birth to another: TypeError: this.getRegistry().getID is not a function The error is triggered on line 369 of http://localhost:8181/backstage/api/scripts/backstage.js

component = this.getRegistry().getID(state.id); 

This last error is persistent even with the demo Sweden Europeana

zepheiryan commented 12 years ago

Have you updated your Exhibit 3 to the latest? I can't reproduce this using the latest Backstage and Exhibit.

soloincc commented 12 years ago

Yes I think I have the latest code. A quick git diff master origin/master reveals no changes. For testing purposes, Here, http://pastebin.com/qVk3CE6t, is the hml and here is the json http://pastebin.com/rjs2dP6f files that I am using. I hope this helps

soloincc commented 12 years ago

Sorry, I closed the issue by mistake!

zepheiryan commented 12 years ago

Sorry for the long delay, vacation and all. The only reason I can think of that those methods would be undefined when called from backstage scripts is if you were on an earlier exhibit3 revision. Did you do a git fetch in your exhibit3 repo before checking the diff? Does git log in your exhibit3 repo reflect changes through December 17th?

zepheiryan commented 12 years ago

Closing, cannot reproduce. Please re-open if this is still a problem.