Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthoroisucf
     
    I just built a brand new admin_scaffold from scratch. It will not Create or Update, but Read and Delete work. I'm trying to see if I can use the regular scaffold generator's code with some minor updates. You would think the generated code would look the same sans the access controls. However, It looks like a totally different implementation. I did check the permissions and I should be able to Create and Update.
    • CommentAuthoroisucf
     
    Ok, after some digging found the bug in is caused by the admin_scaffold generator capitalizing the model name in the _form.tpl file. Should be lower case....
    • CommentAuthoroisucf
     
    The admin_scaffold generator is using "model_name" in its templates should be using "singular_name"...
    • CommentAuthoralvarez.an
     
    hello, could someone fix this bug? or tell me how to do it?
    thanks!
    • CommentAuthorichbinweg
     

    Hi Forum,

    great job you did! Because i had the same problems - but i couldn't find the BUG... Here's a hotfix i tried out successfully - but I'am not sure if it's state of the art (but it works).

    Got to the follwoing directory and change the file (assuming the booklink tutorial, with admin-plugin installed): \booklink\app\vendor\plugins\admin\generators\admin_scaffold\sintags_templates\form.tpl This file should look like:

    <?php  echo '<%'?>= error_messages_for '<?php  echo $model_name?>' %>
    <?php  if(empty($content_columns)) : ?>
    <?php  echo '<%'?>= all_input_tags <?php  echo $model_name?>, '<?php  echo $model_name?>', {} %>
    <?php  else : 
            foreach ($content_columns as $column=>$details){
                if($column == 'id'){
                    continue;
                }
                echo "
        <fieldset>
            <label for=\"{$singular_name}_{$column}\">_{".
                AkInflector::humanize($details['name']).
                    "}</label> 
            <%= input '$model_name', '$column' %>
        </fieldset>
    
    ";
            }
    endif;
    

    You have to change the line:

            <%= input '$model_name', '$column' %>
    

    to

            <%= input '".strtolower($model_name)."', '$column' %>
    

    this is just a normal "tolower" php Function - but I am not sure, if it's the way akelos-developer way of thinking - maybe there is a tolower function in the akelos framework, that should be used...

    Hope i could help out...

    I reported that bug to the akelos-development Team (http://trac.akelos.org/ticket/211).

    Greetings from Bremen, Germany Sebastian

    • CommentAuthoroisucf
     
    Hi ,

    If you go here http://forum.akelos.org/discussion/523/ I posted the code to fix this. However, There is a related bug that I have not found yet.

    -Daniel