Closed vpadhariya closed 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.
its "infoweb-internet-solutions/yii2-cms-pages": "^2.0" in composer.json file
can you post the contents of the "require" section of your composer.json file?
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" },
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"
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
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
Okay, sure, let me try this out.
Fabio, I just want to use "yii2-cms-pages" not the "yii2-cms" is this possible?
No that is not possible because the pages package has a lot of dependencies that are build into the cms package
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.
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.