Comments (11)
Опишите пожалуйста шаги для воспроизведения ошибки
from yii2-comments.
- скачян через компосер,
- прописан в компонентах с переподключением контроллера в common/config/main:
'comment' => [ 'class' => 'yii2mod\comments\Module', 'controllerMap'=>[ 'default'=>[ 'class'=>'frontend\modules\comments\controllers\DefaultController', ], ], ],
инициирован во вюхе самописного модуля новостей вот его инит в common/config/main :
'news'=>[ 'class'=>'common\modules\news\Module', 'tableName'=>'news', 'controllerMap'=>[ 'manager'=>[ 'class'=>'backend\modules\news\controllers\PagemanagerController', 'as access' => [ 'class' => yii\filters\AccessControl::className(), 'rules' => [ [ 'allow' => false, 'roles' => ['*'], ], ], ], ], ], ],
инициировал следующим кодом:
<?= \yii2mod\comments\widgets\Comment::widget([ 'model' => $news, 'relatedTo' => 'User ' .$username . ' commented on the page ' . \yii\helpers\Url::current(), // for example 'commentView' => '@frontend/modules/comments/views/index' ]) ?>
в собственной вюхе добавил внутреннею проверку что бы не выводить удаленные коментарии
настройки Pjax не менял
from yii2-comments.
окей, спасибо. Сегодня вечером постараюсь проверить
from yii2-comments.
вам спасибо, за быстрый ответ
from yii2-comments.
забыл спросить, пару вопросов:
- Версия Yii
- Напишите сюда пожалуйста код вашей собственной вюхе для комментов.
from yii2-comments.
Yii 2.0.9
index.php
http://pastebin.com/9XqZKW2h
_form.php
_list.php
from yii2-comments.
Так, только что попробовал на чистом шаблоне воспроизвести, не получилось.
Использовал Yii 2.0.9, и создал новый модуль news(в нем рендерил комментарии).
Если можете, попробуйте протестировать виджет без вашей вьюхе. Проверьте пожалуйста, работает ли он со своей дефолтной вьюхой корректно.
from yii2-comments.
При использовании дефолтной вюхи и дефолтного жс ругался на функцию $.pjax
from yii2-comments.
окей, честно говоря пока трудно сказать в чем проблема, так как с таким еще не сталкивался. Думаю что то с ассетами, похоже на то что PjaxAsset не корректно отработал.
Вечером еще раз гляну.
from yii2-comments.
поставил на чистый yii2/advanced не смог воспроизвести ошибку
from yii2-comments.
Посмотрите на странице подгружен ли jquery.pjax.js, если он есть то ошибок с функцией $.pjax не должно быть.
from yii2-comments.
Related Issues (20)
- При переопределении имени таблицы в своей модели не работает менеджмент
- Не работает с включенным чпу HOT 1
- Default comment status
- Initialization problem: No new migrations found. Your system is up-to-date. HOT 1
- Problem with the encoding of the createComment using CommentWidget
- Are you accepting PRs at the moment? HOT 1
- Fail migrate m161114_094902_add_url_column_to_comment_table
- 404 - Create Comment Not Found HOT 1
- How to know count of comments from relatedTo ?
- Collaboration with https://docs.infiniteajaxscroll.com/
- No Reason Phrase HOT 7
- How to update entity model using event afterCreate? HOT 1
- API availability.
- "Carbon 1 is deprecated" warning HOT 3
- When is the next release planned? HOT 3
- Do you take donate? HOT 2
- Add attachments and editor
- Readonly Comments Feature
- Reinitialize the javascript methods HOT 2
- Не накатываются миграции HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-comments.