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

two buttons have same with id #7709

Closed
yxdj opened this issue Mar 13, 2015 · 5 comments
Closed

two buttons have same with id #7709

yxdj opened this issue Mar 13, 2015 · 5 comments

Comments

@yxdj
Copy link

yxdj commented Mar 13, 2015

yii\bootstrap\ButtonDropdown::renderButton()
if $this->split is true,
splitButton and button id is same

@samdark samdark added type:bug Bug status:to be verified Needs to be reproduced and validated. ext:bootstrap labels Mar 13, 2015
@samdark samdark added this to the 2.0.x milestone Mar 13, 2015
coderlight added a commit to coderlight/yii2 that referenced this issue Mar 18, 2015
coderlight added a commit to coderlight/yii2 that referenced this issue Mar 18, 2015
@lukBarros
Copy link
Contributor

I do not understand well, you can elaborate sample?

@samdark
Copy link
Member

samdark commented Apr 15, 2015

Look at HTML code generated. Check if there are same IDs used for different HTML tags. If there are, it's a bug (it's not allowed in HTML).

@klimov-paul
Copy link
Member

Issue confirmed.

@klimov-paul klimov-paul removed the status:to be verified Needs to be reproduced and validated. label May 14, 2015
@klimov-paul
Copy link
Member

There is an error in this widget.
Public field $options is declared at yii\bootstrap\Widget and its id key is filled up automatically on init() method:
https://github.com/yiisoft/yii2-bootstrap/blob/master/Widget.php#L52
That is why passing $this->options into 2 different slave widgets produces duplicating id value.

Instead of yii\bootstrap\Dropdown::containerOptions, which are already covered by yii\bootstrap\Widget::options, there should be buttonOptions field, which should be used for button widgets.

@klimov-paul
Copy link
Member

Migrated to yiisoft/yii2-bootstrap#44

@cebe cebe removed this from the 2.0.x milestone May 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants