0

I've tried to imlement vie.js (viejs . org) in order to make my CMS's html output more machine readable/manipulatable.

However, the vie-2.1.0.js always throws an error:

Uncaught TypeError: Object [object Object] has no method 'getByCid'

I have also tried other examples, such as the ones to be found here:

http://viejs.org/docs/2.1.0/index.html

and also ended up with the same error.

I've pasted my code in this fiddle: http://jsfiddle.net/2hwZS/

But I will also paste it here:

<!DOCTYPE html>
<html>
<head>
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="http://underscorejs.org/underscore-min.js"></script>
    <script src="http://backbonejs.org/backbone-min.js"></script>
    <script src="http://neogermi.github.io/VIEwidgets/lib/jquery.rdfquery.js"></script>
    <script type="text/javascript" src="http://viejs.org/js/vie-2.1.0.debug.js"></script>
</head>
<body>
    <div id="index" typeof="http://rdfs.org/sioc/ns#Post" about="index">
        <h2 property="dcterms:title">Ich bin ein Blocktitel</h2>
        <p  property="sioc:content">Dieser Block hat nat&uuml;rlich auch einen Inhalt. Hier k&ouml;nnte jetzt alles stehen. Nachrichten, statischer Text, Termine oder einfach auch nichts. Wichtig ist nur, dass das Markup stimmt !</p>
        <p>Verfasst von <span>Jan Gregor Triebel</span> am <span>17.05.2013 / 10:47 Uhr</span></p>
    </div>
    <script>
        // Setting up VIE
        v = new VIE({classic: true});
        v.use(new v.RdfaService());
        var objects = v.RDFaEntities.getInstances();
        var post    = v.EntityManager.getBySubject('index');
        console.log(post);
    </script>
</body>
</html>
Jan
  • 907
  • 1
  • 8
  • 23
  • 1
    SOLVED: just use the version 0.9.2 of backbone.js - since newer version do not implement the "getByCid" function. It can be found on github: https://raw.github.com/documentcloud/backbone/0.9.2/backbone.js – Jan May 17 '13 at 12:38

1 Answers1

1

you should probably file a ticket in the VIE tracker directly: https://github.com/bergie/VIE/issues

scor
  • 940
  • 5
  • 5