getting Session state protection violation error for a hidden item that is being set with computation before header - Oracle APEX
Asked Answered
K

2

9

I am trying to set the label of an item dynamically using the value of an other hidden item in the same page.

I created a computation for the hidden item in the page and set the value of the item as the dynamic label - &P613_EMPLOYEE_TYPE_LABEL.

But I am getting this error

Session state protection violation: This may be caused by manual alteration of protected page item P613_EMPLOYEE_TYPE_LABEL.   

Technical Info (only visible for developers)

is_internal_error: true
apex_error_code: APEX.SESSION_STATE.ITEM_VALUE_PROTECTION
component.type: APEX_APPLICATION_PAGES
component.id: 149000000613
component.name: DETAILS OF EMPLOYEE
error_backtrace:
----- PL/SQL Call Stack -----
object      line  object
handle    number  name
0x263d96750       935  package body APEX_050100.WWV_FLOW_ERROR
0x263d96750      1003  package body APEX_050100.WWV_FLOW_ERROR
0x263d96750      1395  package body APEX_050100.WWV_FLOW_ERROR
0x26ac006a8      3116  package body APEX_050100.WWV_FLOW
0x26ac006a8      5533  package body APEX_050100.WWV_FLOW
0x265a48af8         2  anonymous block

But I have set the session state protection fo the item to 'unrestricted'

page settings page settings

computation
computation

component settings
component settings

Kohinoor answered 25/1, 2017 at 7:37 Comment(0)
S
17

For your hidden item P613_EMPLOYEE_TYPE_LABEL set the Value Protected attribute to NO.enter image description here

When Value Protected of an hidden item is set to YES a checksum is generated when your page is loaded. When you submit the page with a different value the checksum is not valid anymore and you get the error.

Sunbeam answered 25/1, 2017 at 22:29 Comment(3)
It's funny that this happens even though the 'Security -> Session State Protection' is set to unrestricted. Are there two settings for the same feature?Gar
There is not showing "Value protected".Where its available?Tuddor
@kamranijaz Available is when Type field is Hidden!Ragged
D
6

"Value protected" only shows for hidden items. This error shows also when you update a visible item that is read only. At least in rel 19.2. See this question also: Can't disable session state protection on Oracle APEX 18.1.0.00.45 for Dynamic Actions updating Page Items

Dactylic answered 13/2, 2020 at 16:1 Comment(1)
+ when you try to pass, for instance a text with white spaces. I'm guessing it's because they are getting converted to %s and it's blacklisted. .. p_items => 'P600_PAGE_TITLE', p_values => 'a b c d' .. won't work whereas p_items => 'P600_PAGE_TITLE', p_values => replace('a b c d', ' ', '') working just fineIrrupt

© 2022 - 2024 — McMap. All rights reserved.