Setting up files in CI 3 from CI2 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Setting up files in CI 3 from CI2 (/showthread.php?tid=78635) |
Setting up files in CI 3 from CI2 - ninab - 02-18-2021 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: An uncaught Exception was encountered Type: Error Message: Call to protected method CI_Javascript::_close_script() from context 'MX_Loader' Filename: /var/www/xyz.com/sbase/application/modules/auth/views/relogin.php Line Number: 3 Backtrace: 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 File: /var/www/xyz.com/sbase/index.php Line: 315 Function: require_once RE: Setting up files in CI 3 from CI2 - ninab - 02-23-2021 All good found the issue and fixed it by calling "External" function instead from the Javascript. Thanks for all who looked into it. |