I'm using Page.Title in my legacy VBscript component dynamic template as below:
WriteOut "Component '<b>" & EscapeXMLCharacters(iComp.title) & "</b>', based on Schema '<b>" & EscapeXMLCharacters(iComp.schema.title) & "'</b>, test '<b>" & Page.Title& "'</b></td></tr>" & vbLf
This works fine when i preview the page, but when i publish the page, it fails with following error:
Error 424 occurred while rendering the Component Presentation (LegacyComponent:LegacyComponentTemplate): Object required: 'Page' (source: WriteOut "Component '" & EscapeXMLCharacters(iComp.title) & "', based on Schema '" & EscapeXMLCharacters(iComp.schema.title) & "', Tst '" & test & "', test2 '" & Page.Title& "'" & vbLf).
However, when I set the component template as static, publish works fine.
Have any one come across similar issue?