Highlighted
Super Contributor.
Super Contributor.
489 views

Problem with script libraries merging

Jump to solution

Hello!

 

I use SM  9.34

 

I decided to implement PDCP4 for my system. For that I use 'Applications_Patch_Manager_Guide__for_Content_Packs' document.
Using instruction I applyed PDCP4 a then started merging result.

There is a huge list with 'renamed' results.
I have started merging ScripLibrarys.
So at first I noticed that throug merging wizard some javascripts look strange.

 

Unfortunately I merged whole tableAccess script library by one click.
Now I get an error after log in system:

Панель обработки set.auth в RAD secRoleBasedAccess встретила ошибку в строке 1. (secRoleBasedAccess,set.auth)
Не удалось оценить выражение. (secRoleBasedAccess,set.auth)
Неверный аргумент(2) оператора =. (secRoleBasedAccess,set.auth)
Не удалось оценить выражение. (secRoleBasedAccess,set.auth)
Функции библиотеки JS(tableAccess.hasViewAccess) не существуют. (secRoleBasedAccess,set.auth)
Скрипт <unknown script>, строка 0: ERROR Ошибка при инициализации пакета "tableAccess". на символе 1.
Ошибка при компиляции функции или выражения JavaScript.
                                                        ^
  for (var i=0, ilng=allRights.areas.length(); i& lt;ilng; i++)
Скрипт 'tableAccess', строка 19: ERROR SyntaxError: missing ) after for-loop control на символе 57.
Unrecoverable error in application:  apm.setup.globals on panel setup.cm3.env
Unrecoverable error in application:  cm3.setup.environment on panel call.setup.object
Unrecoverable error in application:  se.get.object on panel get.env
Unrecoverable error in application:  secRoleBasedAccess on panel set.auth


As you can see system doesn't like 'for (var i=0, ilng=allRights.areas.length(); i& lt;ilng; i++)' string in tableAccess library.
I compared two libraries:
tableAccess (version after merging)
NEWCPtableAccess (version which came with PDCP4 and which was a model to merge)

tableAccess  contents :                 for (var i=0, ilng=allRights.areas.length(); i& lt;ilng; i++)
NEWCPtableAccess contents :   for (var i=0, ilng=allRights.areas.length(); i<ilng; i++)

As you can see after merging '<' sign became '& lt;' symbols. This thing causes an error.

 

Have you ever faced with such problem?
how should I merge Scriptlibrary?
how to solve such problems as unrecognizable symbols in Scriptlibraries after merging?

 

Thank you for any reply.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.
Sorry but do not know much about PD and also error message language posted above.
But seems issue is becuase you merged the JS. While merging it takes the native code not the actual characters.

Here as you can see characters " & lt: " in line,
for (var i=0, ilng=allRights.areas.length(); i& lt;ilng; i++)

which should be actually "<"

Hence you should not merge by just utility rather use copy paste in actual ScriptLibarary records or try using ‘find and replace’. This will be overhead but as far as I know this is only way to merge JS.

In my knowledge, reason of this wrong display could be since this comparison utility (merge utility) is coded in XML/HTML, so it is not able to parse all characters.

Regards,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.

View solution in original post

2 Replies
Highlighted
Absent Member.
Absent Member.
Sorry but do not know much about PD and also error message language posted above.
But seems issue is becuase you merged the JS. While merging it takes the native code not the actual characters.

Here as you can see characters " & lt: " in line,
for (var i=0, ilng=allRights.areas.length(); i& lt;ilng; i++)

which should be actually "<"

Hence you should not merge by just utility rather use copy paste in actual ScriptLibarary records or try using ‘find and replace’. This will be overhead but as far as I know this is only way to merge JS.

In my knowledge, reason of this wrong display could be since this comparison utility (merge utility) is coded in XML/HTML, so it is not able to parse all characters.

Regards,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.

View solution in original post

Highlighted
Super Contributor.
Super Contributor.

Hello Piku!

 

Thank you for answer. I think it's the most reasonably anwes I've ever got!

My heart feels something like that 🙂

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.