Needs work
Project:
Drupal core
Version:
main
Component:
locale.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 Aug 2012 at 15:53 UTC
Updated:
5 Dec 2024 at 00:07 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
MantasK commentedThat error
'drupaltestbotmysql.simpletest97109blocked_ips' doesn't exist: SELECT 1 FROM {blocked_ips} WHERE ip = :ip; Array ( [:ip] => 10.20.0.178 )
Doesn't make sense for my patch
Comment #15
smustgrave commentedHave not seen any errors during import of translations? Wonder if this is still an issue in D10?
Comment #17
calebtr commentedI ran into this on a Drupal 10.3 site. From what I see in the 11.x code, it is still an issue.
For me, the specific issue is that in
locale.bulk.inc, exceptions caught inlocale_translate_batch_import()log only generic messages.To replicate:
1. Create a .po file with an error it. I have attached an example.
2. Create a site with the language for the .po file enabled.
3. Attempt to import the .po file at /admin/config/regional/translate/import.
4. See the error, "One translation file could not be imported. See the log for details."
5. See log, no details are included.
What I expect to happen:
Specific error messages are logged. In this case, "The plural formula could not be parsed."
Next steps
The patch in this issue wouldn't apply; it calls watchdog() instead of \Drupal::logger().
I don't see any other places in locale.bulk.inc where a specific error message isn't logged, but I may have missed something and there may be other places in the module.
A simple way to address this is to assign the Exception to a variable and include
$e->getMessage()in the log.Comment #18
calebtr commentedComment #20
calebtr commentedI'm happy to do more work on this at the maintainers' direction.
Comment #21
smustgrave commentedHave not reviewed yet but issue summary appears to be incomplete, recommend using standard template for that. May need test coverage as well.
Comment #22
calebtr commentedI erred on the side of contributing to an existing issue. Would you rather I open a new one?