I am the author of uc_addresses and recently received this bug: #367811: Error message: failed to open stream: No such file.
After researching this, I found #298331: JS error when locale module is enabled. The bug was in uc_add_js() and the fix was to replace all uc_add_js() calls with drupal_add_js().
That's great, but uc_add_js() is still sitting there in uc_store.module ready to trip up any UC module writers who didn't get the memo. The code in uc_add_js() is not exactly like the code reported in bug 298331, but a grep through the UC code shows that there are no calls to uc_add_js(). This implies that uc_add_js() shouldn't be used.
Please consider taking one of these three actions:
- Remove uc_add_js() from the uc_store module.
- Leave uc_add_js() but make it a synonym for drupal_add_js().
- Leave uc_add_js(), make it a synonym for drupal_add_js(), but display a warning or write a warning to the watchdog telling people that uc_add_js() should be replaced with drupal_add_js().
The first two options are quick and easy. The last option seems the safest.
Comment | File | Size | Author |
---|---|---|---|
#1 | uc_store.uc_add_js.patch | 1.27 KB | cha0s |
Comments
Comment #1
cha0s CreditAttribution: cha0s commentedI agree that the last option is the safest bet to keep existing code working, and I have added a watchdog entry as you suggested. =)
Comment #2
cha0s CreditAttribution: cha0s commented*bump*
Comment #3
freixas CreditAttribution: freixas commentedApologies for the delay.
The patch looks great. I can do some limited testing this weekend. Even when I was calling uc_add_js(), I wasn't getting the error message "failed to open stream". But at least I can change my drupal_add_js() calls back to uc_add_js() and see if the watchdog warnings show up properly,
Comment #4
Island Usurper CreditAttribution: Island Usurper commentedMakes sense to me. Committed.