Migrating app from 1.1 to 2.0

I’m new to this forum and new to yii. I had an application developed from on version 1 and I want to move it to 2 as most of the topic and material I find today is for version 2. I googled this fatal error with no luck. I hope someone can point me in the right direction:

PHP Fatal Error – yii\base\ErrorException

Call to a member function register() on a non-object

  1. in C:\inetpub\wwwroot\basic\views\layouts\tpl_header.php at line 11

234567891011121314151617181920<html lang="en">

<head>

&lt;meta charset=&quot;utf-8&quot;&gt;





&lt;title&gt;&lt;?php echo 'Title' ?&gt;&lt;/title&gt;





&lt;?php Yii::&#036;app-&gt;bootstrap-&gt;register(); ?&gt;





&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;





&lt;meta name=&quot;description&quot; content=&quot;&quot;&gt;





&lt;meta name=&quot;author&quot; content=&quot;Simpson Moyo - Webapplicationthemes.com&quot;&gt;








&lt;?php


    &#036;baseUrl = Yii::&#036;app-&gt;request-&gt;baseUrl.'/css/hebo'; 





    &#036;cs = Yii::&#036;app-&gt;getClientScript();





    Yii::&#036;app-&gt;clientScript-&gt;registerCoreScript('jquery');








    Yii::&#036;app-&gt;clientScript-&gt;registerScript('helpers', '


        baseUrl = '.CJSON::encode(Yii::&#036;app-&gt;baseUrl).';


    ');


?&gt;








&#60;&#33;-- the styles --&#62;





&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/css/bootstrap.min.css&quot;&gt;





&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/css/bootstrap-responsive.min.css&quot;&gt;





&lt;link rel='stylesheet' type='text/css' href='//fonts.googleapis.com/css?family=Pontano+Sans'&gt;





&#60;&#33;--&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;&lt;?php echo &#036;baseUrl;?&gt;/js/nivo-slider/themes/default/default.css&quot; media=&quot;screen&quot; /&gt;
  1. yii\base\ErrorHandler::handleFatalError()

Read this? http://www.yiiframework.com/doc-2.0/guide-intro-upgrade-from-v1.html

Welcome!

As Patrick says: you need to re-write your application.

There is no smooth upgrade path to take from Yii 1 to Yii 2.

The errors you are getting is because the application structure, the classes, interfaces - everything! has changed.

So, basically: you have to change everything.

Sorry!

\

Thanks, I’ve added a short YouTube video to help describe what I do not understand. If you get a second and can watch it and give me feedback, I’d appreciate it.

I have already learned a lot, but at every corner, there is another "gotcha." like $app vs. app().

www.youtube.com/playlist?list=PL7q-X4OkBZCVG424cJc-jn4QbpwwAaaC-