Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6694187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:04:21+00:00 2026-05-26T06:04:21+00:00

I am trying to do a CRUD as mentioned in Jobeet tutorial(http://agiletoolkit.org/learn/tutorial/jobeet/day3). I have

  • 0

I am trying to do a CRUD as mentioned in Jobeet tutorial(http://agiletoolkit.org/learn/tutorial/jobeet/day3). I have also added a generate.php inside page directory with the code mentioned in the link. When I try to access it via browser by http://localhost/atk4.1.2/?page=generate I am getting the following error,

Exception_ForUser
You should call parent::init() when you override it


Additional information: 

 - object_name: gift_project_generate

 - class: page_generate

I also have added a page named crud.php with the following contents inside the page directory the contents of which are as follows,

<?php
class page_crud extends Page{
    function init(){
        parent::init();
        $tabs=$this->add('Tabs');
        $tabs->addTab('Gifts')->add('CRUD')->setModel('Gift');
    }
}

The following is the Gift.php inside the Model directory,

<?php
class Model_Gift extends Model_Table {
    function init(){
        parent::init();
        $this->addField('id');
        $this->addField('name')->type('text');
        $this->addField('url')->type('text');
    }
}

Now when I try to access the crud page via http://localhost/atk4.1.2/?page=crud, I see the following errors,

Exception_InitError
You should define entity code for Model_Gift


C:\xampp\htdocs\atk4.1.2\atk4\lib\BaseException.php:37

But the database already has a table named gift and $this->dbConnect(); is not commented in Frontend.php.

Am I missing something here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:04:22+00:00Added an answer on May 26, 2026 at 6:04 am

    Add this to your model definition:

    public $enity_code='gift';
    

    This should be exactly same as the name of your table in SQL.

    The other error you are getting about init() not being called is a bug: https://github.com/atk4/atk4/issues/22

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to do a little PDO CRUD to learn some PDO. I have
I am trying to use the ASP.NET Dynamic Data features to generate CRUD scaffolding
I'm trying to use Ajax with my CRUD. I'm following this tutorial . I
I'm trying to learn RSpec and writing test for CRUD actions. Here is my
I am trying to learn Hibernate and I could create some simple CRUD operation
I have been trying to use jqgrids, default CRUD options. Below is my code:
I have a form which is a simple CRUD. I am trying to display
I am trying to build my first CRUD application and cant get the update
I am trying to use ajax to do CRUD. Should I use ODATA or
I'm trying to use RIA Services with Repository pattern, Every CRUD operations worked perfectly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.