Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Проблема с CheckboxWidget #41

Closed
egorzot opened this issue Oct 19, 2016 · 2 comments · Fixed by #42
Closed

Проблема с CheckboxWidget #41

egorzot opened this issue Oct 19, 2016 · 2 comments · Fixed by #42

Comments

@egorzot
Copy link
Contributor

egorzot commented Oct 19, 2016

Если в сущности присутствует ReferenceField, то происходит ошибка в виджете CheckboxWidget.
В методе getCheckboxType виджета CheckboxWidget в цикле foreach для $field вызывается метод getColumnName(), который отсутствует у ReferenceField и у его родителя Field.
Call to undefined method Bitrix\Main\Entity\ReferenceField::getColumnName() in /home/bitrix/www/bitrix/modules/digitalwand.admin_helper/lib/widget/CheckboxWidget.php on line 209
модуль main 16.5.7
digitalwand.admin_helper 2.0.0

Временное решение проблемы - перемещение описания поля reference на последнее по порядку место в методе getMap сущности. Тогда цикл просто до него не добирается (при условии что искомое поле будет найдено раньше). Ну а по хорошему надо перед вызовом getColumnName сделать проверку $field на тип и если это ReferenceField - пропускать его.

@ASGAlex
Copy link
Member

ASGAlex commented Oct 19, 2016

Можно пуллреквест? Я зааппрувлю.

@egorzot
Copy link
Contributor Author

egorzot commented Oct 19, 2016

ок, сделаю.

On Oct 20, 2016 00:55, "Alexey Volkov" notifications@github.com wrote:

Можно пуллреквест? Я зааппрувлю.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#41 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACIKGwfbOFpMqkxmh9qN-6nnDTEZB5mtks5q1i9MgaJpZM4KbElG
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants