Posted by hass on November 4, 2008 at 10:18am
| Project: | Localization client |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Every time I try to translate a string I get a HTTP status 0 error and I've also found the following in my Firefox logs.
Error: $("#formToL10nServer").attr("action", Drupal.settings.l10n_client_server).attr is not a function
Sourcefile: http://localhost/drupal6/sites/all/modules/l10n_client/l10n_client.js?e
... 176
Comments
#1
Looks like user error. You've upgraded the module but did not run update.php so your JavaScript cache was not emptied for regeneration. You site caches an outdated version of the JS of this module.
#2
Just a second... if the module does not provide a new update hook I don't need to refresh anything. My status page does not tell me anything I need to regenerate. Only for a test I cleared all my caches now and the problem is gone.
As l10n_client don't have a .install file I expect there is no upgrade path yet. Additonal there is no uninstall code, but variables like "l10n_client_use_server".
#3
Don't blame this module if you don't read the docs. Even Drupal core release notes includes to run update.php even when there are no update functions to run at all to clear caches, so all new changes take effect. update.php does that when you run it, you just need to follow the docs. There is nothing we should do about that here. No module is adding empty update functions just to trick you into running update.php. You should run it when you update any of your modules.
As for the uninstall code, looking forward to a patch.
#4
Ups... never done this within the last years... good to know, but not very user friendly.
#5
It is quite user friendly: always run update.php. It is much less user friendly if you need to look into the .install file code to identify whether there was an update function or not, or even worse, if Drupal needs to inform you after the fact that you missed running update.php.
#6
I remember that I've read it that I should run update.php very very long time ago, but never seen any difference until today...
However this is OT here - if Drupal knows that there is a newer version installed - it could simply themself clear the caches automatically on the next page request... this would be user friendly solution.
#7
Aside some people added menu_rebuild() functions in .install files. This seems also be executed by update.php. I could simply remove googleanalytics_update_6003() and ignore all complains in #262468: Can't configure GA without running update.php... I've stolen this in past from dww's update_status.install
#8
#345918: how do you uninstall Localization client? is now marked as duplicate of this issue.
#9
The the moment, the following two settings are available:
- l10n_client_server
- l10n_client_use_server
These two would need to be removed on uninstall. Anybody interested in doing a quick .install file with code to remove these on uninstall? :)
#10
here is one.
#11
rerole. Forgot something in the file.
#12
Added a little whitespace (two spaces on the comment line in @file) and committed as-is. To be ported to D7.
#13
Committed as http://drupalcode.org/viewvc/drupal/contributions/modules/l10n_client/l1...
#14
I'm confused, i used this syntax for a while, but then people said, its wrong, here is recent example which might be right ;)
http://drupalcode.org/viewvc/drupal/drupal/index.php?revision=1.98&view=...
The patch uses my old code style.
#15
@dereine: your patch seems to apply to the D6 version and changes how it works?!
#16
Suppose you need
<?phpcache_clear_all('variables', 'cache');
?>
#17
@dereine?