Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

JpGraph and Silverstripe


Reply


5 Posts   1028 Views

Avatar
slaterson

Community Member, 7 Posts

5 June 2011 at 2:55pm

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?

Avatar
Willr

Forum Moderator, 5513 Posts

6 June 2011 at 3:23pm

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?

Avatar
slaterson

Community Member, 7 Posts

7 June 2011 at 2:24am

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.

Avatar
Willr

Forum Moderator, 5513 Posts

7 June 2011 at 12:57pm

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

Avatar
slaterson

Community Member, 7 Posts

8 June 2011 at 9:01am

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.