Closed n7k1 closed 10 years ago
It looks like $wid = 'id_'.uniqid();
isn't producing a unique identifier on my system. I'll play with it a little.
Weird. Maybe you can use microtime or nanotime or a hash of the widget contentns. Please let us know if you find a solution, and why uniqid() is not unique. And extra points for a pull request! :)
As dumb as this solution may be, it seems to work. SRAND or MT_STAND doesn't work. Apparently, it's a Windows thing.
Edited: \metricserver\c$\BitNami\wampstack-5.4.24-0\apache2\htdocs\measure\app\View\Dbviews\add.ctp
$code = strreplace('${wid}', "id".mt_rand(), $code);
Edited: \metricserver\c$\BitNami\wampstack-5.4.24.0\apache2\htdocs\measure\app\View\Dashboards\view.ctp
$wid = 'id_'.mt_rand();
I'm having a problem where the DIV IDs ($wid) are not unique in the dashboard. It's causing the widgets to display in the wrong box. I can workaround the problem by hardcoding a div id and not using $wid. Any ideas what I've done wrong in the installation? I'm running it in a WAMP stack.
Thanks.