Giter Club home page Giter Club logo

yii2-qa's People

Contributors

graid2030 avatar jilizart avatar robregonm 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

yii2-qa's Issues

Call to undefined method app\models\User::find()

Thank you for writing this module. It gives me a great example for my own project. I am learning a lot of it.

However, I do have problem.
If I lookup an answer I get the error:
Call to undefined method app\models\User::find()

Everything else is working fine.

On http://www.yiiframework.com/forum/index.php/topic/58356-call-to-undefined-method-appmodelsuserfind/
the answer is to: Try extending from yii\db\ActiveRecord instead.

That do I have to change in the code to solve this problem?

My config is:

    'qa' => 'artkost\qa\Module',
    'userClass' => 'dektrium\user\Module', 
    'userNameFormatter' => 'getUserName'

That is I am using the dektrium user class.

Top Questions page

Provide top question page with tabs

  • Interesting
  • Featured
  • Hot
  • Week
  • Month

Change delete

Maybe change in

 actionDelete($id)
    { $model = $this->findQuestionModel($id); 
 $model = $this->findModel($id);

Can you add email supporting?

Может добавить возможность отправку email, если произошел ответ на вопрос из "My" и "Favourites"? Какой-нибудь aftersave с поиском в my и/или в favourites

error migrate in postgresql

I'm working with postgres database and when I try to migrate to any of the following lines :

php yii migrate/up --migrationPath=@vendor/artkost/yii2-qa/migrations

yii migrate/up --migrationPath=@vendor/artkost/yii2-qa/migrations

./yii migrate/up --migrationPath=@vendor/artkost/yii2-qa/migrations

I get the following error:
Exception 'yii\base\UnknownPropertyException' with message 'Getting unknown property: yii\console\ErrorHandler::errorAction'

problem with vote

When i push on vote arrow is nothing happens.
In chrome console - Failed to load resource: the server responded with a status of 500 (Internal Server Error). Where can i find a error?

XSS

Сейчас заметил что в теги проходят XSS, может еще где, не смотрел.

DI container error

I haven't upgraded your extenstion for a long time. After upgrading I'm getting an error in backend application, but there is no app configured in it:

Missing required parameter "id" when instantiating "artkost\qa\Module".

In frontend's config I've got:

    'modules' => [
        'qa' => [
            'class' => 'artkost\qa\Module',
            'userClass' => 'common\models\User',
            'userNameFormatter' => 'getUsername'
        ],
    ],

error occurs when i install this extension

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

Code to interface, not to implementation

Currently it's not really possible to provide your own models to store questions, answers or tags. It could be useful, for example, to be able to use markdown or bbcode for writing text there or for deeper integration with the application.

I'd suggest coding to interface i.e.

  1. Introduce a number of interfaces describing module's interaction with models.
  2. Make default set of models implement these interfaces.
  3. Make all other code use these interfaces and not use models directly.
  4. Make it possible to provide your own models implementing interfaces instead of default ones.

See https://github.com/samdark/Yeeki/tree/master/app/modules/wiki/components/auth

Typo in form-question.php

if you compare form-answer and form-question, you will see the reason why the client side validation doesn't work in form-question.php on the last line.
to fix it change to

User Favorites

  • Add ability to add questions to favorite.
  • Provide page to display favorites

Поддержка PostgreSQL

Просьба добавить поддержку PostgreSQL. В pg отсутствуют типы enum и tinyint, а также атрибут UNSIGNED.

Error Migrating

Got the following error when applying migration.

Apply the above migrations? (yes|no) [no]:yes
*** applying m140314_120159_create_qa_question_table
PHP Strict Warning 'yii\base\ErrorException' with message 'Declaration of artkost\qa\models\Question::afterSave() should be compatible with yii\db\BaseActiveRecord::afterSave($insert, $changedAttributes)'

Simply adding '$changedAttributes' to the afterSave function in both Question and Answer Models, allowed the migration to succeed.

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.