[xwiki-devs] Unable to render some velocity code into xhtml
Hello XWiki Rendering Experts, This is something used to work sometime ago but it seems things have changed. I have the following rendering test case: <code> .#---------------------------- ------------------------- .input|xwiki/2.0 .#----------------------------------------------------- {{velocity}} #set($url=$xwiki.zipexplorer.getFileLink($doc, 'presentation.zip', 'output.html')) {{html}} <iframe src="$url" frameborder=0 width=800px height=600px></iframe> {{/html}} {{/velocity}} .#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- </code> The problem is, this test case passes. Which means the velocity / html macros are rendered into nothing... I'm pretty certain this used to work sometime ago (I didn't change anything) but it seems to be broken now. Can you help me fix this? Wysiwyg ppt imports are broken because of this. Thanks. - Asiri
Hi Asiri, Asiri Rathnayake wrote:
Hello XWiki Rendering Experts,
This is something used to work sometime ago but it seems things have changed.
I have the following rendering test case:
<code> .#---------------------------- ------------------------- .input|xwiki/2.0 .#----------------------------------------------------- {{velocity}} #set($url=$xwiki.zipexplorer.getFileLink($doc, 'presentation.zip', 'output.html'))
{{html}} <iframe src="$url" frameborder=0 width=800px height=600px></iframe> {{/html}}
{{/velocity}} .#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- </code>
The problem is, this test case passes. Which means the velocity / html macros are rendered into nothing... I'm pretty certain this used to work sometime ago (I didn't change anything) but it seems to be broken now.
What happens if you use {{html clean=false}} or if you add the quotes around attribute values? Hope this helps, Marius
Can you help me fix this? Wysiwyg ppt imports are broken because of this.
Thanks.
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi, On Sun, Feb 14, 2010 at 2:43 PM, Marius Dumitru Florea < [email protected]> wrote:
Hi Asiri,
Asiri Rathnayake wrote:
Hello XWiki Rendering Experts,
This is something used to work sometime ago but it seems things have changed.
I have the following rendering test case:
<code> .#---------------------------- ------------------------- .input|xwiki/2.0 .#----------------------------------------------------- {{velocity}} #set($url=$xwiki.zipexplorer.getFileLink($doc, 'presentation.zip', 'output.html'))
{{html}} <iframe src="$url" frameborder=0 width=800px height=600px></iframe> {{/html}}
{{/velocity}} .#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- </code>
The problem is, this test case passes. Which means the velocity / html macros are rendered into nothing... I'm pretty certain this used to work sometime ago (I didn't change anything) but it seems to be broken now.
What happens if you use {{html clean=false}} or if you add the quotes around attribute values?
Doesn't seem to have any effect. I'm clue less :( Need to do some deep debugging. - Asiri
Hi, I just tried the following test case: <code> .#----------------------------------------------------- .input|xwiki/2.0 .#----------------------------------------------------- {{html}} <p>something</p> {{/html}} .#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- </code> And it passes too. It seems like the {{html}} macro always returns an empty string. However, things work pretty fine when put on a wiki page. Any ideas? - Asiri
Hi, On Mon, Feb 15, 2010 at 11:47 AM, Asiri Rathnayake < [email protected]> wrote:
Hi,
I just tried the following test case:
<code> .#----------------------------------------------------- .input|xwiki/2.0 .#----------------------------------------------------- {{html}} <p>something</p> {{/html}}
.#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- </code>
And it passes too. It seems like the {{html}} macro always returns an empty string. However, things work pretty fine when put on a wiki page. Any ideas?
But the tests inside xwiki-rendering-macro-html works fine. I tried above test inside xwiki-rendering-test module. May be that is wrong? - Asiri
- Asiri
Hi again, But the tests inside xwiki-rendering-macro-html works fine. I tried above
test inside xwiki-rendering-test module. May be that is wrong?
It seems when a macro is not found xhtml/1.0 output is empty. I tried following test case which also passed: <code> .#----------------------------------------------------- .input|xwiki/2.0 .#----------------------------------------------------- {{blahblah}} something {{/blahblah}} .#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- </code> This seems to be the case for any macro tested inside xwiki-rendering-test module. Either I'm doing something wrong or there is a bug. I'm going to post-pone this debugging a bit and continue my work. Will get back to this later. Thanks. - Asiri
Hi Asiri, On Feb 14, 2010, at 9:50 AM, Asiri Rathnayake wrote:
Hello XWiki Rendering Experts,
This is something used to work sometime ago but it seems things have changed.
I have the following rendering test case:
<code> .#---------------------------- ------------------------- .input|xwiki/2.0 .#----------------------------------------------------- {{velocity}} #set($url=$xwiki.zipexplorer.getFileLink($doc, 'presentation.zip', 'output.html'))
{{html}} <iframe src="$url" frameborder=0 width=800px height=600px></iframe> {{/html}}
{{/velocity}} .#----------------------------------------------------- .expect|xhtml/1.0 .#----------------------------------------------------- </code>
The problem is, this test case passes. Which means the velocity / html macros are rendered into nothing... I'm pretty certain this used to work sometime ago (I didn't change anything) but it seems to be broken now.
Can you help me fix this? Wysiwyg ppt imports are broken because of this.
AFAIK the iframe tag isn't supported in XHTML 1.1 strict. I don't think we've brought any change to the XHTML cleaner. Thanks -Vincent
Hi Vincent,
The problem is, this test case passes. Which means the velocity / html macros are rendered into nothing... I'm pretty certain this used to work sometime ago (I didn't change anything) but it seems to be broken now.
Can you help me fix this? Wysiwyg ppt imports are broken because of this.
AFAIK the iframe tag isn't supported in XHTML 1.1 strict.
I don't think we've brought any change to the XHTML cleaner.
Wysiwyg ppt imports used to work without issues. And I was using iframe tag the whole time. I'm investigating. - Asiri
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Feb 14, 2010, at 12:02 PM, Asiri Rathnayake wrote:
Hi Vincent,
The problem is, this test case passes. Which means the velocity / html macros are rendered into nothing... I'm pretty certain this used to work sometime ago (I didn't change anything) but it seems to be broken now.
Can you help me fix this? Wysiwyg ppt imports are broken because of this.
AFAIK the iframe tag isn't supported in XHTML 1.1 strict.
I don't think we've brought any change to the XHTML cleaner.
Wysiwyg ppt imports used to work without issues. And I was using iframe tag the whole time. I'm investigating.
I've just tested too and the cleaner doesn't clean it. -Vincent
Hi, Once clue that might help is that normal ppt imports using officeimporter application works fine. But in that case the content is stored in xwiki/2.0 syntax as the document content. But at some point it has to be rendered into xhtml/1.0 which seems to be working fine. I'm bit confused right now, will update as soon as I find the reason. Thanks. - Asiri
Hi again, On Sun, Feb 14, 2010 at 4:39 PM, Asiri Rathnayake < [email protected]> wrote:
Hi,
Once clue that might help is that normal ppt imports using officeimporter application works fine. But in that case the content is stored in xwiki/2.0 syntax as the document content. But at some point it has to be rendered into xhtml/1.0 which seems to be working fine.
Ok, if I put the above velocity/html script into a wiki page and view it, I can see the xhtml/1.0 output correctly. So it seems like a problem in velocity execution context. - Asiri
participants (3)
-
Asiri Rathnayake -
Marius Dumitru Florea -
Vincent Massol