#105 ✓hold

Call to undefined method Model::insert()

Reported by DeveloperChris | August 21st, 2009 @ 12:13 AM | in 0.20

Hi I am new to Recess and am evaluating it. I downloaded a copy today from github
wget http://github.com/recess/recess/tarball/master
which returned

I then started to run through your excellent 1 minute tutorials.

After creating the post and comments models I clicked the post link under the Apps tab

it resulted in the following error

Fatal error: Call to undefined method Model::insert() 
in /home/chris/public_html/recess/recess/recess/apps/tools/models/RecessReflectorPackage.class.php on line 27

On reviewing the code I found that
RecessReflectorPackage::insert() calls parent::insert()

I cant locate an insert() function in the Model class.

If I comment out the parent::insert() call I get a segmentation fault!

apache error log...

[Fri Aug 21 13:39:25 2009] [notice] child pid 18483 exit signal Segmentation fault (11)

Apart from that Recess looks great


Comments and changes to this ticket

  • DeveloperChris

    DeveloperChris August 21st, 2009 @ 12:28 AM

    I have after some more checking I realised we are using the wrong version of PHP 5.1 instead of 5.2.4

    perhaps the config scripts should have a version check and die on a version mismatch


  • Jamie Rumbelow

    Jamie Rumbelow September 13th, 2009 @ 11:02 AM

    This has happened with me too, I changed the call to Model::insert(); to Model::wrappedInsert(); and it ran fine. It was because the RecessReflectorPackage was overwriting insert(); directly, so when !Wrappable tried to wrap it, the method already existed and it failed.

    I don't quite know what to do with this - I think changing RecessReflectorPackage::insert() method to wrappedInsert() should provide the same functionality, but why it's failing on some systems and not on others I'm not sure.

  • Kris Jordan

    Kris Jordan September 15th, 2009 @ 11:46 PM

    Thanks for this bug report! We're moving all bugs from lighthouse to github (as you probably noticed, it being separated so far from the codebase made it easy to attract spider webs).

    Thanks for looking into this Jamie. You've called out a piece of code (insert in RecessReflectorPackage) that needs updating. Great find, expect a commit and push soon.

    I've teased out two tickets from this ticket that are now moved to Github:

    Call to undefined method Model::insert

    Checking of PHP Version to avoid pains

  • Kris Jordan

    Kris Jordan September 15th, 2009 @ 11:46 PM

    • State changed from “new” to “hold”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Recess PHP Framework is an open source, full stack, RESTful PHP framework.