luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
812 stars 207 forks source link

Problem with install news module #1883

Closed testt23 closed 5 years ago

testt23 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Make the window bigger, its a problem from yii2 table console widget https://github.com/yiisoft/yii2/issues/15552

testt23 commented 5 years ago

Importer run success!

Thanks man +1

testt23 commented 5 years ago

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 commented 5 years ago

from the readme:

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

testt23 commented 5 years ago

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

I can see your post and solved problem

https://github.com/luyadev/luya-module-news/issues/5

Thanks