cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Website Generation Error (Migrating Mega2009 to Hopex)

ngurjar
Retired

Hello Community,

We are migrating a customer from Mega 2009 to HopexV1R3CP9.0. The customer has a customized template from Mega2009. I am trying to generate a website on this particular template in Hopex. I know that only Enterprise Portal Standard Template is supported by Mega and the older templates have been abandoned http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqrYAAQ

I still have to try and get the old template up and running for the customer. When I am generating the website i am receiving following error (See screenshot)

As i understand the issue I face in the Macro is marked in red text below

Option Explicit

Dim goMegaRoot

' -------------------------------------------------------------------------
Function GifPicture (oMetaClass)
               Dim bGifFound, strGif, oMacroGifPictureGet
               Set oMacroGifPictureGet = goMegaRoot.CurrentEnvironment.GetMacro("GifPictureGet")
               oMacroGifPictureGet.strGifFromMetaClassGet oMetaClass, Nothing, strGif, bGifFound
               GifPicture = LCase(strGif)
End Function

' -------------------------------------------------------------------------
Public Sub IMegaGenerationTagSolver_TagWrite(strStringIn, oObjTarget, oGenerationContext, strStringOut)
               Dim oCommentGet, OnameGet, sMaeValue, sMaeName, sMaeComment, oMae
               Set goMegaRoot = oObjTarget.GetRoot

               Set oMae = goMegaRoot.GetObjectFromId (strStringIn)
               Set oCommentGet = goMegaRoot.CurrentEnvironment.GetMacro (goMegaRoot.GetObjectFromId("D2BD145E3E943541").Name) ' macro WS_CommentGet
               Set oNameGet = goMegaRoot.CurrentEnvironment.GetMacro (goMegaRoot.GetObjectFromId("59D98D183E9A16AE").Name) ' macro WS_NameGet

               ' retrieves the string in the WS MetaAssociationEnd Title template.
               oCommentGet.IMegaGenerationTagSolver_TagWrite "4618464A3F780003", oObjTarget, oGenerationContext, sMaeValue

               oCommentGet.IMegaGenerationTagSolver_TagWrite strStringIn, oObjTarget, oGenerationContext, sMaeComment
               oNameGet.IMegaGenerationTagSolver_TagWrite strStringIn, oObjTarget, oGenerationContext, sMaeName

               sMaeValue = Replace (sMaeValue, "%MaeName%", sMaeName)
               sMaeValue = Replace (sMaeValue, "%MaeComment%", sMaeComment)
               sMaeValue = Replace (sMaeValue, "%MaeImage%", GifPicture (oMae.MetaClass.item(1)))
               Randomize
               sMaeValue = Replace (sMaeValue, "%HelpId%", strStringIn & "_" & Int(10000*Rnd))

               If sMaeComment = "" Then
                              sMaeValue = Replace (sMaeValue, "%CommentToDisplay%", "none")
               Else
                              sMaeValue = Replace (sMaeValue, "%CommentToDisplay%", "inline")
               End If

               strStringOut = sMaeValue

               ' ---------------------------------
               Set oMae = Nothing
               Set oCommentGet = Nothing
               Set OnameGet = Nothing
               Set goMegaRoot = Nothing
End Sub


' test

Sub test
               Dim theValue
               MsgBox "Testing macro WS MetaAssociationEnd Title..."
               IMegaGenerationTagSolver_TagWrite "56925F163B54005D", Nothing, Nothing, theValue
               MsgBox thevalue
End Sub

Has someone faced a similar issue in the past? And were you able to find a workaround?

I would really be glad if you can provide some insight on this issue.

Greets,
Nik

2 Replies

Hi,

Figured out the solution after some research.

This macro was used to display the icon of a Metaclass in web descriptors, in HOPEX, it’s now replaced by [ObjectPicture/] command which automatically retrieve the icon without using this macro.

 

In standard you should have something like this :

 

                <img src="../standard/[ExternalCall Macro=GifPictureGet/]"/>\n

 

You need to replace it by :

 

<img src="[ObjectPicture/]"/>\n

 

Greets
Nik

veldew
Super Contributor

Hi,

 

Try to debug your objects, most probably one of them is "nothing"....

 

kr,

Wim VdV