Why the icon svg file can not be loaded in Orbeon 4.10

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

Why the icon svg file can not be loaded in Orbeon 4.10

henry821
Hello, I upgraded a web app from the version 3.9 to 4.10. The icon can be shown in Orbeon 3.9(as can been seen in the image), however it doesn't work in Orbeon 4.10. So how to fix this bug? Thank you.


Here are the source code:
top-menu.xhtml
compass.svg
Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

Alessandro  Vernet
Administrator
This post was updated on .
Hi Henry,

I imaging that this is the icon shown by:

    < img src="/apps/icons/compass.svg" class="icon-small"/>

Maybe the path needs to be /icons/compass.svg, without the "/apps". Give it a shot, and you'll let us know if it works.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

henry821
Hi, Alex,

I have tried your method, but it doesn't work.Any other solutions? Thank you.

Henry
Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

Alessandro  Vernet
Administrator
Hi Henry,

OK, that was somewhat of a shot in the dark. So, could you create a single-file example that reproduced the problem on a verbatim version of Orbeon Forms, for instance doing some changes to the XForms Hello example (resources/apps/xforms-hello/view.xhtml), and attaching your version to the response, so we can reproduce and investigate the issue here?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

henry821
Hi, Alex,

I still confused about your answer. Could you tell me how to do in detail? Thanks.

Henry
Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

henry821
In reply to this post by Alessandro Vernet
Hi, Alex,
I copied the icons folder from my project into orbeon/WEB-INF/resources/apps/, and I just added a few  elements. But still doesn't work. Here is the view.xhtml from apps/xforms-hello.view.xhtml




Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

Alessandro  Vernet
Administrator
Henry,

I think I see what the problem is: .svg is not our list of extensions considered as "files". Can you try adding it to resources/page-flow.xml in the <files>? You'll let us know if this works for you, and we should probably include svg there out of the box.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

henry821
Hi, Alex,

It works well after adding svg extension in <files path="(?!/([^/]+)/service/).+\.(gif|css|pdf|json|js|coffee|map|png|jpg|xsd|htc|ico|swf|html|htm|txt)"/>(resources/page-flow.xml). Thank you for your help.


Henry
Reply | Threaded
Open this post in threaded view
|

Re: Why the icon svg file can not be loaded in Orbeon 4.10

Alessandro  Vernet
Administrator
Hi Henry,

Great, then I put this in this in, and this change will be in the next release. Thank you for your patience! And for reference, the issue is:

https://github.com/orbeon/orbeon-forms/issues/2434

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet