jariolaine / apex-blog

Blog application built using Oracle Application Express (APEX)
MIT License
23 stars 8 forks source link

Application Item G_DATE_FORMAT is missing in Public App #2

Closed scl-4711 closed 2 years ago

scl-4711 commented 2 years ago

Hi Jari - first of all, great idea, a blog application with APEX !!

I updated to the newest version for 21.2.5 - the application Item G_DATE_FORMAT is missing in Public App...

G_DATE_FORMAT-Error

jariolaine commented 2 years ago

Hi, It's bug, sorry about that :( It's fixed in latest version.

You can workaround issue by running below statements


update blog_settings set attribute_name = 'G_APP_DATE_FORMAT' where attribute_name = 'G_DATE_FORMAT';

delete from blog_init_items;

insert into blog_init_items(is_active, application_id, item_name)
select 1              as is_active
  ,ai.application_id  as application_id
  ,ai.item_name       as item_name
from apex_application_items ai
join blog_settings s
  on ai.item_name = s.attribute_name
where 1 = 1
  and ai.application_id = blog_util.get_attribute_value( 'G_PUB_APP_ID' )
  union all
select 1              as is_active
  ,pi.application_id  as application_id
  ,pi.item_name       as item_namee
from apex_application_page_items pi
join blog_settings s
  on pi.item_name = s.attribute_name
where 1 = 1
  and pi.application_id = blog_util.get_attribute_value( 'G_PUB_APP_ID' )
  union all
select 1              as is_active
  ,ai.application_id  as application_id
  ,ai.item_name       as item_name
from apex_application_items ai
join blog_settings s
  on ai.item_name = s.attribute_name
where 1 = 1
  and ai.application_id = blog_util.get_attribute_value( 'G_ADMIN_APP_ID' )
  union all
select 1              as is_active
  ,pi.application_id  as application_id
  ,pi.item_name       as item_namee
from apex_application_page_items pi
join blog_settings s
  on pi.item_name = s.attribute_name
where 1 = 1
  and pi.application_id = blog_util.get_attribute_value( 'G_ADMIN_APP_ID' )
;

commit;
jariolaine commented 2 years ago

Btw, if you just installed version where is that bug, you might consider uninstall and take latest version for APEX 21.2

scl-4711 commented 2 years ago

Thx - it was the version for APEX 21.2 - but I upgraded it from the version before.

Btw - are there anywhere upgrade scripts? I did it by comparing the files and their content here @github ;-)

jariolaine commented 2 years ago

I just created upgrade scripts. You can find it from https://github.com/jariolaine/apex-blog/tree/APEX_21.2/APEX/Upgrade

First of course take backup from application parsing schema. Then run patch_21.2.20220409.sql and after that recreate all views and packages using database_objects_upgrade.sql

jariolaine commented 2 years ago

Latest release includes script to upgrade supporting objects. Upgrade scripts will be included also to future releases.