ORA-01704: string literal too long when trying to update a mail template
Description
Environment
Activity
@Nicolas Micoud
I see two possibilities:
Change the updateTranslations method to make the UPDATE with binding variables and parameters
I mean something like:
UPDATE R_MailText_Trl SET MailText=?,IsTranslated=? WHERE R_MailText_ID=?
The second option is to change the UPDATE to work with a subselect, similar to how the insertTranslations work
something like:
UPDATE R_MailText_Trl SET MailText=(SELECT MailText FROM R_MailText WHERE R_MailText_ID=1000005), IsTranslated='Y' WHERE R_MailText_ID=1000005
The second option sounds easier, not sure if the first option will work straight with CLOBs
effectively is just oracle - again a poor design decision of oracle
the exception in log shows this:

Hi @Carlos Ruiz
Reproduced on test-oracle ; using a new tenant "client mono lingual".
Note that the insert is ok ; it takes some times, but save is done.
Is ok on PG ; same test done on test-idempiere and no error message.
BTW, I think I miss something but I would have expect to see those errors in About Window > Errors tab - but is empty.
Something has changed ?
Thanks
Nicolas
Hi @Nicolas Micoud - is this just oracle?
Can you create a failing scenario in test-oracle ?
Hi,
I'm facing an issue when a user tries to update a mail template.
Steps to reproduce :
log into a tenant which has a single language (it won't work with GardenAdmin)
create a new mail template, fill subject and mail header ; save
now, update the content of the mail text (CLOB) with a text > 4000 char and save.
The sql executed on PO at line 4134 (// auto update all translations) will fail and throws a ORA-01704: string literal too long.
I think the solution is (when the column type is CLOB) to split the content (AFAIU, same as PO_LOB) but not sure how to do it properly as the updateTranslations method is creating a “direct” sql.
Should we remove those columns from the sql and update them by code (easier to split the content)
@Carlos Ruiz : any idea?
Thanks,
Nicolas