This bug is only just annoying entry in watchdog on localized sites, but still nice to have fixed.
The background to this issue is how locale module translates strings in JavaScript files: Each JavaScript file added to the page is parsed by locale module's regex (unless cached already), in order to find any Drupal.t() wrapped strings - these are then added to the server-side localization system, and localized versions as data to the JavaScript on page.
After I installed the Taxonomy wrapper, I experienced occasional error messages in the watchdog, indicating that locale module attempts and fails to open and read the file sites/all/modules/category/wrappers/taxonomy/taxonomy.js - there isn't any such file, but there IS a similar one in core Taxonomy.
I really don't know whether it was just cached somewhere, or whether some other module attempts to add the taxonomy JavaScript, but it happened after the Wrapper got installed, and it didn't want to go away (repeated on each rebuild of locale data).
Easy solution is to add a dummy taxonomy.js file - empty, just to allow locale module to properly open it and read the big NOTHING in there. While it might be debatable how much of a hack this is, and how many sites are really affected, I did this on my site for clean watchdog's sake, so attaching the patch. It only just adds the file, with a single space inside (so that diff - and potentially CVS - doesn't have trouble handling the existence of that file).
This is small and minor, but the approach really needs review.
| Comment | File | Size | Author |
|---|---|---|---|
| tax-wrapper-js.patch | 276 bytes | JirkaRybka |
Comments
Comment #1
Jaza commentedCommitted to HEAD. Thanks! See:
#158598: Category port for Drupal 6.x