symfony
symfony forum
Home » symfony projects » askeet » Day 4 - PHP Fatal error
Day 4 - PHP Fatal error [message #1845] Wed, 18 January 2006 04:09 Go to next message
mmaru  is currently offline mmaru
Messages: 21
Registered: January 2006
Junior Member
When I try to execute the 'php load_data.php' I get the following error message:

PHP Fatal error: Call to undefined method Question::getInterestedUsers() in F:\home\sfprojects\askeet\lib\model\Interest.php on line 29

Line 29 in the above file is:
$interested_users = $question->getInterestedUsers();

Your help is very much appreciated.

Maru
Re: Day 4 - PHP Fatal error [message #1846 is a reply to message #1845 ] Wed, 18 January 2006 04:30 Go to previous messageGo to next message
Draven  is currently offline Draven
Messages: 760
Registered: January 2006
Faithful Member
Check your Question.php (or maybe QuestionPeer.php, I can't rememeber which has that function) and see if you have that function in there. If not, do a checkout of Askeet for that day and update your local copy with any missing functions. I found throughout the askeet days that there was often files added to the SVN tags for the day that the tutorial never covered.
Re: Day 4 - PHP Fatal error [message #1854 is a reply to message #1846 ] Wed, 18 January 2006 13:31 Go to previous messageGo to next message
mmaru  is currently offline mmaru
Messages: 21
Registered: January 2006
Junior Member
Thank you very much. I found that the Question.php covered in the tutorial is different from what is in SVN tags. However, after making the necessary changes I am getting a different error:
PHP Fatal error: Call to undefined method Question::setStrippedTitle() in F:\home\sfprojects\askeet\lib\model\Question.php on line 22

Line 22 above is:
$this->setStrippedTitle(myTools::stripText($v));

How do you do a checkout of Askeet for that a particular day - I have not tried it and would like to know if there is a document I should refer.

Regards,

Maru
Re: Day 4 - PHP Fatal error [message #1877 is a reply to message #1854 ] Thu, 19 January 2006 01:26 Go to previous messageGo to next message
mmaru  is currently offline mmaru
Messages: 21
Registered: January 2006
Junior Member
Please help me - I am unable to proceed with the tutorial.

Your help is very much appreciated.

Maru
Re: Day 4 - PHP Fatal error [message #1878 is a reply to message #1845 ] Thu, 19 January 2006 01:52 Go to previous messageGo to next message
mmaru  is currently offline mmaru
Messages: 21
Registered: January 2006
Junior Member
It is an error from my part please ignore my message and excuse me.

Regards,

Maru
Re: Day 4 - PHP Fatal error [message #21971 is a reply to message #1845 ] Mon, 19 February 2007 12:39 Go to previous messageGo to next message
trax  is currently offline trax
Messages: 8
Registered: February 2007
Junior Member
Hello Maru,

I get exactly the same error.
Call to undefined method Question::setStrippedTitle() in F:\home\sfprojects\askeet\lib\model\Question.php on line 22

How did you solve this problem?


General Question (SVN):

How can I checkout askeet for another day than the first.
When I try "svn co http://svn.askeet.com/tags/release_day_1/ askeet/" it tells me, askeet is the working version of another URL.

Thanks very much
Re: Day 4 - PHP Fatal error [message #25885 is a reply to message #1845 ] Tue, 17 April 2007 21:17 Go to previous messageGo to next message
kmedlin  is currently offline kmedlin
Messages: 78
Registered: April 2007
Location: Raleigh, NC USA
Member
Well I have solved this issue... (for both stripped title and for the interested users parts)

The tutorial fails to mention that you'll need to run during the getInterestedUsers section:

Step 1 - Update Your schema.xml
Step 2 -
symfony propel-build-model

Step 3 -
symfony propel-build-sql

Step 4 -
symfony propel-insert-sql


Once I did that I could load my fixtures and everything worked fine.

Every time you change the model you must updated it by running the propel-build-model command or else the om baseInterest (in this case) won't update properly.

Hope that helps!

[Updated on: Tue, 17 April 2007 22:15]

Day 4 - PHP Fatal error setStrippedTitle() [message #29862 is a reply to message #1845 ] Thu, 21 June 2007 11:03 Go to previous messageGo to next message
tely  is currently offline tely
Messages: 37
Registered: June 2007
Location: France
Member
Hello,

I get exactly the same error.
Call to undefined method Question::setStrippedTitle() in D:\wamp\www\sfprojects\askeet\lib\model\Question.php on line 22

How can I solve this problem?

I allready checked out of Askeet for that day and update my local copy.

Thanks for your help

Re: Day 4 - PHP Fatal error [message #30459 is a reply to message #1845 ] Thu, 28 June 2007 17:08 Go to previous message
tely  is currently offline tely
Messages: 37
Registered: June 2007
Location: France
Member
Ok, got the solution.
Remember to clear cache before running the propel-build-model command =)
This is a stupid error that can waste a lot of time ! I did the experience !

The error:

PHP Fatal error: Call to undefined method Question::getInterestedUsers() in F:\home\sfprojects\askeet\lib\model\Interest.php on line 29

means that the class didn't integrate the "interested_users" column. =)

Hope that helps too
Previous Topic:askeet question
Next Topic:[resolved] day 2 problem: auto-generated scaffolding (url rewrite?) problem
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software