Page 1 of 1

Found 2 elements with non-unique id

Posted: 2019-12-31 06:11
by Leving Tinoco
Hi,

I keep finding warning on my "developer tools" from google chrome every time on my table_view.php
"Found 2 elements with non-unique id ", look like is trying to add twice the button "Add new", "Print View", "Save CSV".

Is someone else having this problem?

Appgini version 5.81

Thanks.

Re: Found 2 elements with non-unique id

Posted: 2020-01-02 01:57
by Alisson
Since 5.81, I'm also having the same exact problem on all tables, and when I'm not inside a table this error also shows:
AppGini.currentTableName: Could not retrieve table name from page URL common.js.php:1428

Re: Found 2 elements with non-unique id

Posted: 2020-01-02 04:06
by jsetzer
Re: current table error message

Yes, there is that message on certain pages and we can ignore it. That error msg does not break the execution of the rest of our code.

I got the information that this debugging information will be removed in the future or at least will not have red error formatting in console tab, as this is irritating.

Re: Found 2 elements with non-unique id

Posted: 2020-01-03 05:00
by Leving Tinoco
Well I think I found the problem, under the file datalist.php line 788
it is 4 line of code add twice the buttons line with differents class names

Code: Select all

$this->HTML .= '<div id="top_buttons" class="hidden-print">';
					/* .all_records: container for buttons that don't need a selection */
					/* .selected_records: container for buttons that need a selection */
					$this->HTML .= '<div class="btn-group btn-group-lg visible-md visible-lg all_records pull-left">' . $buttons_all . '</div>';
					$this->HTML .= '<div class="btn-group btn-group-lg visible-md visible-lg selected_records hidden pull-left hspacer-lg">' . ($actual_more_count ? $more_menu : '') . '</div>';
//					$this->HTML .= '<div class="btn-group-vertical btn-group-lg visible-xs visible-sm all_records">' . $buttons_all . '</div>';
//					$this->HTML .= '<div class="btn-group-vertical btn-group-lg visible-xs visible-sm selected_records hidden vspacer-lg">' . ($actual_more_count ? $more_menu : '') . '</div>';
					$this->HTML .= $this->tv_tools();
					$this->HTML .= '<p></p>';
				$this->HTML .= '</div>';
What I did was only is comment the last 2 lines .. class = "btn-group-vertical" and that fix my problem.