Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Problems with oil in version 1.4
  • Hello,
    Please help! I tried to create models with oil in Fuelphp 1.4v but it didn't work.

    I wrote: 
    oil generate model users username:varchar[50] password:string group:int email:string last_login:int login_hash:string profile_fields:text  

    and console gave me this:
    Error - Class 'Clio' not found in PKGPATH/oil/classes/generate.php on line 238

    After, I tried to use "scaffold" but I had problems too. Console gave me this:
    Notice - Undefined index: plural_name in PKGPATH/oil/classes/generate/scaffold.php on line 105

    Maybe I need configure something? to set any file?

    It is only in 1.4 version. 
    I have an old project with 1.3 version and "oil" works fine

    PD: Sorry for my english
    Thanks a lot!!
  • Cami_ev

    (1) Error - Class 'Clio' not found in PKGPATH/oil/classes/generate.php on line 238
    This is spelling error at
    PKGPATH/oil/classes/generate.php on line 238. Use Cli.
  • Has been fixed. Thanks for reporting it.
  • Fix the typo by hand (change Clio by Cli) or re-install v1.4.

    This has been fixed in the repo and the zipfile that's currently on Github.
  • I'm still having the same error using the scaffold command, I've changed Clio to Cli on PKGPATH/oil/classes/generate.php but i still get the following error:

    Notice - Undefined index: plural_name in PKGPATH/oil/classes/generate/scaffold.php on line 105

    When running the command:

    php oil g scaffold user id:integer organisation_id:integer first_name:string last_name:string email:string job_title:string password:text

  • Oh just found that changing PKGPATH/oil/classes/generate/scaffold.php line 105 from:

    $data['plural_name'] = \Cli::option('singular')? $data['singular_name'] : \Inflector::pluralize($data['plural_name']);

    TO:

    $data['plural_name'] = \Cli::option('singular')? $data['singular_name'] : \Inflector::pluralize($data['singular_name']);

    Seems to solve the problem. Looks like another typo..

  • Grrr... I hate last-minute fixes...
  • Has been fixed in the 1.4/master repo, downloads have been updated too.
  • It works!
    Thanks to fix it
  • Thanks a lot, but I decided work with 1.3 version and to work with 1.4 when this will be stable. I think is the best, for a time.
    I will continue working and learning about this fantastic framework FuelPHP :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion