I realized recently that there is an issue with the steps I detailed under "Migrating Branding to other environments" in my previous post (PeopleTools 8.54 - Branding - Part 3).
If we migrate all Branding Objects (HTML, Javascript, Style Sheet, Image) that were created using an App Designer Project then the objects end up in the target environment but they are no longer available for update online under Main Menu > PeopleTools > Portal > Branding > Branding Objects.
While I understand that this is working as per PeopleTools design, I believe that there should be an option for branding objects that are created and/or migrated using App Designer to be made available for online updates (probably using a setting/flag in App Designer?). Otherwise, we would need to go through a lot of manual object creation/update steps via the PIA for migrating html, JS, style sheets and images just to keep them available for online updates in the target which is very important if we want to maintain them as a configuration as opposed to a managed object (that requires migration any update).
I have raised a service request with Oracle to pursue this as an enhancement. If you feel that you could also benefit from such a feature then please raise a service request with Oracle. The chances of this being accepted as an enhancement would be more if there are several organizations requesting the same!
Nevertheless, I found a way to temporarily workaround this issue using a script. So far I only have this working for HTML, Javascript and Style Sheet objects (basically inserting appropriate data into PS_PTBR_OBJECT_TBL). Here are the scripts:
Note: Please DO NOT execute these scripts directly in your production environment. As always, TEST, TEST and TEST before doing anything in production.
/* HTML Objects */
insert into PS_PTBR_OBJECT_TBL (
SELECT
'H',
CONTNAME,
VERSION,
LASTUPDDTTM,
LASTUPDOPRID,
NULL
FROM PSCONTDEFN
WHERE conttype = 4 and contname in ('<HTML_NAME>')
);
/* Javascript Objects */
insert into PS_PTBR_OBJECT_TBL (
SELECT
'J',
CONTNAME,
VERSION,
LASTUPDDTTM,
LASTUPDOPRID,
NULL
FROM PSCONTDEFN
WHERE conttype = 4 and contname in ('<JAVASCRIPT_NAME>')
);
/* Style Sheet Objects */
insert into PS_PTBR_OBJECT_TBL (
SELECT
'S',
CONTNAME,
VERSION,
LASTUPDDTTM,
LASTUPDOPRID,
NULL
FROM PSCONTDEFN
WHERE conttype = 9 and contname in ('<STYLESHEET_NAME>')
);
Scripting for images seem to be a bit complicated because PSCONTDEFN is not storing the appropriate version numbers for images and the version is always defaulted to 1. I don't see an option of trying to script the insert into PS_PTBR_IMAGE_TBL (note: this table is different compared to what we used above for HTML, Javascript and Style Sheet) without having to update PSVERSION which will get very messy.
Although, the chances of image changes in a production environment are much lesser than HTML, Javascript and Style Sheet objects so this seems to be a decent workaround for now!
If we migrate all Branding Objects (HTML, Javascript, Style Sheet, Image) that were created using an App Designer Project then the objects end up in the target environment but they are no longer available for update online under Main Menu > PeopleTools > Portal > Branding > Branding Objects.
While I understand that this is working as per PeopleTools design, I believe that there should be an option for branding objects that are created and/or migrated using App Designer to be made available for online updates (probably using a setting/flag in App Designer?). Otherwise, we would need to go through a lot of manual object creation/update steps via the PIA for migrating html, JS, style sheets and images just to keep them available for online updates in the target which is very important if we want to maintain them as a configuration as opposed to a managed object (that requires migration any update).
I have raised a service request with Oracle to pursue this as an enhancement. If you feel that you could also benefit from such a feature then please raise a service request with Oracle. The chances of this being accepted as an enhancement would be more if there are several organizations requesting the same!
Nevertheless, I found a way to temporarily workaround this issue using a script. So far I only have this working for HTML, Javascript and Style Sheet objects (basically inserting appropriate data into PS_PTBR_OBJECT_TBL). Here are the scripts:
Note: Please DO NOT execute these scripts directly in your production environment. As always, TEST, TEST and TEST before doing anything in production.
/* HTML Objects */
insert into PS_PTBR_OBJECT_TBL (
SELECT
'H',
CONTNAME,
VERSION,
LASTUPDDTTM,
LASTUPDOPRID,
NULL
FROM PSCONTDEFN
WHERE conttype = 4 and contname in ('<HTML_NAME>')
);
/* Javascript Objects */
insert into PS_PTBR_OBJECT_TBL (
SELECT
'J',
CONTNAME,
VERSION,
LASTUPDDTTM,
LASTUPDOPRID,
NULL
FROM PSCONTDEFN
WHERE conttype = 4 and contname in ('<JAVASCRIPT_NAME>')
);
/* Style Sheet Objects */
insert into PS_PTBR_OBJECT_TBL (
SELECT
'S',
CONTNAME,
VERSION,
LASTUPDDTTM,
LASTUPDOPRID,
NULL
FROM PSCONTDEFN
WHERE conttype = 9 and contname in ('<STYLESHEET_NAME>')
);
Scripting for images seem to be a bit complicated because PSCONTDEFN is not storing the appropriate version numbers for images and the version is always defaulted to 1. I don't see an option of trying to script the insert into PS_PTBR_IMAGE_TBL (note: this table is different compared to what we used above for HTML, Javascript and Style Sheet) without having to update PSVERSION which will get very messy.
Although, the chances of image changes in a production environment are much lesser than HTML, Javascript and Style Sheet objects so this seems to be a decent workaround for now!
Please refer to the following Oracle Doc ID:
ReplyDeleteE-PORTAL: Managed Branding Objects are not Accessible in the Target Environment After Migration (Doc ID 2011383.1)
I finally managed to get Oracle to log this as a bug and also provide a workaround using the SQLs I provided.
PS_PTBR_IMAGE_TBL FOR IMAGES :)
ReplyDelete@Luke - What about the version field in PS_PTBR_IMAGE_TBL? How did you update that? At that time when I saw that PSCONTDEFN was not storing the version numbers for images, i did not dig deeper as it seemed a bit messy to figure out the VERSION value.
DeleteCan you share you SQL/dms?