Jump to:

22993 Posts in 11829 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » JpGraph and Silverstripe

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 905 Views
  • slaterson
    Avatar
    Community Member
    7 Posts

    JpGraph and Silverstripe Link to this post

    i'm pretty new to silverstripe, i'm currently working on trying to migrate a few items from an existing website i've built from scratch. so far, i've had good success, the stuff i'm migrating is all php based with a mysql backend for data storage in some cases. i'm having trouble with one item, dynamically generated graphs that use jpgraph (jpgraph.net).

    i've got a very simple example in place now, when i browse to the page, i get the following error:

    Fatal error: Call to undefined method HTMLText::setValue() in /var/www/localhost/htdocs/sapphire/core/ViewableData.php on line 380

    i've isolated the issue to jpgraph's include files, if i add them to my new php file for use with silverstripe, i get the error. otherwise silverstripe works fine, minus the graphs, of course.

    is there a way to work around this error?

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: JpGraph and Silverstripe Link to this post

    Strange, HTMLText has a perfectly fine setValue() - http://api.silverstripe.org/2.4/sapphire/model/DBField.html. What does the backtrace of your error reveal?

  • slaterson
    Avatar
    Community Member
    7 Posts

    Re: JpGraph and Silverstripe Link to this post

    how do i get the backtrace? if you can tell me or point me in the right direction to find out how... would love to get this one solved.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: JpGraph and Silverstripe Link to this post

    using something like xdebug for PHP will give you a backtrace.

  • slaterson
    Avatar
    Community Member
    7 Posts

    Re: JpGraph and Silverstripe Link to this post

    ok, i got xdebug installed and have looked at the trace, but first...

    i also installed image-gallery last night (can't seem to get pictures to upload or appear in an album even though i have swfupload and/or uploadify installed, but thats a topic for another day). i now get a different error on my jpgraph page, this time saying the the class 'Text' cannot be redeclared. soooo, jpgraph uses a class named 'Text', while i haven't dug into image-gallery at all, i am sure it does too.

    after removing image-gallery, i am back to the previous error (HTMLText::setValue() ...). the trace, if i have done this right, is quite long, measuring in at just under 2 megs (attached here, bzip2 compressed). i can't see anything pointing out errors, perhaps i'm not running xdebug correctly... help is appreciated.

    Attached Files
    905 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.