Giter Site home page Giter Site logo

base's People

Contributors

dmitry-semenov avatar laoheimao avatar morontt avatar scrutinizer-auto-fixer avatar vals2004 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

base's Issues

have problem to run the app

hi , I have problem to run the app I did all of the CONFIGURATION setting in

but I don't know what I am do in step 4 :

4- Set document root of your web server to /path/to/application/web/ folder.

If I enter http://localhost/base-app/web/ -> then the site/index loaded but when I click In another link or I want to entire in admin module this redirect me to http://localhost/dashboard/

image

after click

image

what can I do to solve this problem?

debug toolbar not shown

hi
thanks for your extension, i init the application with dev environment but the yii2 debug toolbar not shown

error migrating up

i update my project with composer update and yii version update to 2.0.12 and yii2mod/yii2-user update to version 2.1, now when i update migration with "php yii migrate --migrationPath=@vendor/yii2mod/yii2-user/migrations" , i got the below error:
PHP Warning 'yii\base\ErrorException' with message 'strncmp() expects parameter 1 to be string, array given' in /var/www/html/test/vendor/yiisoft/yii2/BaseYii.php:133 Stack trace: #0 [internal function]: yii\base\ErrorHandler->handleError(2, 'strncmp() expec...', '/var/www/html/test', 133, Array)

Where to install.

Not clear where to install this??
1-Install yii2 basic app first using composer, and then install your app (base) within that basic app??
If I run the command given here in documentation, it adds a folder within basic app named application.
2-Is your base app complete package having everthing in it?? If I look into code it does not include vendor directory. (means have not framework). It has all other directories that make it complete app.
3- other option is to set up basic app, download your app, and merge things and configure???

requirements

thanks for your great extension i have a question about requirements, dose this extension work in php 7.0?
and another question can i use this extension in production? cause in production we can't change php version all time's for example if php 7.2 finally released it takes time to update php version of server and sometimes in production it is not possible to change php version frequently. yii2 will require php 7 in the yii 2.1 but you all time update php version. how we can sustain the project when you update php versions all time?

Installation/Running Migrations

When running "yii migrate", I get this error:

Yii Migration Tool (based on Yii v2.0.14.2)

PHP Warning 'yii\base\ErrorException' with message 'strncmp() expects parameter 1 to be string, array given'

in C:\xampp\htdocs\test\yii2mod-app\vendor\yiisoft\yii2\BaseYii.php:133

Stack trace:
#0 C:\xampp\htdocs\test\yii2mod-app\vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php(57): yii\BaseYii::getAlias()
#1 C:\xampp\htdocs\test\yii2mod-app\vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php(28): cyberz\migrations\controllers\MigrationsController->lookupMigrations()
#2 C:\xampp\htdocs\test\yii2mod-app\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(166): cyberz\migrations\controllers\MigrationsController->getNewMigrations()
...

I was able to fix these two lines in at line 55 in vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php:`
foreach ($this->migrationLookup as $migrationPath) {
if(is_array($migrationPath) and count($migrationPath)==1) // NEW
$migrationPath = $migrationPath[0]; // NEW
$basePath = Yii::getAlias($migrationPath);

Regards
Joachim

cyberz/yii2-multipath-migrations is no longer needed in Yii2 2.0.12

http://www.yiiframework.com/doc-2.0/guide-db-migrations.html#applying-migrations

migrationPath: string|array (defaults to @app/migrations), specifies the directory storing all migration class files. This can be specified as either a directory path or a path alias. Note that the directory must exist, or the command may trigger an error. Since version 2.0.12 an array can be specified for loading migrations from multiple sources.

I had to remove the class from console-local.php and set it to yiisoft's.

'controllerMap' => [
    'migrate' => [
        'class' => 'yii\console\controllers\MigrateController',
        'migrationPath' => [
            '@vendor/yii2mod/yii2-cms/migrations',
            '@vendor/yii2mod/yii2-cron-log/migrations',
            '@vendor/yii2mod/yii2-user/migrations',
            '@vendor/yii2mod/yii2-comments/migrations',
            '@vendor/yii2mod/yii2-settings/migrations',
            '@yii/rbac/migrations',
        ],
    ],

Installation migrate causing SQL error

I am working on my local machine using a MAMP setup which has multiple other Yii2 projects running.
Created new project with yii2mod/base, initiated the project, updated db config and then running - php yii migrate

I get an SQL error after about 4-5 minutes of running the command
Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [2006] MySQL server has gone away'

Below is log after running the command -

Yii Migration Tool (based on Yii v2.0.15.1)

Exception 'yii\db\Exception' with message 'SQLSTATE[HY000] [2006] MySQL server has gone away' in /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Connection.php:624

Stack trace:
#0 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Connection.php(996): yii\db\Connection->open()
#1 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Connection.php(983): yii\db\Connection->getMasterPdo()
#2 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Command.php(253): yii\db\Connection->getSlavePdo()
#3 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Command.php(1143): yii\db\Command->prepare(true)
#4 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#5 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/mysql/Schema.php(312): yii\db\Command->queryAll()
#6 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/mysql/Schema.php(125): yii\db\mysql\Schema->findColumns(Object(yii\db\TableSchema))
#7 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Schema.php(744): yii\db\mysql\Schema->loadTableSchema('migration')
#8 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/db/Schema.php(194): yii\db\Schema->getTableMetadata('{{%migration}}', 'schema', true)
#9 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/console/controllers/MigrateController.php(210): yii\db\Schema->getTableSchema('{{%migration}}', true)
#10 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(875): yii\console\controllers\MigrateController->getMigrationHistory(NULL)
#11 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(166): yii\console\controllers\BaseMigrateController->getNewMigrations()
#12 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#13 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#14 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#15 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#16 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array)
#17 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate', Array)
#18 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('migrate', Array)
#19 /Applications/MAMP/htdocs/ryberg/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#20 /Applications/MAMP/htdocs/ryberg/yii(25): yii\base\Application->run()
#21 {main}

Any chance I can get some help resolving this.

CMS Module Setup

In order to make the CMS admin pages work, it is required to have these changes in config/main.php:

'modules' => [
'cms' => [
'class' => 'yii2mod\cms\Module',
],
'admin' => [
'class' => 'app\modules\admin\Module',
'controllerMap' => [
'cms' => 'yii2mod\cms\controllers\ManageController', // Instead of CmsController !

Regards
Joachim

rerdirect loop

Hi, first thanks for putting this together its saved me some time, I have installed the app and on my pc (xampp) and got it working perfectly, however im having problems on my live site, the problem is that when I login I am stuck in a redirect loop.

I have narrowed it down to when I have the remember me ticked on the login form, if it is not ticked the login works great and I am redirected to the home page, however this login only lasts for the session.

I have this on a shared hosting server so I have had to do a redirect from the root to the web folder and I think this may be the cause, I have tried many variations of the htaccess file in both the root and the web folder but still a redirect loop whenever I have the remember me ticked.

I have to delete the _identity cookie to be able to see the site again, I must point out that the redirect loop is on every page not just the index page.

If you have any ideas or suggestions on how to fix this I would appreciate it.

Kind regards

Wayne

Update template

  1. Add yii2mod/yii2-user : dev-master version to composer.json
  2. Update UserModel
  3. Update UserController in the admin module
  4. Update views in the admin module
  5. Create bin directory, add to composer.json "bin-dir": "bin" to config section

User, CMS / Column Names Mismatch

The installation migration produces column names with dashes like created_at, auth_key,

The data in tests/_data reflects column names in camel case.

I changed the column names in the _data scripts to the ones using dashes; then the yii fixture "*" script runs.

But then opening web/index.php/admin throws an error on "Getting unknown property: app\models\UserModel::createdAt".

Regards
Joachim

theme manager

thanks for your extensions. is it possible adding an extension to manage theme in yii2 easily for exmple changing template from admin panel or sth similar to cms theme manager. it is really good and make yii2 and your extension make sense and amazing? this is really good cause adding an extra extension in your extension is really easy and make development of new features in the project faster which dont need to use cms and ... for regular features which take time to write from starting point.

hello

I have tried to download the yii2 mod base but there is a problem ... the vendor file is lost
Thank you

yii\base\ErrorException when apply migrations

What steps will reproduce the problem?

In Configuration Step 3 Apply migrations when do
php yii migrate

What do you get?

PHP Warning 'yii\base\ErrorException' with message 'strncmp() expects parameter 1 to be string, array given'

in {project_path}\vendor\yiisoft\yii2\BaseYii.php:133

Stack trace:
#0 {project_path}\vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php(56): yii\BaseYii::getAlias()
#1 {project_path}\vendor\cyberz\yii2-multipath-migrations\src\controllers\MigrationsController.php(28): cyberz\migrations\controllers\MigrationsController->lookupMigrations()
#2 {project_path}\vendor\yiisoft\yii2\console\controllers\BaseMigrateController.php(155): cyberz\migrations\controllers\MigrationsController->getNewMigrations()
#3 {project_path}\vendor\yiisoft\yii2\base\InlineAction.php(57): yii\console\controllers\BaseMigrateController->actionUp()
#4 {project_path}\vendor\yiisoft\yii2\base\InlineAction.php(57): ::call_user_func_array:{{project_path}\vendor\yiisoft\yii2\base\InlineAction.php:57}()
#5 {project_path}\vendor\yiisoft\yii2\base\Controller.php(156): yii\base\InlineAction->runWithParams()
#6 {project_path}\vendor\yiisoft\yii2\console\Controller.php(128): yii\base\Controller->runAction()
#7 {project_path}\vendor\yiisoft\yii2\base\Module.php(523): yii\console\Controller->runAction()
#8 {project_path}\vendor\yiisoft\yii2\console\Application.php(180): yii\base\Module->runAction()
#9 {project_path}\vendor\yiisoft\yii2\console\Application.php(147): yii\console\Application->runAction()
#10 {project_path}\vendor\yiisoft\yii2\base\Application.php(380): yii\console\Application->handleRequest()
#11 {project_path}\yii(25): yii\base\Application->run()
#12 {main}

Proposed solution

In config/console.php
Add migrationPath to the $config['controllerMap']['migrate'] like below

        'migrate' => [
            'class' => 'cyberz\migrations\controllers\MigrationsController',
            'migrationLookup' => [
                '@vendor/yii2mod/yii2-cms/migrations',
                '@vendor/yii2mod/yii2-cron-log/migrations',
                '@vendor/yii2mod/yii2-user/migrations',
                '@vendor/yii2mod/yii2-comments/migrations',
                '@vendor/yii2mod/yii2-settings/migrations',
                '@yii/rbac/migrations',
            ],
            'migrationPath' => '@app/migrations'
        ],

Thats because BaseMigrateController->migrationPath default value is an array, and when we apply the migration String expected

Additional info

Q A
Yii version 2.0.12
PHP version 5.6.30

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.