Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[POS2] Coremajorhave not tried2024-04-16 14:302024-04-16 14:30
ReporteralostaleView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0055211: cannot toggle dark theme with audit trail active

DescriptionIf 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 Reproduce1. 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 SolutionThe 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)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
caused by feature request 0053175 closedmeriem_azaf [React POS] Toggle between Dark and Light Theme 

-  Notes
There are no notes attached to this issue.

- 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

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker