Giter VIP home page Giter VIP logo

yii2-core's Introduction

Yii2 Core

Click on a ⭐!

Total Downloads Latest Stable Version Latest Unstable Version License

Yii2 Core Project Template.

It was created and developing as a fast start for building an advanced sites based on Yii2.

It covers typical use cases for a new project and will help you not to waste your time doing the same work in every project.

Table of contents

Features

Screenshots

backend frontend

yii2-core's People

Contributors

beaten-sect0r avatar c0r3xx avatar sinfuljosh 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  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  avatar  avatar  avatar  avatar

yii2-core's Issues

Disable bootstrap asset in frontend

How can I possibly disable bootstrap assets like css js etc. in frontend only. I already tried removing 'yii\bootstrap\BootstrapAsset' in frontend AppAsset.php but still generating bootstrap assets in the frontend web assets folder

RBAC

Насколько я помню, в модуле https://github.com/developeruz/yii2-db-rbac
нельзя проверить на бизнес правила - BizRule.
Например, админ имеет полный доступ к постам, а автор - только к своим. Но оба они имеют доступ к одному экшену.

А из описания следует, что работать не будет
https://github.com/developeruz/yii2-db-rbac

С этого момента, после обработки запроса (событие EVENT_BEFORE_ACTION) проверяются права текущего пользователя (Yii::$app->user) на выполнение запрашиваемого действия (Yii::$app->user->can()) Действие считается разрешенным, если:

пользователю разрешен доступ к конкретному action (правило записано как: module/controller/action)

пользователю разрешен доступ к любым action данного контроллера (правило записано как: module/controller)

пользователю разрешен доступ к любым action данного модуля (правило записано как: module)

AdmiLTE not working

Hi, AdminLTE not working with new version, it can't load _all_skins.css file and app.js

InvalidParamException' with message 'Invalid path alias: @frontendUrl'

Fatal error: Uncaught exception 'yii\base\InvalidParamException' with message 'Invalid path alias: @frontendUrl' in C:\xampp\htdocs\informasi\vendor\yiisoft\yii2\BaseYii.php:154 Stack trace: #0 C:\xampp\htdocs\informasi\frontend\config\main.php(10): yii\BaseYii::getAlias('@frontendUrl') #1 C:\xampp\htdocs\informasi\frontend\web\index.php(22): require('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\informasi\vendor\yiisoft\yii2\BaseYii.php on line 154

AdminLTE assets issue

There's an issue with dmstr/yii2-adminlte-asset or bower-asset/admin-lte spitting out an exception:

[Composer\Repository\InvalidRepositoryException]                                                                     
  No valid bower.json was found in any branch or tag of https://github.com/DmitryBaranovskiy/eve.git, could not load   
  a package from it.

According to dmstr/yii2-adminlte-asset#133 (comment) it should be fixed by ensuring that the version of adminlte-asset is ">2".

Tried changing this line to: "bower-asset/admin-lte": ">2", but still nothing.

I also tried updating the fpx-asset-plugin to:
composer global require "fxp/composer-asset-plugin:~1.3"
Not much of a help

Any suggestions?

Column not found: 1054 Unknown column '0.slug'

Странный запрос генерится в MySQL.

exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column '0.slug' in 'where clause'' in E:\root\yiicore.dg\vendor\yiisoft\yii2\db\Command.php:915
Stack trace:
#0 E:\root\yiicore.dg\vendor\yiisoft\yii2\db\Command.php(915): PDOStatement->execute()
#1 E:\root\yiicore.dg\vendor\yiisoft\yii2\db\Command.php(388): yii\db\Command->queryInternal('queryScalar()
#3 E:\root\yiicore.dg\vendor\yiisoft\yii2\validators\UniqueValidator.php(171): yii\db\Query->exists()
#4 E:\root\yiicore.dg\vendor\yiisoft\yii2\validators\UniqueValidator.php(135): yii\validators\UniqueValidator->modelExists('validateAttribute(Object(backend\models\search\TagSearch), 'makeUnique('trigger('runWithParams('[]')
#18 E:\root\yiicore.dg\vendor\yiisoft\yii2\base\Module.php(523): yii\base\Controller->runAction('handleRequest(Object(yii\web\Request))
#21 E:\root\yiicore.dg\backend\web\index.php(32): yii\base\Application->run()
#22 {main}

Next exception 'yii\db\Exception' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column '0.slug' in 'where clause'
The SQL being executed was: SELECT EXISTS(SELECT * FROM `tag` WHERE (`0`.`slug`=''))' in E:\root\yiicore.dg\vendor\yiisoft\yii2\db\Schema.php:636
Stack trace:
#0 E:\root\yiicore.dg\vendor\yiisoft\yii2\db\Command.php(930): yii\db\Schema->convertException(Object(PDOException), 'SELECT EXISTS(S...')
#1 E:\root\yiicore.dg\vendor\yiisoft\yii2\db\Command.php(388): yii\db\Command->queryInternal('queryScalar()
#3 E:\root\yiicore.dg\vendor\yiisoft\yii2\validators\UniqueValidator.php(171): yii\db\Query->exists()
#4 E:\root\yiicore.dg\vendor\yiisoft\yii2\validators\UniqueValidator.php(135): yii\validators\UniqueValidator->modelExists('validateAttribute(Object(backend\models\search\TagSearch), 'makeUnique('trigger('runWithParams('[]')
#18 E:\root\yiicore.dg\vendor\yiisoft\yii2\base\Module.php(523): yii\base\Controller->runAction('handleRequest(Object(yii\web\Request))
#21 E:\root\yiicore.dg\backend\web\index.php(32): yii\base\Application->run()
#22 {main}
Additional Information:
Array
(
    [0] => 42S22
    [1] => 1054
    [2] => Unknown column '0.slug' in 'where clause'
)

directory is not writable by web process

The directory is not writable by the Web process: frontend/web/assets
Warning: mkdir(): Permission denied in vendor/yiisoft/yii2/helpers/BaseFileHelper.php on line 488

I already give permission to apache and even tried chmod 0777 to runtime, web/assets and frontend/assets folder

Question

How does article.created_at and article.update_at id get the current time in table ARTICLES table

Search articles

Please add feature search articles to frontentend articles index

shared hosting .. cannot load image from storage folder..but localhost work

shared hosting
my site

localhost
mylocal

this my htaccess

# Set the default charset.
AddDefaultCharset UTF-8

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Enable symlinks
Options +FollowSymlinks

# Enable mod_rewrite
RewriteEngine On

# Backend redirect
RewriteCond %{REQUEST_URI} ^/backend
RewriteRule ^backend/(.*)$ backend/web/$1 [L]

# Storage redirect
RewriteCond %{REQUEST_URI} ^/storage
RewriteRule ^storage/(.*)$ storage/$1 [L]

# Frontend redirect
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteRule ^(.*)$ frontend/web/$1

Cpanel

panel

sorry my english is bad

yii2-notification-wrapper

Делал для своего проекта вывод флеш сообщений, вида
https://github.com/Beaten-Sect0r/yii2-core/blob/master/frontend/modules/account/controllers/SignInController.php#L106

разными js библиотеками. Чтоб можно было их сменить легко на фронтенде, сделал небольшой модуль
https://github.com/loveorigami/yii2-notification-wrapper

Могу порекомендовать его использовать вместо
https://github.com/Beaten-Sect0r/yii2-core/blob/master/frontend/views/layouts/main.php#L79

SUGGESTION : please update to yii2 2.0.15 due to security issue

you can read about it in the below link, but there was sql injection possibilities that could compromise peoples sites.

one big change is findone and findall are limited to AR properties,

acording to their post, since you are using 2.0.14 it should be an easy upgrade to 2.0.15

https://www.yiiframework.com/news/168/releasing-yii-2-0-15-and-database-extensions-with-security-fixes#summary-of-affected-classes-methods-and-composer-packages

https://www.yiiframework.com/forum/index.php/topic/76661-releasing-yii-2015-and-database-extensions-with-security-fixes/

"Registration is disabled" bug

Howdy,

In the administration site/settings set Registration to disabled, then sign out.

Go to the front end and go to account/sign-in/login

The "Signup" button is still available, thus can be clicked on, the user is transferred to blank page (route) account/sign-in/signup.

Click backwards and then you get the message "Registration is disabled."

Would it not be better just to hide the "Signup" button in the first place if registration is disabled?

Matt

Strange error

I receive a 404 error after the installation
screen shot 2016-05-22 at 13 22 16
Any Ideas?

Error at Dotenv::create() from vlucas/phpdotenv

I wonder which version is compatible with Yii2 & PHP v5.6 (or v5.5)
usually I use "symfony/dotenv": "^3.4" with Yii2 it worked great, I've never tried vlucas/phpdotenv with Yii.

Fatal error: Uncaught TypeError: Argument 1 passed to Dotenv\Dotenv::create() must be an instance of Dotenv\Repository\RepositoryInterface
, string given, called in /path/to/htdocs/yii2-core/common/env.php on line 13 and defined in /path/to/htdocs/yii2-core/vendor/vlucas/phpdotenv/src/Dotenv.php:62

Question: Redactor widget vova07\imperavi

I am trying to allow photo and video only. I was able to hide formatting buttons by this
'buttonsHide'=> ['bold','formatting','italic','deleted','outdent','indent','link','alignment','horizontalrule','html','unorderedlist','orderedlist'],

but now I want to disable text input from the user. any insights?

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.