I finally managed solving the problem.
The solution consists in changing the program in 2 places.
1) I programmed a loop that waits until the headline of the copied
page can be read.
                '       Loop until headline is present, with a maximum of 50 
iterations.
                For i = 1 to 50
                        ' Get headline element
                        xmlFile = sendXML(RQLObject,    "<IODATA 
sessionkey="""+SessionKey
+""">" + _
                                                        "  <PAGE 
guid="""+CreatedPageGUID+""">" + _
                                                        "    <ELEMENTS 
action=""load""/>" + _
                                                        "  </PAGE>" + _
                                                        "</IODATA>" )
                        xmlDoc.LoadXML (xmlFile)
                        '       WriteToLog ("1bis.xmlFile="&xmlFile)
                        Set NodeList = 
xmlDoc.selectNodes("/IODATA/PAGE/ELEMENTS/ELEMENT" +
ELEMENT_FILTER_HEADLINE)
                        if (NodeList.length > 0) then
                                i = 50
                        end if
                next

2) the second part of the solution was to move the instruction that
changes the headline further down the program AND to remove the
parameters sync="1" and actionflag="4096" from the RQL instruction.

The result was that the headline could now be changed and the program
no longer crashes.

On Feb 23, 4:36 pm, Bart <[email protected]> wrote:
> Ok,I want to try your solution, because it sounds very .... good.
> But how do I get the jobguid of this page?
> I am not able to locate the RQL that returns me this info.
>
> On Feb 22, 3:59 pm, akor <[email protected]> wrote:
>
> > Hey!
>
> > 1. Read the "jobguid" from the newly created page.
> > 2. Check the job status frequently, like a loop till status is done.
> >   For that use RQL
> >   xmlString = "" _
> >     & "<IODATA loginguid='" & session("LoginGuid") & "' sessionkey='"
> > & session("SessionKey") & "'>" & Vbcrlf _
> >     & "  <PAGE><PAGEDEFINITION action='getstatus' jobguid='" & jobguid
> > & "'/></PAGE>" & VbCrLf _
> >     & "</IODATA>" & Vbcrlf
>
> > in a function like
>
> > Function fckGetJobStatus(jobguid)
> > End Function
>
> > and do
>
> >   If objIO.GetAttribute("PAGEDEFINITION","finished",resXML) <> "1"
> > Then fckGetJobStatus(jobguid)
> >   fckGetJobStatus =
> > objIO.GetAttribute("PAGEDEFINITION","finished",resXML)
>
> > inside.
>
> > 3. If done, do whatever you want to do with your newly created page.
> > Like changing the headline.
>
> > Best from Hamburg,
> > -alex

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reddot-cms-users?hl=en.

Reply via email to