CodeIgniter Forums

Full Version: Setting up files in CI 3 from CI2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First post for me and hoping someone has the answer with so many brilliant minds around

This is a code from a working CI v2 system currently trying to migrate to CI v3. Here is the code and the error i am getting. Is there a way to resolve it.

One of my login page views has this line right on top:

echo $this->javascript->_open_script($src = base_url().'assets/js/changepwd.js').$this->javascript->_close_script();

I get the error:
Type: Error
Message: Call to protected method CI_Javascript::_close_script() from context 'MX_Loader'

The system was using third_party/MX/<files> in CI hoping that is ok......

I am not very confident on CI but hoping to pick it up with the guidance i receive.......

Full Error:

[font=Times]An uncaught Exception was encountered[/font]
Type: Error
[font=Times]Message: Call to protected method CI_Javascript::_close_script() from context 'MX_Loader'

[font=Times]Filename: /var/www/[/font]
Line Number: 3


File: /var/www/
Line: 360
Function: include

File: /var/www/
Line: 296
Function: _ci_load

File: /var/www/
Line: 14
Function: view

File: /var/www/
Line: 25
Function: load

[font=Times]File: /var/www/
Line: 315
Function: require_once

All good found the issue and fixed it by calling "External" function instead from the Javascript. Thanks for all who looked into it.