Topic: Mobile, galleryURL

For some reason the mobile version gives the following error:  "Gallery XML Not Found."  While the flash version has no problem finding the XML.

<!--START SIMPLEVIEWER EMBED.-->

<script type="text/javascript">
var svCoreURL = '../scripts/simpleviewer/svcore/';
</script>

<script type="text/javascript" src="../scripts/simpleviewer/svcore/js/simpleviewer.js"></script>

<script type="text/javascript">
var flashvars = {};
flashvars.galleryURL = "xml.php?ssid=39";
var params = {};
params.wmode = "transparent";
var attributes = {};
attributes.id = "svInstance";
$(document).ready(function () {
SV.simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars, params, attributes);
});
</script>       

<div id="sv-container"></div>

<!-- END SIMPLEVIEWER EMBED -->

Re: Mobile, galleryURL

You can view it here:

http://smdev.orthodoxws.com/public/sv/g … hp?ssid=40

Last edited by orthodoxws (2010-10-12 02:27:00)

Re: Mobile, galleryURL

If you take your dynamically generated XML, save it as an XML file and load that instead does it work?

Mike Richards
SimpleViewer Support Team.

Re: Mobile, galleryURL

No, the static XML does not work either.  I've tried the default filename, gallery.xml, as well as a custom name.

Re: Mobile, galleryURL

For kicks try setting your galleryURL to be an absolute URL.

flashvars.galleryURL = "http://smdev.orthodoxws.com/public/sv/xml.php?ssid=40";
Mike Richards
SimpleViewer Support Team.

Re: Mobile, galleryURL

Just tried it.  No go.

Re: Mobile, galleryURL

Hmm absolute URLs have been the fix for other mobile issues so it was worth a try... and you just downloaded SimpleViewer 2.1.0 recently right? There was an issue during beta with the mobile viewer not reading the galleryURL var, but that was fixed.

I just setup a base install on my test server with the svCore folder in a similar location as you have it and everything seems to work fine... if you use the gallery.xml and the thumb and image folders that come in the web folder of the download to your gallery folder does it work?

Mike Richards
SimpleViewer Support Team.

Re: Mobile, galleryURL

I have:

flashvars.galleryURL = "http://smdev.orthodoxws.com/public/sv/gallery.xml";

The default gallery.xml as well as the thumb and image folders from the web directory are in place.  The gallery loads just fine with flash but same problem with the mobile.

Re: Mobile, galleryURL

The problem seems to be:

var svCoreURL = '../scripts/simpleviewer/svcore/';

When I removed this and placed the svcore directory in its default location it worked.

Re: Mobile, galleryURL

Actually, it only worked when gallery.xml was in its default location as well.  The following still gives the XML not found error.

flashvars.galleryURL = "http://smdev.orthodoxws.com/public/sv/xml.php?ssid=40";

Re: Mobile, galleryURL

After you made that change the gallery is viewable on my Palm Pre, try clearing your cache, so the XML data gets updated. The issue must have something to do with xml.php?ssid=40, maybe try xml.php%3Fssid%3D40.

Mike Richards
SimpleViewer Support Team.

Re: Mobile, galleryURL

Actually, the problem appears to be in the XML itself.  I tried the following and it failed:

<image imageURL="images/wide.jpg" thumbURL="thumbs/wide.jpg" linkURL="" linkTarget="" >
    <caption><![CDATA[Welcome to <u><a href="http://www.simpleviewer.net/simpleviewer/pro" target="_blank">SimpleViewer-Pro</a></u>.]]></caption>   
</image>
<image imageURL="images/tall.jpg" thumbURL="thumbs/tall.jpg" linkURL="" linkTarget="" >
    <caption>SimpleViewer-Pro allows you to customize SimpleViewer to your own requirements.</caption>   
</image>
<image imageURL="images/wide.jpg" thumbURL="thumbs/wide.jpg" linkURL="" linkTarget="" >
    <caption>SimpleViewer-Pro has no branding or download link.</caption>   
</image>
<image imageURL="images/tall.jpg" thumbURL="thumbs/tall.jpg" linkURL="" linkTarget="" >
    <caption><![CDATA[Easily build galleries by using <u><a href="http://www.simpleviewer.net/simpleviewer/pro/support/svbuilderpro/" target="_blank">svBuilder-Pro</a></u>. No Flash® IDE needed.]]></caption>   
</image>
<image imageURL="images/wide.jpg" thumbURL="thumbs/wide.jpg" linkURL="" linkTarget="" >
    <caption><![CDATA[Over 150 Additional <u><a href="http://www.simpleviewer.net/simpleviewer/pro/support/pro_options.html" target="_blank">Pro Customization Options</a></u> available.]]></caption>   
</image>
<image imageURL="images/tall.jpg" thumbURL="thumbs/tall.jpg" linkURL="http://www.simpleviewer.net" linkTarget="_blank" >
    <caption>SimpleViewer-Pro supports Universal Playback and can be viewed on Windows, Mac, Linux, iPhone, iPad and Android. Try it and see!</caption>   
</image>
<image imageURL="images/wide.jpg" thumbURL="thumbs/wide.jpg" linkURL="" linkTarget="" >
    <caption><![CDATA[For SimpleViewer-Pro support and documentation, view the <u><a href="http://www.simpleviewer.net/simpleviewer/pro/support" target="_blank">SimpleViewer-Pro Support Page</a></u>.]]></caption>   
</image>
<image imageURL="images/tall.jpg" thumbURL="thumbs/tall.jpg" linkURL="" linkTarget="" >
    <caption></caption>   
</image>   
<image imageURL="images/wide.jpg" thumbURL="thumbs/tall.jpg" linkURL="" linkTarget="" >
    <caption></caption>   
</image>
<image imageURL="images/tall.jpg" thumbURL="thumbs/tall.jpg" linkURL="" linkTarget="" >
    <caption></caption>   
</image>


Then I tried the following and it worked!


<image imageURL="images/wide.jpg" thumbURL="thumbs/tall.jpg" linkURL="" linkTarget="" >
    <caption></caption>   
</image>
<image imageURL="images/tall.jpg" thumbURL="thumbs/tall.jpg" linkURL="" linkTarget="" >
    <caption></caption>   
</image>

Re: Mobile, galleryURL

Ok, see that's strange I was thinking that you might run into a problem with the way you were trying to declare your thumbnails, but the error you were getting was a XML not found issue not a XML parsings issue... must be an issue with how the errors are caught.

Mike Richards
SimpleViewer Support Team.

Re: Mobile, galleryURL

When I open http://smdev.orthodoxws.com/public/sv/gallery.xml in a browser it says: "error on line 42 at column 20: Encoding error". Looks like the XML got munged somehow. Try re-uploading it.

Felix Turner
SimpleViewer Support Team.

Re: Mobile, galleryURL

Okay, now I am really stumped.

I took out the thumbURL and tried: 

flashvars.galleryURL = "http://smdev.orthodoxws.com/public/sv/xml.php?ssid=40";

This yields "Gallery XML Not Found." in mobile.

Then I copied and pasted the XML found in xml.php?ssid=40, pasted it into gallery.xml, and changed to:

flashvars.galleryURL = "http://smdev.orthodoxws.com/public/sv/gallery.xml";

And it worked in mobile.

You can see the same exact XML in both:

http://smdev.orthodoxws.com/public/sv/xml.php?ssid=40
http://smdev.orthodoxws.com/public/sv/gallery.xml

Then I tried taking the code generated by xml.php?ssid=40, and pasting it into gallery2.php, and it yielded "Gallery XML Not Found." in mobile.

So basically, it seems that the mobile version cannot load a file with a php extension even though its contents are the exact same as a file with an xml extension.

The problem is that I need a dynamic xml file.

Re: Mobile, galleryURL

It seems than  I get the same issue here  : http://www.simpleviewer.net/forum/viewt … p?id=11408

;-)

Re: Mobile, galleryURL

currently this URL: http://smdev.orthodoxws.com/public/sv/g … hp?ssid=40 works in flash and mobile players.

Can you upload the version that uses the PHP galleryURL so I can take a look?

Felix Turner
SimpleViewer Support Team.

Re: Mobile, galleryURL

Yes, it was working because I had the galleryURL set to a static XML file.  Now it is set to:

    <!--START SIMPLEVIEWER EMBED.-->
   
        <script type="text/javascript" src="../scripts/simpleviewer/svcore/js/simpleviewer.js"></script>
       
        <script type="text/javascript">
        var flashvars = {};
        flashvars.galleryURL = "http://smdev.orthodoxws.com/public/sv/xml.php?ssid=40";
        var params = {};
        params.wmode = "transparent";
        var attributes = {};
        attributes.id = "svInstance";
        $(document).ready(function () {
        SV.simpleviewer.load("sv-container", "100%", "100%", "333333", true, flashvars, params, attributes);
        });
        </script>       

        <div id="sv-container"></div>
        <!-- END SIMPLEVIEWER EMBED -->

Re: Mobile, galleryURL

Please set 'useFlash' to false on your test page (5th parameter on load() function).

Felix Turner
SimpleViewer Support Team.

Re: Mobile, galleryURL

Okay, useFlash is set to false.  "Gallery XML Not Found."

Re: Mobile, galleryURL

There appears to be some strange encoding going on in the PHP version that is causing the mobile player to choke on the CDATA tags.

If I open this URL directly in Google chrome, no characters show: http://smdev.orthodoxws.com/public/sv/xml.php?ssid=40
If I open this URL directly in Google chrome, I see the caption text: http://smdev.orthodoxws.com/public/sv/gallery.xml

Try changing the content-type on the php version to be 'application/xml'. Also check the encoding is 'UTF-8'.

Felix Turner
SimpleViewer Support Team.

Re: Mobile, galleryURL

Awesome!  That did it!

header ("Content-Type:application/xml");

Re: Mobile, galleryURL

Thank you so much!  This is a great piece of software you've created, and your support is excellent!