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

Problem with install news module #1883

Closed
testt23 opened this issue Nov 23, 2018 · 7 comments
Closed

Problem with install news module #1883

testt23 opened this issue Nov 23, 2018 · 7 comments

Comments

@testt23
Copy link
Contributor

testt23 commented Nov 23, 2018

I can successfully installed the module by composer, but then I got an error after vendor migration command

https://luya.io/packages/luyadev--luya-module-news

./vendor/bin/luya migrate
Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: luya\console\Application::news'

in /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Component.php:209

Stack trace:
#0 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('news', Array)
#1 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(luya\console\Application), Array)
#2 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#3 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application->__construct(Array)
#4 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/base/Boot.php(247): yii\console\Application->__construct(Array)
#5 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/bin/luya(22): luya\base\Boot->applicationConsole()
#6 {main}
./vendor/bin/luya import
Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: luya\console\Application::news'

in /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Component.php:209

Stack trace:
#0 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('news', Array)
#1 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(luya\console\Application), Array)
#2 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#3 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application->__construct(Array)
#4 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/base/Boot.php(247): yii\console\Application->__construct(Array)
#5 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/bin/luya(22): luya\base\Boot->applicationConsole()
#6 {main}
cd configs
./vendor/bin/luya import
-bash: ./vendor/bin/luya: No such file or directory
cd ..
./vendor/bin/luya import
Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: luya\console\Application::news'

in /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Component.php:209

Stack trace:
#0 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/BaseYii.php(546): yii\base\Component->__set('news', Array)
#1 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/BaseObject.php(107): yii\BaseYii::configure(Object(luya\console\Application), Array)
#2 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject->__construct(Array)
#3 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application->__construct(Array)
#4 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/base/Boot.php(247): yii\console\Application->__construct(Array)
#5 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/bin/luya(22): luya\base\Boot->applicationConsole()
#6 {main}

What can I get the Problem?

@nadar
Copy link
Contributor

nadar commented Nov 23, 2018

It seems you have wrong configure you config files:

Exception 'yii\base\UnknownPropertyException' with message 'Setting unknown property: luya\console\Application::news'

news is not an application propertie. maybe you forgot modules section.

@testt23
Copy link
Contributor Author

testt23 commented Nov 23, 2018

Hmm.
I decided the first problem, but following problem occurred when executing an import command

./vendor/bin/luya migrate
Yii Migration Tool (based on Yii v2.0.15.1)

Total 3 new migrations to be applied:
  m150204_144806_news_article
  m150428_095829_news_cat
  m161212_084323_add_teaser_field

Apply the above migrations? (yes|no) [no]:yes
*** applying m150204_144806_news_article
    > create table news_article ... done (time: 0.002s)
*** applied m150204_144806_news_article (time: 0.035s)

*** applying m150428_095829_news_cat
    > create table news_cat ... done (time: 0.001s)
*** applied m150428_095829_news_cat (time: 0.004s)

*** applying m161212_084323_add_teaser_field
    > add column teaser_text text to table news_article ... done (time: 0.002s)
*** applied m161212_084323_add_teaser_field (time: 0.003s)

3 migrations were applied.

Migrated up successfully.
./vendor/bin/luya import

LUYA import command (based on LUYA 1.0.14)

luya\cms\admin\importers\BlockImporter:
PHP Warning 'yii\base\ErrorException' with message 'Division by zero'

in /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/widgets/Table.php:356

Stack trace:
#0 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/widgets/Table.php(356): yii\base\ErrorHandler->handleError(2, 'Division by zer...', '/home/uinessdi/...', 356, Array)
#1 [internal function]: yii\console\widgets\Table->yii\console\widgets{closure}(2, 3)
#2 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/widgets/Table.php(364): array_map(Object(Closure), Array, Array)
#3 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/widgets/Table.php(231): yii\console\widgets\Table->calculateRowHeight(Array)
#4 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/widgets/Table.php(187): yii\console\widgets\Table->renderRow(Array, '\xE2\x95\x91', '\xE2\x94\x82', '\xE2\x95\x91')
#5 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/console/commands/ImportController.php(218): yii\console\widgets\Table->run()
#6 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/console/commands/ImportController.php(190): luya\console\commands\ImportController->logValueToTable(Array)
#7 [internal function]: luya\console\commands\ImportController->actionIndex()
#8 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#11 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array)
#12 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('import', Array)
#13 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('import', Array)
#14 /home/uinessdi/luya-kickstarter/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#15 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/base/Boot.php(249): yii\base\Application->run()
#16 /home/uinessdi/luya-kickstarter/vendor/luyadev/luya-core/bin/luya(22): luya\base\Boot->applicationConsole()
#17 {main}

@nadar
Copy link
Contributor

nadar commented Nov 23, 2018

Make the window bigger, its a problem from yii2 table console widget yiisoft/yii2#15552

@testt23
Copy link
Contributor Author

testt23 commented Nov 23, 2018

Importer run success!

Thanks man +1

@testt23 testt23 closed this as completed Nov 23, 2018
@testt23 testt23 reopened this Nov 24, 2018
@testt23
Copy link
Contributor Author

testt23 commented Nov 24, 2018

I successfully installed module, but then did I find out where I can add news?

In my backend panel(admin) I not see News module :/

@nadar
Copy link
Contributor

nadar commented Nov 24, 2018

from the readme:

After adding the persmissions to your group you will be able to edit and add new news articles.

@testt23
Copy link
Contributor Author

testt23 commented Nov 24, 2018

My user is administrator, these rights(persmissions) from where they are?

I can see your post and solved problem

luyadev/luya-module-news#5

Thanks

@testt23 testt23 closed this as completed Nov 24, 2018
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