Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error occurs when i install this extension #13

Closed
F-12 opened this issue Oct 18, 2014 · 12 comments
Closed

error occurs when i install this extension #13

F-12 opened this issue Oct 18, 2014 · 12 comments

Comments

@F-12
Copy link

F-12 commented Oct 18, 2014

using the installation guide in README,an error occurs! When i intend to Install Migrations using the command an follows:

php yii migrate --migrationPath=@artkost/qa/migrations

I got an error message:
***applying m140314_120441_create_qa_answer_tablea
PHP Strict Warning 'yii\base\ErrorException' with message 'Declaration of arkost\qa\models\Answer::afterSave() should be compatible with yii\db\BaseActiveRecord::afterSave($insert,$changedAttributes)'

in E:\application\apache\htdocs\qa\vendor\artkost\yii2-qa\models\Answer.php

@JiLiZART
Copy link
Member

Can you provide version of Yii?

@F-12
Copy link
Author

F-12 commented Oct 19, 2014

I use yii2.0

@F-12
Copy link
Author

F-12 commented Oct 19, 2014

Thanks a lot to consider my issue.
I use yii2.0.
I tried many ways to fix the problem I met yesterday. And after I modified the function aferSave() in artkost/yii-qa/models/Answer.php and Question.php, it seemed to work. But unfortunately, I still did not install this extension successfully.Because when i use http://localhost/path/to/index.php?r=qa to access QA, there is an error page as follows:‍

can you help me to install this extension successfully?

@F-12
Copy link
Author

F-12 commented Oct 19, 2014

whe does it always fail to upload my screenshot?so upset...

@JiLiZART
Copy link
Member

You changed your configuration file?

'modules' => [
        'qa' => 'artkost\qa\Module',
        'userClass' => 'app\models\User',
        'userNameFormatter' => 'getUserName'
        ...
    ]

@F-12
Copy link
Author

F-12 commented Oct 19, 2014

yes,I did chang my configuration file:
$config = [
'id' => 'basic',
'basePath' => dirname(DIR),
'bootstrap' => ['log'],
'modules' => [
'qa' => 'artkost\qa\Module',
'userClass' => 'app\models\User',
'userNameFormatter' => 'getUserName'
],
...
]

after doing this, I run the command
php yii migrate --migrationPath=@artkost/qa/migrations
error again like below:

2014-10-19 07:48:58 [-][-][-][error][yii\base\InvalidParamException] exception 'yii\base\InvalidParamException' with message 'Invalid path alias: @artkost/qa/migrations' in E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\BaseYii.php:151
Stack trace:
#0 E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\console\controllers\MigrateController.php(114): yii\BaseYii::getAlias('@artkost/qa/mig...')
#1 E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\base\Controller.php(146): yii\console\controllers\MigrateController->beforeAction(Object(yii\base\InlineAction))
#2 E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\console\Controller.php(83): yii\base\Controller->runAction('', Array)
#3 E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\base\Module.php(423): yii\console\Controller->runAction('', Array)
#4 E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\console\Application.php(160): yii\base\Module->runAction('migrate', Array)
#5 E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\console\Application.php(136): yii\console\Application->runAction('migrate', Array)
#6 E:\application\apache\htdocs\yii2qa\vendor\yiisoft\yii2\base\Application.php(353): yii\console\Application->handleRequest(Object(yii\console\Request))
#7 E:\application\apache\htdocs\yii2qa\yii(23): yii\base\Application->run()
#8 {main}

------------------ 原始邮件 ------------------
发件人: "Nikolay Kostyurin";[email protected];
发送时间: 2014年10月19日(星期天) 下午3:44
收件人: "artkost/yii2-qa"[email protected];
抄送: "十二wifi"[email protected];
主题: Re: [yii2-qa] error occurs when i install this extension (#13)

You changed your configuration file?
'modules' => [ 'qa' => 'artkost\qa\Module', 'userClass' => 'app\models\User', 'userNameFormatter' => 'getUserName' ... ]


Reply to this email directly or view it on GitHub.

@JiLiZART
Copy link
Member

Can you provide some logs, or screens ?

@F-12
Copy link
Author

F-12 commented Oct 19, 2014

I provided screens for my every comment.‍
but the screens never showed.

------------------ 原始邮件 ------------------
发件人: "Nikolay Kostyurin";[email protected];
发送时间: 2014年10月19日(星期天) 下午4:07
收件人: "artkost/yii2-qa"[email protected];
抄送: "十二wifi"[email protected];
主题: Re: [yii2-qa] error occurs when i install this extension (#13)

Can you provide some logs, or screens ?


Reply to this email directly or view it on GitHub.

@F-12
Copy link
Author

F-12 commented Oct 19, 2014

ok, I have pasted my logs in the previous comment.


一级优先,我在15950572500(phone)
二级优先,我在460441303(QQ)
三级优先,我在[email protected]/[email protected]
¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥这是分割线¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥

——去看日出——
在下 王飞
$$$$$$$$$$$$$$$$$$$$$这是分割线$$$$$$$$$$$$$$$$$$$$$
参差荇菜,左右流之。不念过往,不畏将来。日月盈仄,斗转星移。存活一生,然后逝去。

------------------ 原始邮件 ------------------
发件人: "Nikolay Kostyurin";[email protected];
发送时间: 2014年10月19日(星期天) 下午4:07
收件人: "artkost/yii2-qa"[email protected];
抄送: "十二wifi"[email protected];
主题: Re: [yii2-qa] error occurs when i install this extension (#13)

Can you provide some logs, or screens ?


Reply to this email directly or view it on GitHub.

@JiLiZART
Copy link
Member

How you install extension? through composer?
You can try another method
php yii migrate --migrationPath=@vendor/artkost/qa/migrations

@F-12
Copy link
Author

F-12 commented Oct 20, 2014

Thank you so much!
With your help, I finally install the extension successfully.


一级优先,我在15950572500(phone)
二级优先,我在460441303(QQ)
三级优先,我在[email protected]/[email protected]
¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥这是分割线¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥

——去看日出——
在下 王飞
$$$$$$$$$$$$$$$$$$$$$这是分割线$$$$$$$$$$$$$$$$$$$$$
参差荇菜,左右流之。不念过往,不畏将来。日月盈仄,斗转星移。存活一生,然后逝去。

------------------ 原始邮件 ------------------
发件人: "Nikolay Kostyurin";[email protected];
发送时间: 2014年10月20日(星期一) 凌晨0:10
收件人: "artkost/yii2-qa"[email protected];
抄送: "十二wifi"[email protected];
主题: Re: [yii2-qa] error occurs when i install this extension (#13)

How you install extension? through composer?
You can try another method
php yii migrate --migrationPath=@vendor/artkost/qa/migrations


Reply to this email directly or view it on GitHub.

@JiLiZART
Copy link
Member

you are welcome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants