Install Advanced Template Index.php Error

[size="5"]UPDATE :[/size]

I’d like to apologize, I found a thread that addresses this topic. The topic still appears to have no solution at this time. If a solution exists I feel it would be more appropriate to supply it to the following thread:

URL : http://www.yiiframework.com/forum/index.php/topic/57512-calling-unknown-method-yiiweburlmanageraddrules/

Hello Everyone,

I just switched over to Yii2 today. I researched the advanced template and decided to go with that. However once I finished mapping my document roots, I received the following error message when trying to access /frontend/web/index.php.

Error : "Calling unknown method: yii\web\UrlManager::addRules()"

[size="5"]Installed app under the following directions:[/size]

  1. Use composer to install prerequisites

Command : php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced c:/xampp/htdocs/rewardz.us

Picture: Yii2_composer.jpg (attached)

  1. Init Project

Command: c:/xampp/htdocs/rewardz.us/init

Picture: Yii2_init.jpg (attached)

  1. Create a new database and adjust the components[‘db’] configuration in common/config/main-local.php accordingly.

Note: I Did also do the Migrate command after configuring the connection

Picture: Yii2_connection.jpg

  1. Set up document roots :

Picture: Yii2_document_roots.jpg

[size="5"]Results:[/size]

Error : "Calling unknown method: yii\web\UrlManager::addRules()"

See Picture: Yii2_result

Pic 1: Yii2_init

Pic 2: Yii2_composer

Pic 3: Yii2_connection

Pic 4: Yii2_document_roots

Pic 5: Output when loading index.php page

If this thread has already been posted I’d like to apologize for any time wasted reviewing it. If so, could you please submit a link to the thread that address it.

Thanks in advance!

run


 php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta1" 

before create-project.

https://github.com/yiisoft/yii2/tree/master/apps/advanced

actually


 composer global require "fxp/composer-asset-plugin:1.0.*@dev" 

I came across that command while searching, along with command : "composer update --dev"

A new error arose and I’ve been following this thread :

A few users are experiencing this, having a bit of trouble deciphering what the solution.

Attached is a photo of the error that proceeds the commands:

composer global require "fxp/composer-asset-plugin:1.0.*@dev"

composer update --dev

Arash26 : is there a thread for this error? or a solution you might be able to provide?

This asset manager is new and my data was for 2 days ago.

you can add this to your composer.json and run composer --prefer-dist update.




        "bower-asset/jquery": "@stable",

        "bower-asset/bootstrap": "@stable",

        "bower-asset/jquery-ui": "@stable",

        "bower-asset/jquery.inputmask": "@stable",

        "bower-asset/punycode": "@stable"