Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Error on create admin posts
  • Hello FuelPHP Users,
    i have a error with: oil generate admin posts title:string slug:string summary:text body:text user_id:int Warning - file_get_contents(/Users/Sebastian/Sites/blog/fuel/packages/oil/views/admin/orm/views/template.php): failed to open stream: No such file or directory in PKGPATH/oil/classes/generate/admin.php on line 73 Fuel run on a Mac with MAMP. I hope anyone can help me! (sorry for my english)
  • I also got the same error using oil to do the setup. I checked the version and also reads 1.1. Digging in the code of packages/oil/generate/admin.php around line 45 I found this:
       array(
        'source' => $subfolder.'/views/template.php',
        'location' => 'views/admin/template.php',
        'type' => 'views',
       ),
    
    And it should be like this:
       array(
        'source' => 'template.php',
        'location' => 'views/admin/template.php',
        'type' => 'views',
       ),
    
    I checked github and the code looks good: https://github.com/fuel/oil/blob/1.1/develop/classes/generate/admin.php Where does oil take the code from?, when you use the command line to do the setup
    i.e. oil create app How can you change "the source" or update the version from here? Meanwhile you either change the code in a new install and then run generate admin.... OR If you already generate the files, copy template.php from:
    packages/oil/views/orm/template.php
    and pasted in:
    app/views/admin/
    Cheers,
  • 1.1 had quite a few issues, I suggest you switch to 1.2RC1, which is very stable. Or wait a few days until 1.2 is released. Part of the admin code is generated, part comes from view templates in the package's views folder. You can copy them to app/views and modify them there, oil will use those if they exist. For v2.0, the idea is to have everything generated by views, so it will be 100% customisable.
  • Update your FuelPHP installation, this is a bug that has been fixed some time ago.
  • WanWizard wrote on Wednesday 25th of April 2012:
    Update your FuelPHP installation, this is a bug that has been fixed some time ago.

    How can i update my fuelphp installation?
  • I get the same error, MAMP on Mac, using the latest version of Fuel via oil create syntax. Warning - file_get_contents(/Users/User/Sites/Site/fuel/packages/oil/views/admin/orm/views/template.php): failed to open stream: No such file or directory in PKGPATH/oil/classes/generate/admin.php on line 73 I currently have the 1.1/develop branch checked out. Any thoughts?

Howdy, Stranger!

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

In this Discussion