Welcome Guest, Not a member yet? Register   Sign In
scaffolding_lang.php vars are not being loaded

Version CodeIgniter_1.5.4.zip
File Scaffolding.php
Line 76


I have just tried out the Scaffolding feature and found that the vars in scaffolding_lang.php are not being loaded. This results in Undefined variable notices where the vars are used in the views folder.

Looking at Scaffolding.php it seems the variables should be returned as an array into $this->lang and passed in using load->vars.

// Load the language file and create variables
$this->lang = $this->CI->load->language('scaffolding', '', TRUE);    


This is not the case as the language method in the Loader class excepts two params and returns void.

     * Loads a language file
     * @access    public
     * @param    array
     * @param    string
     * @param    bool
     * @return    void
    function language($file = array(), $lang = '')


[eluser]Derek Allard[/eluser]
Ack, darn that was my fault.

Could you try changing
$this->lang = $this->CI->load->language('scaffolding', '', TRUE);
$this->lang = $this->CI->load->language('scaffolding');
and let me know if that works for you?

[eluser]Derek Allard[/eluser]
OK, forget my last advice. I goofed up when autoloading languages. Grab these 3 new files.


i had the same issue, since its my first time using CI on IIS with MSSQL I thought I broke something else. Glad to see it wasn't me Wink

[eluser]Derek Allard[/eluser]
trahma... it should work for you though with a new download correct? The download was patched. Could you grab a new copy and let me know if the problem persists?

i just downloaded the files listed above and after that it worked fine

I think that I encountered the same bug, but URLs to corrected files seem to be broken... Can anyone upload corrected files somewhere?

I also think that a patch to CI 1.54 should be released, because version I downloaded from the main page still contains many already reported bugs...

Edit: URLs are not broken. It was my ISP's DNS server's fault >:-(

Edit2: But even after I downloaded files the error persists...

I'm not exactly sure, but changing stuffs like this in scaffolding.php:
'title'    =>  ( ! isset($this->lang['scaff_view'])) ? 'View Data' : $this->lang['scaff_view'],
'title'    =>  ( $this->CI->lang->line('scaff_view') === FALSE ) ? 'View Data' : $this->CI->lang->line('scaff_view'),
seems to solve the problem with particular language message identifier...

I also checked and noticed that changing things like this in view files:
also solves the problem with particular language message identifier...

Any solutions? Or maybe I'm doing something not as I should? Please tell me how should I load particular language for scaffolding page?

[eluser]Derek Allard[/eluser]
You can always grab the latest (patched) files from the subversion repository if you want. In addition to any already fixed bugs, you'll get access to many new features.

Here's some quick instructions to get you started.

I know SVN. I have used it with XT (XHTML Templates).

Anyway newest files don't work for me... The only way to see translated scaffolding is changing files as I shown above... Any suggestions?

[eluser]Derek Allard[/eluser]
Does it work in english?

Theme © iAndrew 2016 - Forum software by © MyBB