'Oracle APEX: Session state protection violation error on Display Only page item

I'm trying to update Display Only page item with a dynamic action on one select lists and want to display the value in that display only item.

My code works and page item gets set but once I try to submit the page I get an error: Session state protection violation: This may be caused by manual alteration of protected page item P1_TEST_ITEM. If you are unsure what caused this error, please contact the application administrator for assistance.

I know for hidden items I can just turn off the Value Protected but that is different for Display Only page items as there is no option to turn off value protected. How can I fix the issue?



Solution 1:[1]

There is a doc on MOS (1461271.1) explaining this is expected behavior since apex 4.1.1 Here are some workarounds

  • Define item as text
  • Set Advanced > Custom Attributes to readonly OR Advanced > CSS Classes to apex_disabled

Alternatively, if you want to use Read Only, then you could use a computation on page submit instead of a dynamic action.

Solution 2:[2]

Simply turn off "Send On Page Submit" under settings of that item and it should work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Koen Lostrie
Solution 2 Nithin Nair