infoweb-internet-solutions / yii2-cms-pages

CMS page module for Yii2
5 stars 6 forks source link

Error after install Trait 'infoweb\alias\traits\AliasRelationTrait' not found #18

Closed vpadhariya closed 8 years ago

vpadhariya commented 8 years ago

Is there anything I missed?

I installed this successfully and after adding below line to config it gives the error "Trait 'infoweb\alias\traits\AliasRelationTrait' not found"

'modules' => [ ... 'pages' => [ 'class' => 'infoweb\pages\Module', ], ],

NOTE : I have successfully setup the migration.

fabiomaggio commented 8 years ago

What version of the yii2-cms and yii2-cms-pages modules are u using? U are likely to get this error if the yii2-cms and yii2-cms-pages modules are out of sync.

vpadhariya commented 8 years ago

its "infoweb-internet-solutions/yii2-cms-pages": "^2.0" in composer.json file

fabiomaggio commented 8 years ago

can you post the contents of the "require" section of your composer.json file?

vpadhariya commented 8 years ago

here it is

"require": { "php": ">=5.4.0", "yiisoft/yii2": ">=2.0.6", "yiisoft/yii2-bootstrap": "", "zelenin/yii2-semantic-ui": "~2", "vova07/yii2-fileapi-widget": "", "yiisoft/yii2-jui": "~2.0.0", "yiidoc/yii2-redactor": "", "yiisoft/yii2-swiftmailer": "", "kartik-v/yii2-editable": "", "kartik-v/yii2-widget-colorinput": "", "kartik-v/yii2-widget-growl": "*", "rmrevin/yii2-fontawesome": "~2.14", "infoweb-internet-solutions/yii2-cms-pages": "^2.0" },

fabiomaggio commented 8 years ago

You have to set versions for some packages that are used by the yii2-cms-pages package. In the future these dependencies will be set in the compose.json file of each of these packages (infoweb-internet-solutions/yii2-cms#66) but for now you can use the following rules:

"infoweb-internet-solutions/yii2-cms-pages": "^2.0", "infoweb-internet-solutions/yii2-cms": "^2.0", "infoweb-internet-solutions/yii2-cms-sliders": "^2.0", "infoweb-internet-solutions/yii2-cms-settings": "^2.0", "infoweb-internet-solutions/yii2-cms-menu": "^3.1", "infoweb-internet-solutions/yii2-cms-alias": "^2.0", "infoweb-internet-solutions/yii2-cms-seo": "^2.0", "infoweb-internet-solutions/yii2-cms-partials": "^2.0"

vpadhariya commented 8 years ago

OK, if I Change "^2.0" to "*" will it fix this issue?

"infoweb-internet-solutions/yii2-cms-pages": "^2.0"

to

"infoweb-internet-solutions/yii2-cms-pages": "*"

in my require section of composer.json

fabiomaggio commented 8 years ago

yes, but keep in mind that some of those other packages are also used by the yii2-cms-pages package so if you need them too

vpadhariya commented 8 years ago

Okay, sure, let me try this out.

vpadhariya commented 8 years ago

Fabio, I just want to use "yii2-cms-pages" not the "yii2-cms" is this possible?

fabiomaggio commented 8 years ago

No that is not possible because the pages package has a lot of dependencies that are build into the cms package

vpadhariya commented 8 years ago

Ohh I see,

I just installing the "yii2-cms-pages" as I only wanted the pages management module in my yii2 developed app.

let me check it out with the whole package.