apex-visualizer icon indicating copy to clipboard operation
apex-visualizer copied to clipboard

Region Image and Image Tag Attributes - reference incorrect columns?

Open dougbot01 opened this issue 1 year ago • 1 comments

Hi,

First off, thank you for this very helpful and wonderful app! We had spent hours combing through release notes and scouring through application code for the upgrade from 18.2 to 22.2.

I recently discovered your app, and found what I THINK is an issue. When checking menu "Migration > APEX 22.2", the section on "8.1.2, Desupported Properties" appears to reference the wrong columns.

The section says "The properties Region Image and Image Tag Attributes are desupported." That is what the release notes say. However, if I set these properties in our old system, which is still on 18.2, these do not appear in the view apex_application_page_regions at all.

I gave myself permission to schema APEX_180200, and found the correct data are in table wwv_flow_page_plugs, columns region_image and region_image_attr.

By inspecting the views, I was able to find view WWV_FLOW_PAGE_PLUGS_DEV that contains those columns, but when I query it I cannot receive any data. Also, this view is not listed in the apex application views, so I am not sure that there is any "reasonable" way to get at this information within an APEX app.

If run from the APEX_180200 or APEX_220200 schema, this query will give the correct information:

select 
    p.id                                 page_id,
    p.name                               page_name,
    r.plug_name                          region_name,
    r.region_image,
    r.region_image_attr
from wwv_flow_page_plugs r,
     wwv_flow_steps      p,
     wwv_flow_authorized f
where f.workspace_id      = p.security_group_id
  and f.application_id    = p.flow_id
  and f.workspace_id      = r.security_group_id
  and f.application_id    = r.flow_id
  and p.security_group_id = r.security_group_id
  and p.flow_id           = r.flow_id
  and p.id                = r.page_id
  and (r.region_image is not null or r.region_image_attr is not null)
  and f.application_id = :P0_APP_ID
;

What I ended up doing is creating a new view in the APEX schema, granting public to read it, and making a public synonym for it:

  CREATE OR REPLACE FORCE NONEDITIONABLE VIEW "APEX_220200"."DEPRECATED_REGION_IMAGE_SETTINGS" ("APPLICATION_ID", "PAGE_ID", "PAGE_NAME", "REGION_NAME", "REGION_IMAGE", "REGION_IMAGE_ATTR") AS 
  select 
    f.application_id,
    p.id                                 page_id,
    p.name                               page_name,
    r.plug_name                          region_name,
    r.region_image,
    r.region_image_attr
from wwv_flow_page_plugs r,
     wwv_flow_steps      p,
     wwv_flow_authorized f
where f.workspace_id      = p.security_group_id
  and f.application_id    = p.flow_id
  and f.workspace_id      = r.security_group_id
  and f.application_id    = r.flow_id
  and p.security_group_id = r.security_group_id
  and p.flow_id           = r.flow_id
  and p.id                = r.page_id;

  GRANT READ ON "APEX_220200"."DEPRECATED_REGION_IMAGE_SETTINGS" TO PUBLIC;
  
  create public synonym DEPRECATED_REGION_IMAGE_SETTINGS for "APEX_220200"."DEPRECATED_REGION_IMAGE_SETTINGS";

Then I updated the query in the 8.1.2 region:

select r.page_id,
r.page_name,
r.region_name,
r.region_image,
r.region_image_attr
from DEPRECATED_REGION_IMAGE_SETTINGS r
where (r.region_image is not null or r.region_image_attr is not null)
  and r.application_id = :P0_APP_ID

I'm not sure if there is a great way to update your application, or perhaps just give some other instructions to users?

Regards, Doug

dougbot01 avatar Oct 31 '24 23:10 dougbot01

As a follow up - on APEX 22.2, I did find one region with an image. However, now that same column is used under the "Image" section of a region. Because of that, it is really unclear to me what the Oracle APEX team is actually deprecating. Perhaps I will try to clarify on the apex slack.

dougbot01 avatar Nov 01 '24 17:11 dougbot01

i will take a look in december into this issue

OliverLemm avatar Nov 15 '24 18:11 OliverLemm