You are not logged in.
Every time I open a module item for editing on local server (Windows 7), TinyMCE applies randomly to various fields. Here are some screenshots of what I see if I open the editing form and hit F5. With enough luck you may even see TinyMCE applied to Date field:
http://i59.tinypic.com/v4w8ao.jpg
http://i58.tinypic.com/8ycpyr.jpg
http://i61.tinypic.com/2s63rpf.jpg
The bug is browser-independent - chrome, ff, ie, even old opera 12. Everything is fine on a shared hosting, though, so it's not much of a problem, but still a bit inconvenient... Any ideas?
Offline
Can you view source and email me the code for a few different instances? What server setup are you using?
Thanks,
Tim
Offline
I actually found a bug which is causing this to occur. Each field is given a unique id via the uniqid() php function. Sometimes the field creation process happens so fast that uniqid() does not actually create something unique. Therefore, two or more fields receive the same id which messes up the javascript.
The statement in question is in two places:
Line 61 of core/admin/auto-modules/forms/_form.php
Line 52 of core/admin/ajax/pages/get-template-form.php
It looks like this:
$field["id"] = uniqid("field_");
To fix the problem, I initiated a counter called $fCounter before the foreach loop that this statement is in, then modified the statement to the following:
$field["id"] = uniqid("field_") . $fCounter++;
So simply appending a new number to each field's id took care of the problem.
Offline
Thanks for tracking down that bug, Randy! Are you running into this on a Windows environment or in a *NIX environment as well?
Reading into the uniqid docs on php.net it looks like Cygwin implementations of PHP are going to have the current BigTree uniqid implementation fail since we're not requesting additional entropy.
It probably makes sense to generate a random namespace once before we start drawing a form and then use your field counter method, that way we don't have to call uniqid but have a pretty good chance of not having an ID collision with anything else on the page due to the random character nature of uniqid.
Offline