Openbravo Issue Tracking System - POS2 | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0055211 | POS2 | Core | public | 2024-04-16 14:30 | 2024-04-16 14:30 | |||||||
Reporter | alostale | |||||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Severity | major | Reproducibility | have not tried | |||||||
Status | new | Resolution | open | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0055211: cannot toggle dark theme with audit trail active | |||||||||||
Description | If audit trail is enabled for at least one table. Trying to toggle pos theme from dark to light or in the other way around fails and an import entry is kept in Initial status forever. | |||||||||||
Steps To Reproduce | 1. Log in BO as System Admin 2. In Tables and Columns, select any table and set it as fully audited 3. Compile and restart Tomcat 4. Log in POS2 5. Toggle Theme Mode 6. Log out and log in again with the same user as in step 4 -> ERROR: the theme mode is the same as before step 5, it should remain as it was set in step 5 In openbravo.log you can see: 2024-04-16 14:01:45,562 [Import Entry - 1] ERROR org.openbravo.database.SessionInfo - Error setting audit info org.postgresql.util.PSQLException: ERROR: value too long for type character varying(32) | |||||||||||
Proposed Solution | The problem comes from AD_CONTEXT_INFO.PROCESSID column with a length of 32 characters, in this case OBPOS2_UpdateTerminalTypeUserConfiguration is tried to be inserted. Possible solutions: 1. Change the value returned by TerminalTypeUserConfigurationLoaderProcessor.getProcessIdForAudit to something with a proper size. To be consistent IE type should be renamed accordingly. This might have a theoretical impact in not being able to process this type of entries that weren't processed before the update (small risk) 2. Increase AD_CONTEXT_INFO.PROCESSID size up to 60 which is the size of ad_ref_list_value.value column where IE types are stored. We might need to look for potentially impacted areas. If solution 1 is done, it might be convenient to add some validation/test to ensure there is no new IE types bigger than 32 chars. Which currently is not the case, at least in the base retail modules: ret=> select value, length(value) from ad_ref_list where ad_reference_id = '11F86B630ECB4A57B28927193F8AB99D' and length(value)>32 order by 2 desc; value | length --------------------------------------------+-------- OBPOS2_UpdateTerminalTypeUserConfiguration | 42 (1 row) | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2024-04-16 14:30 | alostale | New Issue | ||||||||||
2024-04-16 14:30 | alostale | Assigned To | => Triage Platform Base | |||||||||
2024-04-16 14:30 | alostale | Triggers an Emergency Pack | => No | |||||||||
2024-04-16 14:30 | alostale | Relationship added | caused by 0053175 |
There are no notes attached to this issue. |