Video Macro not working ?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Video Macro not working ?

jweir
Hi,

I have been trying to use the video macro [1] without much success.

I followed the instructions to upload and import the xar file into my
xwiki.  The import was successful.

I then add the macro into the Velocity macros:
Administration:
Preferences->Advanced->Velocity Macro Pages   I added:
Marcos.Video,

I was then hoping to embed a video into my xwiki.  Unfortunately all I
see is the text of the macro rather than the video,  For example:

#video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');

Any ideas on why this is not working ?
Thanks
James


_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

vmassol
Administrator
Hi James,

The person who wrote the installation tutorial was wrong. The way it  
was described doesn't work.
I've updated the instructions.
See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads

Thanks
-Vincent

On Jul 1, 2008, at 12:05 PM, James Weir wrote:

> Hi,
>
> I have been trying to use the video macro [1] without much success.
>
> I followed the instructions to upload and import the xar file into my
> xwiki.  The import was successful.
>
> I then add the macro into the Velocity macros:
> Administration:
> Preferences->Advanced->Velocity Macro Pages   I added:
> Marcos.Video,
>
> I was then hoping to embed a video into my xwiki.  Unfortunately all I
> see is the text of the macro rather than the video,  For example:
>
> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');
>
> Any ideas on why this is not working ?
> Thanks
> James
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

jweir
That seems to work now.
interesting though, when I add an http URL the first time it works fine;
however if I re-edit the page then the httpURL gets interpreted by the
Wiki and corrupts the link, for example

if I add this:
#video('http://www.dailymotion.com/video/x5yyb9_sarkozy-en-off-sur-france-3_news')

save the page and then later I re-edit the page the http link is saved as:
#video('<a href="http://www.dailymotion.com/video/x5yyb9&#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news'">http://www.dailymotion.com/video/x5yyb9&#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news')


and an error is thrown:

Error number 4001 in 4: Error while parsing velocity page Tutorials.SAFTutorialBuild
Wrapped Exception: Failed to evaluate content with id SAFTutorial Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild>
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing velocity page Tutorials.SAFTutorialBuild
Wrapped Exception: Failed to evaluate content with id SAFTutorial Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild>
        at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:231)
        at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
        at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:252)
        at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:176)
        at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:145)
        at com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:134)
        at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:423)
        at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
        at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

... partial exception, the rest has been removed


        at java.lang.reflect.Method.invoke(Method.java:597)


I know there is a notion of {pre} that stops xwiki interpeting parts of
the page to stop this, however I was suprised that xwiki did this in a
macro.  How can I stop this happening ?

I have a more generic question; if you wish to use a widget in html as
part of the wiki, what is the best way to go about this ?  Do you have
to create your own Macro ? or is there a way to tell xWkki to parse a
block as html ?

Thanks
James


Vincent Massol wrote:

> Hi James,
>
> The person who wrote the installation tutorial was wrong. The way it  
> was described doesn't work.
> I've updated the instructions.
> See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads
>
> Thanks
> -Vincent
>
> On Jul 1, 2008, at 12:05 PM, James Weir wrote:
>
>  
>> Hi,
>>
>> I have been trying to use the video macro [1] without much success.
>>
>> I followed the instructions to upload and import the xar file into my
>> xwiki.  The import was successful.
>>
>> I then add the macro into the Velocity macros:
>> Administration:
>> Preferences->Advanced->Velocity Macro Pages   I added:
>> Marcos.Video,
>>
>> I was then hoping to embed a video into my xwiki.  Unfortunately all I
>> see is the text of the macro rather than the video,  For example:
>>
>> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');
>>
>> Any ideas on why this is not working ?
>> Thanks
>> James
>>    
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>  

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

vmassol
Administrator
Hi James,

This is probably because of our "flaky" WYSIWYG editor. In the version  
you have it's escaping the special characters as xml entities thus  
making the URL fail... This is a known bug and we're working hard on a  
brand new WYSIWYG editor based on GWT that will not have all the  
deficiencies of the current editor. Right now all I can suggest is to  
not use the WYSIWYG editor and use the wiki editor one as much as  
possible. I know it's a good answer but we're a bit stuck, whenever we  
make changes to the current editor it breaks it in other places; it's  
really too hard to maintain (hence our decisions to rewrite it - a  
first version should be out in September).

Sorry about that.

Thanks
-Vincent

On Jul 1, 2008, at 3:57 PM, James Weir wrote:

> That seems to work now.
> interesting though, when I add an http URL the first time it works  
> fine;
> however if I re-edit the page then the httpURL gets interpreted by the
> Wiki and corrupts the link, for example
>
> if I add this:
> #video('http://www.dailymotion.com/video/x5yyb9_sarkozy-en-off-sur-france-3_news')
>
> save the page and then later I re-edit the page the http link is  
> saved as:
> #video('http://www.dailymotion.com/video/ 
> x5yyb9&#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news')
>
>
> and an error is thrown:
>
> Error number 4001 in 4: Error while parsing velocity page  
> Tutorials.SAFTutorialBuild
> Wrapped Exception: Failed to evaluate content with id SAFTutorial  
> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild 
> >
> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while  
> parsing velocity page Tutorials.SAFTutorialBuild
> Wrapped Exception: Failed to evaluate content with id SAFTutorial  
> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild 
> >
> at  
> com
> .xpn
> .xwiki
> .render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:231)
> at  
> com
> .xpn
> .xwiki
> .render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
> at  
> com
> .xpn
> .xwiki
> .render
> .DefaultXWikiRenderingEngine
> .renderText(DefaultXWikiRenderingEngine.java:252)
> at  
> com
> .xpn
> .xwiki
> .render
> .DefaultXWikiRenderingEngine
> .renderText(DefaultXWikiRenderingEngine.java:176)
> at  
> com
> .xpn
> .xwiki
> .render
> .DefaultXWikiRenderingEngine
> .renderText(DefaultXWikiRenderingEngine.java:145)
> at  
> com
> .xpn
> .xwiki
> .render
> .DefaultXWikiRenderingEngine
> .renderDocument(DefaultXWikiRenderingEngine.java:134)
> at  
> com
> .xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:
> 423)
> at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
> at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
> at  
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
>
> ... partial exception, the rest has been removed
>
>
> at java.lang.reflect.Method.invoke(Method.java:597)
>
>
> I know there is a notion of {pre} that stops xwiki interpeting parts  
> of
> the page to stop this, however I was suprised that xwiki did this in a
> macro.  How can I stop this happening ?
>
> I have a more generic question; if you wish to use a widget in html as
> part of the wiki, what is the best way to go about this ?  Do you have
> to create your own Macro ? or is there a way to tell xWkki to parse a
> block as html ?
>
> Thanks
> James
>
>
> Vincent Massol wrote:
>> Hi James,
>>
>> The person who wrote the installation tutorial was wrong. The way it
>> was described doesn't work.
>> I've updated the instructions.
>> See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads
>>
>> Thanks
>> -Vincent
>>
>> On Jul 1, 2008, at 12:05 PM, James Weir wrote:
>>
>>
>>> Hi,
>>>
>>> I have been trying to use the video macro [1] without much success.
>>>
>>> I followed the instructions to upload and import the xar file into  
>>> my
>>> xwiki.  The import was successful.
>>>
>>> I then add the macro into the Velocity macros:
>>> Administration:
>>> Preferences->Advanced->Velocity Macro Pages   I added:
>>> Marcos.Video,
>>>
>>> I was then hoping to embed a video into my xwiki.  Unfortunately  
>>> all I
>>> see is the text of the macro rather than the video,  For example:
>>>
>>> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');
>>>
>>> Any ideas on why this is not working ?
>>> Thanks
>>> James
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

jweir
No problems,
I completely understand :)

Looking forward to the new version
Cheers
James

Vincent Massol wrote:

> Hi James,
>
> This is probably because of our "flaky" WYSIWYG editor. In the version  
> you have it's escaping the special characters as xml entities thus  
> making the URL fail... This is a known bug and we're working hard on a  
> brand new WYSIWYG editor based on GWT that will not have all the  
> deficiencies of the current editor. Right now all I can suggest is to  
> not use the WYSIWYG editor and use the wiki editor one as much as  
> possible. I know it's a good answer but we're a bit stuck, whenever we  
> make changes to the current editor it breaks it in other places; it's  
> really too hard to maintain (hence our decisions to rewrite it - a  
> first version should be out in September).
>
> Sorry about that.
>
> Thanks
> -Vincent
>
> On Jul 1, 2008, at 3:57 PM, James Weir wrote:
>
>  
>> That seems to work now.
>> interesting though, when I add an http URL the first time it works  
>> fine;
>> however if I re-edit the page then the httpURL gets interpreted by the
>> Wiki and corrupts the link, for example
>>
>> if I add this:
>> #video('http://www.dailymotion.com/video/x5yyb9_sarkozy-en-off-sur-france-3_news')
>>
>> save the page and then later I re-edit the page the http link is  
>> saved as:
>> #video('http://www.dailymotion.com/video/ 
>> x5yyb9&#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news')
>>
>>
>> and an error is thrown:
>>
>> Error number 4001 in 4: Error while parsing velocity page  
>> Tutorials.SAFTutorialBuild
>> Wrapped Exception: Failed to evaluate content with id SAFTutorial  
>> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild 
>>    
>> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while  
>> parsing velocity page Tutorials.SAFTutorialBuild
>> Wrapped Exception: Failed to evaluate content with id SAFTutorial  
>> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild 
>>    
>> at  
>> com
>> .xpn
>> .xwiki
>> .render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:231)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderText(DefaultXWikiRenderingEngine.java:252)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderText(DefaultXWikiRenderingEngine.java:176)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderText(DefaultXWikiRenderingEngine.java:145)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderDocument(DefaultXWikiRenderingEngine.java:134)
>> at  
>> com
>> .xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:
>> 423)
>> at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
>> at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
>> at  
>> sun
>> .reflect
>> .DelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> ... partial exception, the rest has been removed
>>
>>
>> at java.lang.reflect.Method.invoke(Method.java:597)
>>
>>
>> I know there is a notion of {pre} that stops xwiki interpeting parts  
>> of
>> the page to stop this, however I was suprised that xwiki did this in a
>> macro.  How can I stop this happening ?
>>
>> I have a more generic question; if you wish to use a widget in html as
>> part of the wiki, what is the best way to go about this ?  Do you have
>> to create your own Macro ? or is there a way to tell xWkki to parse a
>> block as html ?
>>
>> Thanks
>> James
>>
>>
>> Vincent Massol wrote:
>>    
>>> Hi James,
>>>
>>> The person who wrote the installation tutorial was wrong. The way it
>>> was described doesn't work.
>>> I've updated the instructions.
>>> See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads
>>>
>>> Thanks
>>> -Vincent
>>>
>>> On Jul 1, 2008, at 12:05 PM, James Weir wrote:
>>>
>>>
>>>      
>>>> Hi,
>>>>
>>>> I have been trying to use the video macro [1] without much success.
>>>>
>>>> I followed the instructions to upload and import the xar file into  
>>>> my
>>>> xwiki.  The import was successful.
>>>>
>>>> I then add the macro into the Velocity macros:
>>>> Administration:
>>>> Preferences->Advanced->Velocity Macro Pages   I added:
>>>> Marcos.Video,
>>>>
>>>> I was then hoping to embed a video into my xwiki.  Unfortunately  
>>>> all I
>>>> see is the text of the macro rather than the video,  For example:
>>>>
>>>> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');
>>>>
>>>> Any ideas on why this is not working ?
>>>> Thanks
>>>> James
>>>>        
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>  

_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

vmassol
Administrator

On Jul 1, 2008, at 4:33 PM, James Weir wrote:

> No problems,
> I completely understand :)

thanks for your understanding... see below for a typo I made...

> Looking forward to the new version
> Cheers
> James
>
> Vincent Massol wrote:
>> Hi James,
>>
>> This is probably because of our "flaky" WYSIWYG editor. In the  
>> version
>> you have it's escaping the special characters as xml entities thus
>> making the URL fail... This is a known bug and we're working hard  
>> on a
>> brand new WYSIWYG editor based on GWT that will not have all the
>> deficiencies of the current editor. Right now all I can suggest is to
>> not use the WYSIWYG editor and use the wiki editor one as much as
>> possible. I know it's a good answer but we're a bit stuck, whenever  
>> we
                                     ^^^^^^^^^
I meant "I know it's NOT a good answer" of course ;)

Thanks
-Vincent

>>
>> make changes to the current editor it breaks it in other places; it's
>> really too hard to maintain (hence our decisions to rewrite it - a
>> first version should be out in September).
>>
>> Sorry about that.
>>
>> Thanks
>> -Vincent
>>
>> On Jul 1, 2008, at 3:57 PM, James Weir wrote:
>>
>>
>>> That seems to work now.
>>> interesting though, when I add an http URL the first time it works
>>> fine;
>>> however if I re-edit the page then the httpURL gets interpreted by  
>>> the
>>> Wiki and corrupts the link, for example
>>>
>>> if I add this:
>>> #video('http://www.dailymotion.com/video/x5yyb9_sarkozy-en-off-sur-france-3_news')
>>>
>>> save the page and then later I re-edit the page the http link is
>>> saved as:
>>> #video('http://www.dailymotion.com/video/
>>> x5yyb9
>>> &#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news')
>>>
>>>
>>> and an error is thrown:
>>>
>>> Error number 4001 in 4: Error while parsing velocity page
>>> Tutorials.SAFTutorialBuild
>>> Wrapped Exception: Failed to evaluate content with id SAFTutorial
>>> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild
>>>
>>> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while
>>> parsing velocity page Tutorials.SAFTutorialBuild
>>> Wrapped Exception: Failed to evaluate content with id SAFTutorial
>>> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild
>>>
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
>>> 231)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderText(DefaultXWikiRenderingEngine.java:252)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderText(DefaultXWikiRenderingEngine.java:176)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderText(DefaultXWikiRenderingEngine.java:145)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderDocument(DefaultXWikiRenderingEngine.java:134)
>>> at
>>> com
>>> .xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:
>>> 423)
>>> at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
>>> at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
>>> at
>>> sun
>>> .reflect
>>> .DelegatingMethodAccessorImpl
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>> ... partial exception, the rest has been removed
>>>
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>
>>>
>>> I know there is a notion of {pre} that stops xwiki interpeting parts
>>> of
>>> the page to stop this, however I was suprised that xwiki did this  
>>> in a
>>> macro.  How can I stop this happening ?
>>>
>>> I have a more generic question; if you wish to use a widget in  
>>> html as
>>> part of the wiki, what is the best way to go about this ?  Do you  
>>> have
>>> to create your own Macro ? or is there a way to tell xWkki to  
>>> parse a
>>> block as html ?
>>>
>>> Thanks
>>> James
>>>
>>>
>>> Vincent Massol wrote:
>>>
>>>> Hi James,
>>>>
>>>> The person who wrote the installation tutorial was wrong. The way  
>>>> it
>>>> was described doesn't work.
>>>> I've updated the instructions.
>>>> See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads
>>>>
>>>> Thanks
>>>> -Vincent
>>>>
>>>> On Jul 1, 2008, at 12:05 PM, James Weir wrote:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I have been trying to use the video macro [1] without much  
>>>>> success.
>>>>>
>>>>> I followed the instructions to upload and import the xar file into
>>>>> my
>>>>> xwiki.  The import was successful.
>>>>>
>>>>> I then add the macro into the Velocity macros:
>>>>> Administration:
>>>>> Preferences->Advanced->Velocity Macro Pages   I added:
>>>>> Marcos.Video,
>>>>>
>>>>> I was then hoping to embed a video into my xwiki.  Unfortunately
>>>>> all I
>>>>> see is the text of the macro rather than the video,  For example:
>>>>>
>>>>> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');
>>>>>
>>>>> Any ideas on why this is not working ?
>>>>> Thanks
>>>>> James
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

Wright, Philip
In reply to this post by jweir
James,

        Thank you for asking this question, Vincent you rule man!


 

Philip Wright

Reports Analyst

ACS: BPS


Affiliated Computer Services, Inc


Affiliated Computer Services, Inc (ACS) Proprietary and Confidential
Information
This document (or any part thereof) may not be disseminated outside of ACS
in either electronic or physical form without specific authorization of the
office of the ACS Chief Information Security Officer. The information
included in this document represents no commitment by ACS to any other
party. The policies and standards described do not consider any country law
or other directive outside of the United States.

P Please consider the environment before printing this email


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of
Vincent Massol
Sent: Tuesday, July 01, 2008 7:43 AM
To: XWiki Users
Subject: Re: [xwiki-users] Video Macro not working ?


On Jul 1, 2008, at 4:33 PM, James Weir wrote:

> No problems,
> I completely understand :)

thanks for your understanding... see below for a typo I made...

> Looking forward to the new version
> Cheers
> James
>
> Vincent Massol wrote:
>> Hi James,
>>
>> This is probably because of our "flaky" WYSIWYG editor. In the
>> version you have it's escaping the special characters as xml entities
>> thus making the URL fail... This is a known bug and we're working
>> hard on a brand new WYSIWYG editor based on GWT that will not have
>> all the deficiencies of the current editor. Right now all I can
>> suggest is to not use the WYSIWYG editor and use the wiki editor one
>> as much as possible. I know it's a good answer but we're a bit stuck,
>> whenever we
                                     ^^^^^^^^^ I meant "I know it's NOT a
good answer" of course ;)

Thanks
-Vincent

>>
>> make changes to the current editor it breaks it in other places; it's
>> really too hard to maintain (hence our decisions to rewrite it - a
>> first version should be out in September).
>>
>> Sorry about that.
>>
>> Thanks
>> -Vincent
>>
>> On Jul 1, 2008, at 3:57 PM, James Weir wrote:
>>
>>
>>> That seems to work now.
>>> interesting though, when I add an http URL the first time it works
>>> fine; however if I re-edit the page then the httpURL gets
>>> interpreted by the Wiki and corrupts the link, for example
>>>
>>> if I add this:
>>> #video('http://www.dailymotion.com/video/x5yyb9_sarkozy-en-off-sur-f
>>> rance-3_news')
>>>
>>> save the page and then later I re-edit the page the http link is
>>> saved as:
>>> #video('http://www.dailymotion.com/video/
>>> x5yyb9
>>> &#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news')
>>>
>>>
>>> and an error is thrown:
>>>
>>> Error number 4001 in 4: Error while parsing velocity page
>>> Tutorials.SAFTutorialBuild Wrapped Exception: Failed to evaluate
>>> content with id SAFTutorial Build
>>> <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutoria
>>> lBuild
>>>
>>> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while
>>> parsing velocity page Tutorials.SAFTutorialBuild Wrapped Exception:
>>> Failed to evaluate content with id SAFTutorial Build
>>> <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutoria
>>> lBuild
>>>
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:
>>> 231)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderText(DefaultXWikiRenderingEngine.java:252)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderText(DefaultXWikiRenderingEngine.java:176)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderText(DefaultXWikiRenderingEngine.java:145)
>>> at
>>> com
>>> .xpn
>>> .xwiki
>>> .render
>>> .DefaultXWikiRenderingEngine
>>> .renderDocument(DefaultXWikiRenderingEngine.java:134)
>>> at
>>> com
>>> .xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:
>>> 423)
>>> at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
>>> at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
>>> at
>>> sun
>>> .reflect
>>> .DelegatingMethodAccessorImpl
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>> ... partial exception, the rest has been removed
>>>
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>>
>>>
>>> I know there is a notion of {pre} that stops xwiki interpeting parts
>>> of the page to stop this, however I was suprised that xwiki did this
>>> in a macro.  How can I stop this happening ?
>>>
>>> I have a more generic question; if you wish to use a widget in html
>>> as part of the wiki, what is the best way to go about this ?  Do you
>>> have to create your own Macro ? or is there a way to tell xWkki to
>>> parse a block as html ?
>>>
>>> Thanks
>>> James
>>>
>>>
>>> Vincent Massol wrote:
>>>
>>>> Hi James,
>>>>
>>>> The person who wrote the installation tutorial was wrong. The way
>>>> it was described doesn't work.
>>>> I've updated the instructions.
>>>> See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads
>>>>
>>>> Thanks
>>>> -Vincent
>>>>
>>>> On Jul 1, 2008, at 12:05 PM, James Weir wrote:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I have been trying to use the video macro [1] without much
>>>>> success.
>>>>>
>>>>> I followed the instructions to upload and import the xar file into
>>>>> my xwiki.  The import was successful.
>>>>>
>>>>> I then add the macro into the Velocity macros:
>>>>> Administration:
>>>>> Preferences->Advanced->Velocity Macro Pages   I added:
>>>>> Marcos.Video,
>>>>>
>>>>> I was then hoping to embed a video into my xwiki.  Unfortunately
>>>>> all I see is the text of the macro rather than the video,  For
>>>>> example:
>>>>>
>>>>> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');
>>>>>
>>>>> Any ideas on why this is not working ?
>>>>> Thanks
>>>>> James
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

Alain Mouette
In reply to this post by vmassol
I am having a similar problem, will it wor if I roll back to 1.1.2
editor as suggested by Sergiu Dumitriuin 06/27?

Alain

Vincent Massol escreveu:

> Hi James,
>
> This is probably because of our "flaky" WYSIWYG editor. In the version  
> you have it's escaping the special characters as xml entities thus  
> making the URL fail... This is a known bug and we're working hard on a  
> brand new WYSIWYG editor based on GWT that will not have all the  
> deficiencies of the current editor. Right now all I can suggest is to  
> not use the WYSIWYG editor and use the wiki editor one as much as  
> possible. I know it's a good answer but we're a bit stuck, whenever we  
> make changes to the current editor it breaks it in other places; it's  
> really too hard to maintain (hence our decisions to rewrite it - a  
> first version should be out in September).
>
> Sorry about that.
>
> Thanks
> -Vincent
>
> On Jul 1, 2008, at 3:57 PM, James Weir wrote:
>
>> That seems to work now.
>> interesting though, when I add an http URL the first time it works  
>> fine;
>> however if I re-edit the page then the httpURL gets interpreted by the
>> Wiki and corrupts the link, for example
>>
>> if I add this:
>> #video('http://www.dailymotion.com/video/x5yyb9_sarkozy-en-off-sur-france-3_news')
>>
>> save the page and then later I re-edit the page the http link is  
>> saved as:
>> #video('http://www.dailymotion.com/video/ 
>> x5yyb9&#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news')
>>
>>
>> and an error is thrown:
>>
>> Error number 4001 in 4: Error while parsing velocity page  
>> Tutorials.SAFTutorialBuild
>> Wrapped Exception: Failed to evaluate content with id SAFTutorial  
>> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild 
>> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while  
>> parsing velocity page Tutorials.SAFTutorialBuild
>> Wrapped Exception: Failed to evaluate content with id SAFTutorial  
>> Build <http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild 
>> at  
>> com
>> .xpn
>> .xwiki
>> .render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:231)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderText(DefaultXWikiRenderingEngine.java:252)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderText(DefaultXWikiRenderingEngine.java:176)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderText(DefaultXWikiRenderingEngine.java:145)
>> at  
>> com
>> .xpn
>> .xwiki
>> .render
>> .DefaultXWikiRenderingEngine
>> .renderDocument(DefaultXWikiRenderingEngine.java:134)
>> at  
>> com
>> .xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:
>> 423)
>> at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
>> at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
>> at  
>> sun
>> .reflect
>> .DelegatingMethodAccessorImpl
>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>
>> ... partial exception, the rest has been removed
>>
>>
>> at java.lang.reflect.Method.invoke(Method.java:597)
>>
>>
>> I know there is a notion of {pre} that stops xwiki interpeting parts  
>> of
>> the page to stop this, however I was suprised that xwiki did this in a
>> macro.  How can I stop this happening ?
>>
>> I have a more generic question; if you wish to use a widget in html as
>> part of the wiki, what is the best way to go about this ?  Do you have
>> to create your own Macro ? or is there a way to tell xWkki to parse a
>> block as html ?
>>
>> Thanks
>> James
>>
>>
>> Vincent Massol wrote:
>>> Hi James,
>>>
>>> The person who wrote the installation tutorial was wrong. The way it
>>> was described doesn't work.
>>> I've updated the instructions.
>>> See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads
>>>
>>> Thanks
>>> -Vincent
>>>
>>> On Jul 1, 2008, at 12:05 PM, James Weir wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> I have been trying to use the video macro [1] without much success.
>>>>
>>>> I followed the instructions to upload and import the xar file into  
>>>> my
>>>> xwiki.  The import was successful.
>>>>
>>>> I then add the macro into the Velocity macros:
>>>> Administration:
>>>> Preferences->Advanced->Velocity Macro Pages   I added:
>>>> Marcos.Video,
>>>>
>>>> I was then hoping to embed a video into my xwiki.  Unfortunately  
>>>> all I
>>>> see is the text of the macro rather than the video,  For example:
>>>>
>>>> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en');
>>>>
>>>> Any ideas on why this is not working ?
>>>> Thanks
>>>> James
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>
>
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Video Macro not working ?

Niels Mayer
In reply to this post by jweir
I encountered similar problems with the WYSIWYG editor rewriting attachment
or image URL's and causing errors.

In your case wouldn't the problem be solved by adding your macro to the list
of macros that
the editor won't touch? Then the macros would never expand, and the
foolishness inside tiny_mce that garbles all URL's into utter uselessness
would never get invoked. The other approach is what
i did, which is to side-step thhe URL-garbling in the first place.

In my case, I solved it by setting up a special macro to launch the WYSIWYG
with the correct parameters that appear to prevent this problem, along with
a JavaScript hack that overrides the bad URL-rewriting behavior.  Things
work fine as long as references are "local" during editing/authoring in the
wysiwyg. After "save" or "publishing" , (if that happens to move the
location of attachments, etc), as long as references remain local, then
things continue to work smoothly.

The issue is that no amount of fiddling with setting of tiny_mce parameters
relative_urls:
or convert_urls: affects the bad wywsiwyg behavior. The only thing that
seems to work
is overriding the javascript function that causes all the bad behavior.
There's ways of giving an additional parameter to tiny_mce to point it at a
different convertURL() function, but since the parameter is not used
consistently, it actually doesn't work. So at least for my 1.3.X based
experiements, I was only able to achieve succcess w/ the tiny_mce wysiwyg by
adding
the following at the bottom of any form/document that uses the wysiwyg in
this way:

/*
 * HACK: Tell TinyMCE to leave-alone the URL's ... they are fine as-is.. as
relative links
 * during edit in AssetTemp/xxxxxxx, and as permanent links in
$wysi_publishSpace on save
 */
tinyMCE.convertURL = function(url, node, on_save) { return url; };

(above in context:
http://fisheye2.atlassian.com/browse/~raw,r=trunk/xwiki/xwiki-products/curriki/trunk/wiki/src/main/resources/CreateResources/CurrikiStandardLessonPlan)

Note the parameters I pass to tiny_mce are setup in the macros below:

(from
http://fisheye2.atlassian.com/browse/xwiki/xwiki-products/curriki/trunk/wiki/src/main/resources/CreateResources/StyledMacros?r=trunk)
##
## Fire up the WYSIWYG editor. See
http://next.dev.curriki.org/xwiki/templates/textarea_wysiwyg.vm
## This "inlines" #template("textarea_wysiwyg.vm") as it needs to customize
the behavior
## Note that this makes reference to vars $xwiki, $request and is to be
added at the end of
## forms to enable wysyiwyg editor javascript.
##
## Must be called in sequence
## #curriki_wysiwyg_loader_preamble()
## #curriki_wysiwyg_loader_editor()
## ...
#macro(curriki_wysiwyg_loader_preamble) ## {
<script type="text/javascript"
src="${request.contextPath}/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript"
src="${request.contextPath}/wiki_editor/wiki_editor.js"></script>
<script type="text/javascript">if ( !(browser.isIE || browser.isMozilla ||
browser.isGecko ) ) {alert("$msg.get('browsernoncompatible')");}</script>
#end ## }
...
##
## Must be called one or more times after #curriki_wysiwyg_loader_preamble()
##
#macro(curriki_SLP_wysiwyg_loader_editor $thisEditor $thisAsset $pubSpace)
## {
<script type="text/javascript">if ( ('$thisEditor' != '') && (browser.isIE
|| browser.isMozilla || browser.isGecko ) )
{wikiEditor.init({elements:"$thisEditor",language:"en",mode:"exact",content_css:"$xwiki.getSkinFile("style.css")",debug:false,remove_linebreaks:false,plugins:'table,contextmenu,paste,searchreplace',wiki_use_style:'$xwiki.useWysiwygStyleToolbar()',document_base_url:'${request.contextPath}/bin/view/$pubSpace/$thisAsset.name',wiki_images_path:'${request.contextPath}/bin/download/$thisAsset.web/$thisAsset.name/',wiki_attach_path:'${request.contextPath}/bin/view/$thisAsset.web/$thisAsset.name',wiki_macro_path:'${request.contextPath}/bin/view/$thisAsset.web/$thisAsset.name',wiki_plugins:'core,attachments',relative_urls:false,convert_urls:true
});}</script>
#end ## }


On Tue, Jul 1, 2008 at 6:57 AM, James Weir <[hidden email]>
wrote:

> That seems to work now.
> interesting though, when I add an http URL the first time it works fine;
> however if I re-edit the page then the httpURL gets interpreted by the
> Wiki and corrupts the link, for example
>
> if I add this:
> #video('
> http://www.dailymotion.com/video/x5yyb9_sarkozy-en-off-sur-france-3_news')
>
> save the page and then later I re-edit the page the http link is saved as:
> #video('
> <a href="http://www.dailymotion.com/video/x5yyb9&#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news">http://www.dailymotion.com/video/x5yyb9&#95;sarkozy&#45;en&#45;off&#45;sur&#45;france&#45;3&#95;news
> ')
>
>
> and an error is thrown:
>
> Error number 4001 in 4: Error while parsing velocity page
> Tutorials.SAFTutorialBuild
> Wrapped Exception: Failed to evaluate content with id SAFTutorial Build <
> http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild>
> com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing
> velocity page Tutorials.SAFTutorialBuild
> Wrapped Exception: Failed to evaluate content with id SAFTutorial Build <
> http://demo.usharesoft.com:8080/xwiki/bin/view/Tutorials/SAFTutorialBuild>
>        at
> com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:231)
>        at
> com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
>        at
> com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:252)
>        at
> com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:176)
>        at
> com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:145)
>        at
> com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderDocument(DefaultXWikiRenderingEngine.java:134)
>        at
> com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:423)
>        at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:371)
>        at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> ... partial exception, the rest has been removed
>
>
>        at java.lang.reflect.Method.invoke(Method.java:597)
>
>
> I know there is a notion of {pre} that stops xwiki interpeting parts of
> the page to stop this, however I was suprised that xwiki did this in a
> macro.  How can I stop this happening ?
>
> I have a more generic question; if you wish to use a widget in html as
> part of the wiki, what is the best way to go about this ?  Do you have
> to create your own Macro ? or is there a way to tell xWkki to parse a
> block as html ?
>
> Thanks
> James
>
>
> Vincent Massol wrote:
> > Hi James,
> >
> > The person who wrote the installation tutorial was wrong. The way it
> > was described doesn't work.
> > I've updated the instructions.
> > See http://code.xwiki.org/xwiki/bin/view/Macros/VideoMacroDownloads
> >
> > Thanks
> > -Vincent
> >
> > On Jul 1, 2008, at 12:05 PM, James Weir wrote:
> >
> >
> >> Hi,
> >>
> >> I have been trying to use the video macro [1] without much success.
> >>
> >> I followed the instructions to upload and import the xar file into my
> >> xwiki.  The import was successful.
> >>
> >> I then add the macro into the Velocity macros:
> >> Administration:
> >> Preferences->Advanced->Velocity Macro Pages   I added:
> >> Marcos.Video,
> >>
> >> I was then hoping to embed a video into my xwiki.  Unfortunately all I
> >> see is the text of the macro rather than the video,  For example:
> >>
> >> #video('http://www.youtube.com/v/NEV2TnDUA-E&hl=en'<http://www.youtube.com/v/NEV2TnDUA-E&hl=en%27>
> );
> >>
> >> Any ideas on why this is not working ?
> >> Thanks
> >> James
> >>
> > _______________________________________________
> > users mailing list
> > [hidden email]
> > http://lists.xwiki.org/mailman/listinfo/users
> >
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.xwiki.org/mailman/listinfo/users
>



--
Niels
http://nielsmayer.com
_______________________________________________
users mailing list
[hidden email]
http://lists.xwiki.org/mailman/listinfo/users