Last modified: 2013-04-05 16:49:10 UTC
Hello, on test2.wikipedia.org sometimes I change something in a module, I save, then I reload a test page using it (via a template) and I get a 'script error' which does not make sense with my code. The exact error depends, the last I get was about passing a function rather than a string to gsub. These errors makes no sense because it was not possible in my code, which was working fine (and I changed things not related to this function). Reloading the test page does not change the error. But performing a dummy edit on the module (inserting a space in the code) and saving again corrects the error, of course without changing test page content. It happens very few times (let say 1 save over 50 or more save performed), and the first times I met the problem I made real changes in my code (such as debug code) so I did not realize sooner that it is not related to a code bug. If it can help it happens few minutes ago in Module:Taxobox-fr. I saved this change: http://test2.wikipedia.org/w/index.php?title=Module%3ATaxobox-fr&diff=44855&oldid=44853 I then reloaded this page: http://test2.wikipedia.org/wiki/Rosa_canina_%28plante%29 which works fine before and then generated a script error (the one I described at the begining). I then performed this dummy edit on the module: http://test2.wikipedia.org/w/index.php?title=Module:Taxobox-fr&diff=next&oldid=44855 and reloaded the page, and errors is gone and module works fine (as it did before, apart for the small bug I corrected). To be sure I also undo my dummy edit: http://test2.wikipedia.org/w/index.php?title=Module%3ATaxobox-fr&diff=44858&oldid=44856 and it still works fine. Don't know at all what can be the reason of this problem, and it is difficult to reproduce as it seems quite random (I made several edit+test on modules and only get the problem about 5-6 times). Regards,
> I get a 'script error' Is that the complete error message, and nothing else?
Hello, no, when I click on it I do get an error description. But this description do not correspond to a "real" error. The last I get was about passing a function to gsub rather than a string. As I said this happen in a function that works previously, which was not modified by my edit, and tested on the same unchanged article (that includes this module). The error remains even with reload / browser cache clean. And performing a dummy edit on the module solved the problem (which seems to prove that no error exists). As said I previously got the same problem (few times) but I was "confident" in the error detection so I always (until now) tried to correct my code or add debug code in order to understand what is wrong. But on these cases I finaly come back to my original code without the error raising. That's why this time I just performed a dummy edit to be sure that this bug is not related to my code. Whatever it appears very few and I don't find way to make it happen. Regards,
The error about passing a function rather than a string to gsub sounds like the problem that was fixed in Gerrit change #51331. Can you still reproduce this?
The problem is difficult to generate, and happens very few times. I will notice here if I meet again the problem. Thanks.
Well, let's assume it's fixed for now. If you can reproduce, feel free to reopen.