Since upgrading a couple of our database application to APEX 5.0 (and then 5.0.1), we've noticed occasional problems with the custom image prefix getting reset to null.
Easy steps to reproduce:
- Log in to the Application Express development environment and run an application which has an image prefix that differs from the instance-level image prefix. E.g. instance-level image prefix is '/i/', application image prefix is '/custom/'.
- Add a new interactive report to a page, or save an existing interactive report "As Default Report Settings".
- Refresh the application page, or click on a link inside the application. The application image prefix has been reset to null (which uses the instance-level, e.g. '/i/').
We also noticed this behavior in a small Page Locks application we use that writes to the WWV_FLOW_LOCK_PAGE table.
I tracked this down to line 24 in trigger APEX_050000.WWV_FLOWS_T1, which is supposed to "Cleanup the application image prefix if it's equal to the instance image prefix or the /i/ default" (bug )
if :new.flow_image_prefix in ( '/i/', wwv_flow.g_image_prefix ) then
:new.flow_image_prefix := null;
end if;
Unfortunately wwv_flow.g_image_prefix is not always the instance image prefix - it's the current application's image prefix. If the current application isn't the development environment (as when saving interactive reports, or using the Theme Roller), and it has the same image prefix as the target application being changed, any inserts/updates to the WWV_FLOWS tables end up resetting the target application's image prefix to null (since :new.flow_image_prefix will equal wwv_flow.g_image_prefix). I doubt this was the intended behavior.
For now, we've just commented out those lines of WWV_FLOWS_T1 as a workaround.
My question is whether this is a known issue, and if not, how should I report it as a bug?