SVG images with Viewport

57 views
Skip to first unread message

Roman Serazhiev

unread,
May 15, 2014, 8:10:18 PM5/15/14
to scroll-vi...@googlegroups.com
Hi,

I am in the process of creating the error page (error.vm), and for some reason the image in SVG format is not displaying:


When I try to use JPG or PNG, it works.


Is there a limitation with Viewport/Velocity for SVG or me doing something wrong?


Thanks.

Cheers,

Roman.


Stefan Kleineikenscheidt (K15t Software)

unread,
May 25, 2014, 12:16:25 PM5/25/14
to scroll-vi...@googlegroups.com

Hi Roman,

looks like you are referencing a local file, which doesn't work in browsers - no?

-Stefan



On Thu, May 22, 2014 at 10:06 PM, Roman Serazhiev <roman.s...@catchsoftware.com> wrote:
Hi Stefan,

Thank you for your reply.

Here is the code of the div I am using to display SVG:

<div id="container">
  <div class="main">
<div class="content">
<div class="whale">
<img src="${theme.baseUrl}/img/interface/whale.svg">
<div class="msg">
<h2>Oops! It looks like that page doesn't exist.</h2>
<p>If you think a link is broken please <a href="">let us know</a> and we'll get onto it as soon as possible.<br>In the meantime, either hit the                              back button or try a search.</p>
</div>
</div>
</div>
  </div>
</div>

If I right click on the missing image in browser and press "open in a new tab" it downloads the SVG and if I open it, it opens Chrome with SVG:




I don't this page create in Confluence, it only exists in Viewport FTP directory.

Please let me know if you need any more information.

Cheers,
Roman.




Roman Serazhiev
Solutions Specialist
Catch Software

Enterprise Tester 4.10 - Introducing Rover for Mobile and Offline Testing


On Fri, May 23, 2014 at 3:05 AM, Stefan Kleineikenscheidt (K15t Software) <ste...@k15t.com> wrote:

Hi Roman,

How are you including the SVG file? Does it work when you look at the page with the SVG image in Confluence? What happens when you right-click on the image and do "open image in new tab"? Which Confluence version are you on?

I've just tested it locally and it works fine (beside the fact, that the Confluence editor does handle the SVG file as an image, and I had to use the source editor).

Cheers,
-Stefan




--
You received this message because you are subscribed to the Google Groups "Scroll Viewport Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scroll-viewport...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



Roman Serazhiev

unread,
May 25, 2014, 4:08:00 PM5/25/14
to scroll-vi...@googlegroups.com
Hi Stefan,

Thanks for the reply!

Well, it works if I right-click on it. Also, this exact image works on a front-end website, where I take all the code from:


Can you maybe send me an example SVG that works for you with Viewport? I will try inserting it in the code. If it works with your image, then there is something wrong with mine.


Cheers,

Roman.

Stefan Kleineikenscheidt (K15t Software)

unread,
May 25, 2014, 4:14:26 PM5/25/14
to Roman Serazhiev, scroll-vi...@googlegroups.com

Hi Roman,

It's attached here, although I believe it is not about the SVG format.

Can you post the HTML that is outputted by Scroll Viewport? (and the URL)

Thanks,
-Stefan



Svg_example3.svg

Stefan Kleineikenscheidt (K15t Software)

unread,
May 26, 2014, 2:22:22 AM5/26/14
to scroll-vi...@googlegroups.com

Hi Roman,

I think I understand the issue know: SVGs don't work when they in the theme. Here is the issue: https://k15t.jira.com/browse/VPRT-208 Fix will be implemented soon.

About the error: What does the log file say?  (Can you create a separate email thread for that, please?)

Cheers,
-Stefan



On Sun, May 25, 2014 at 11:36 PM, Roman Serazhiev <roman.s...@catchsoftware.com> wrote:
Hi again Stefan,

I have tried to implement the same code for the error page in another environment, I just can't do it at all.

I always have Server error 404, and no code is pulling our from error.vm:



Do you know the reason for this? The same code (I have moved not just error.vm, but the whole theme) works on another server, but doesn't on this one.

Cheers,
Roman.


Roman Serazhiev
Solutions Specialist
Catch Software

Enterprise Tester 4.10 - Introducing Rover for Mobile and Offline Testing


On Mon, May 26, 2014 at 9:13 AM, Roman Serazhiev <roman.s...@catchsoftware.com> wrote:
Hi Stefan,

I didn't include the Google Group in my reply just in case the code includes some sensitive info.

Here is the HTML code from the Chrome inspector:

[removed]

Your SVG also doesn't work. I have other images (.png) in that folder in Viewport FTP, so I just change the name of the image, and it works straight away.
We are using domain name with Viewport, but SVG is not displayed even when I am accessing Confluence URL without Domain name.

It would be great if you could point on what is wrong. Meanwhile, I will try to implement the same code on our other environment.

Cheers,
Roman.

Roman Serazhiev
Solutions Specialist
Catch Software

Enterprise Tester 4.10 - Introducing Rover for Mobile and Offline Testing


Reply all
Reply to author
Forward
0 new messages