Welcome Guest, Not a member yet? Register   Sign In
Setting up files in CI 3 from CI2

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 2....so 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/xyz.com/sbase/application/modules/auth/views/relogin.php[/font]
Line Number: 3


File: /var/www/xyz.com/sbase/application/third_party/MX/Loader.php
Line: 360
Function: include

File: /var/www/xyz.com/sbase/application/third_party/MX/Loader.php
Line: 296
Function: _ci_load

File: /var/www/xyz.com/sbase/application/libraries/Template.php
Line: 14
Function: view

File: /var/www/xyz.com/sbase/application/modules/auth/controllers/Auth.php
Line: 25
Function: load

[font=Times]File: /var/www/xyz.com/sbase/index.php
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.

Theme © iAndrew 2016 - Forum software by © MyBB