Topic: Mobile Version - Gallery XML Not Found

Hi there!

I'm trying to use the SimpleViewer Gallery for the first time. I use it with a TYPO3 website (extensions YAG and YAG Theme Simpleviewer). The desktop version of the galleries work fine, but i have a serious problem with the mobile version:

Everytime i get the same error: Gallery XML not Found.

When i take a look at the code, i see the right URL in flashvars.galleryURL (but it is dynamically, so it's not called "gallery.xml"). But if i copy this URL to the browser, the right XML-file is opened

Could anyone help me? Cause this gallery is great to use with TYPO3 and i will use the PRO Version if i solve this problem!

The link to the current gallery is:
www.lichttonvideo.at/simple

There you can choose one of the 2 galleries

Last edited by precom_rainer (2012-03-14 14:36:29)

Re: Mobile Version - Gallery XML Not Found

The galleryURL for your first gallery is defined as follows:

flashvars.galleryURL = escape("http://www.lichttonvideo.at/simple/?type=89657201&tx_yag_xmllist%5Bcontext75%5D%5BalbumUid%5D=1&tx_yag_xmllist%5Bcontext75%5D%5BgalleryUid%5D=1&tx_yag_xmllist%5BcontextIdentifier%5D=75&tx_yag_xmllist%5Bcontroller%5D=ItemList&cHash=44d70dca2ead6ff35095b7ea812b3ccf");

Are you able to simply point towards the XML file, such as the following?

flashvars.galleryURL="http://www.example.com/gallery/gallery.xml";

If not, try without using the 'escape' function.

Steven Speirs
SimpleViewer Support Team.

Re: Mobile Version - Gallery XML Not Found

No i can't, because there will be several galleries, and i think the XML-file gets build dynamically?!? So the path is different for every gallery....

How can i use it "without the escape-function"?!? Should it look like this?

flashvars.galleryURL = "http://www.lichttonvideo.at/{extlist:uri.action(pageType:'89657201', arguments:'{yag:namespace.gPArray(object:yagContext, arguments: \'albumUid\' ,contextIdentifier: yagContext.identifier)}', pluginName:'xmllist')}";

Edit: with my code, the desktop version doesn't work properly. ALL pictures are shown....and not only the pictures of THIS gallery...

Last edited by precom_rainer (2012-03-14 15:14:12)

Re: Mobile Version - Gallery XML Not Found

Try:

flashvars.galleryURL = "http://www.lichttonvideo.at/simple/?type=89657201&tx_yag_xmllist%5Bcontext75%5D%5BalbumUid%5D=1&tx_yag_xmllist%5Bcontext75%5D%5BgalleryUid%5D=1&tx_yag_xmllist%5BcontextIdentifier%5D=75&tx_yag_xmllist%5Bcontroller%5D=ItemList&cHash=44d70dca2ead6ff35095b7ea812b3ccf";

... as certain characters already look to be escaped.

Steven Speirs
SimpleViewer Support Team.

Re: Mobile Version - Gallery XML Not Found

Nope.....the same problem like my code. ALL pictures are shown.

in the Browser: This code links to a XML-File which is build for the first gallery (only 3 pics inside). So i think i can't get rid of the escape-function and also not of the other code.... sad

Re: Mobile Version - Gallery XML Not Found

BUT this code works for the mobile version big_smile !! But not for the desktop version sad

Re: Mobile Version - Gallery XML Not Found

Perhaps the best course of action would be to contact 'Yag Theme SimpleViewer' help or support.
The plugin was not written by ourselves and the author of the plugin would have a much greater understanding of the code that his plugin generates. The galleryURL that the plugin generates is much more complex than that which would normally be required for a static XML file, such as:

flashvars.galleryURL="gallery.xml";

... or a dynamic XML file generated on-the-fly, for example using PHP, such as:

flashvars.galleryURL="gallery.php?title=test&image=2";

It looks like you can give feedback and report bugs in the plugin using this online form: http://typo3.org/extensions/repository/ … /feedback/

Steven Speirs
SimpleViewer Support Team.

Re: Mobile Version - Gallery XML Not Found

About this variable 'galleryURL', I found that there was a difference in behavior between the flash version and mobile version.
I don't know if this is a bug, but I will indicate this:
when the HTML page which must be displayed in the photo gallery is dynamic, the URL to the XML file seems wrong with the mobile version.

By exemple, I have de dynamic HTML page available with the following URL:

  http://x.y.z.t/projets/www/photos/simplegallery/index.php?action=sv_album&d=/Documents/Emmanuel/tmp/

The content of this page included this:

  <!--START SIMPLEVIEWER EMBED.-->
  <script type="text/javascript" src="../simpleviewer_pro/web/svcore/js/simpleviewer.js"></script>
  <script type="text/javascript">
    var flashvars = {};
    //flashvars.galleryURL = '<?php echo $simple_gallery->getGalleryFileUrl() ?>';
    flashvars.galleryURL = 'gallery.xml';
    var params = {};
    //params.wmode = "transparent";
    var attributes = {};
    attributes.id = "svInstance";
    simpleviewer.ready(function () {
      simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars, params, attributes);
    });
  </script>
  <div id="sv-container"></div>
  <!-- END SIMPLEVIEWER EMBED -->

With the flash version (pro version 2.3.0), the logs of my web server are:

  192.168.1.4 - - [22/Mar/2012:18:20:44 +0100] "GET /projets/www/photos/simplegallery/index.php?action=sv_album&d=/Documents/Emmanuel/tmp/ HTTP/1.1" 200 1193 4723
  192.168.1.4 - - [22/Mar/2012:18:20:44 +0100] "GET /projets/www/photos/simplegallery/style/common.css HTTP/1.1" 200 875 352
  192.168.1.4 - - [22/Mar/2012:18:20:44 +0100] "GET /projets/www/photos/simpleviewer_pro/web/svcore/js/simpleviewer.js HTTP/1.1" 200 115910 940
  192.168.1.4 - - [22/Mar/2012:18:20:46 +0100] "GET /projets/www/photos/simpleviewer_pro/web/svcore/js/swfobject.js HTTP/1.1" 200 10220 392
  192.168.1.4 - - [22/Mar/2012:18:20:46 +0100] "GET /projets/www/photos/simpleviewer_pro/web/svcore/css/simpleviewer.css HTTP/1.1" 200 7221 454
  192.168.1.4 - - [22/Mar/2012:18:20:46 +0100] "GET /projets/www/photos/simpleviewer_pro/web/svcore/swf/simpleviewer_icc.swf HTTP/1.1" 200 79551 31593
  192.168.1.4 - - [22/Mar/2012:18:20:48 +0100] "GET /projets/www/photos/simplegallery/gallery.xml HTTP/1.1" 200 4691 365
  192.168.1.4 - - [22/Mar/2012:18:20:49 +0100] "GET /projets/www/photos/simplegallery/index.php?action=mini&f=/Documents/Emmanuel/tmp/020532019812_web.jpg&c=1&s=70 HTTP/1.1" 200 6631 14088
  ...

it's OK, the XML file has been downloaded, and photos are also downloaded

But with the mobile version (pro version 2.3.0), the logs are:

  192.168.5.2 - - [22/Mar/2012:18:26:26 +0100] "GET /projets/www/photos/simplegallery/index.php?action=sv_album&d=/Documents/Emmanuel/tmp/ HTTP/1.1" 200 1193 4913
  192.168.5.2 - - [22/Mar/2012:18:26:27 +0100] "GET /projets/www/photos/simplegallery/style/common.css HTTP/1.1" 200 875 540
  192.168.5.2 - - [22/Mar/2012:18:26:28 +0100] "GET /projets/www/photos/simpleviewer_pro/web/svcore/js/simpleviewer.js HTTP/1.1" 200 115910 5683726
  192.168.5.2 - - [22/Mar/2012:18:26:35 +0100] "GET /projets/www/photos/simpleviewer_pro/web/svcore/js/swfobject.js HTTP/1.1" 200 10220 627
  192.168.5.2 - - [22/Mar/2012:18:26:37 +0100] "GET /projets/www/photos/simpleviewer_pro/web/svcore/css/simpleviewer.css HTTP/1.1" 200 7221 677
  192.168.5.2 - - [22/Mar/2012:18:26:38 +0100] "GET /projets/www/photos/simplegallery/index.php?action=sv_album&d=/Documents/Emmanuel/tmp/gallery.xml HTTP/1.1" 200 1204 4374

The URL of the XML file is not at all the same (eg. last line): it is built by concatenating the value of the galleryURL variable with the URL of the HTML file.
The XML file can not be downloaded.

In case the XML file is dynamically created on the fly, the XML file URL may look like this:

192.168.5.1 - - [22/Mar/2012:18:20:01 +0100] "GET /projets/www/photos/simplegallery/index.php?action=sv_album&d=/Documents/Emmanuel/tmp/index.php%3Faction%3Dsv_gallery%26d%3D%2FDocuments%2FEmmanuel%2Ftmp%2F HTTP/1.1" 200 1287 4804

Regards,
Emmanuel

Re: Mobile Version - Gallery XML Not Found

@emmanuel

the URL to the XML file seems wrong with the mobile version

Does it actually work, though? If not, are you able to post a URL to the gallery in question so that we can take a look?

Steven Speirs
SimpleViewer Support Team.

Re: Mobile Version - Gallery XML Not Found

I just copied a subset of the site on an external server, which was not the case so far.
An exemple is available from:
http://richard.charvet.free.fr/www/phot … photos/tmp

The hosting solution is a bit cheap; the server is performing poorly.
I hope you can see more clearly.

Regards,
Emmanuel

Re: Mobile Version - Gallery XML Not Found

Looking at the source of your page in a browser, the galleryURL is defined as follows:

flashvars.galleryURL = 'index.php%3Faction%3Dsv_gallery%26d%3D%2Fphotos%2Fsimplegallery%2Findex.php%3Faction%3Dsv_album';

It looks like your PHP code is URL-encoding the galleryURL.
Try setting the galleryURL without URL-encoding.

Steven Speirs
SimpleViewer Support Team.

Re: Mobile Version - Gallery XML Not Found

Thank you for your quick response.
But I think the problem is another.
Indeed, after modifying my script to use a static value for the galleryURL variable, the problem remains.

From the same link:

http://richard.charvet.free.fr/www/photos/simplegallery/index.php?action=sv_album&d=/www/photos/tmp

you have access to the new script in which the variable is now set to:

flashvars.galleryURL = 'gallery.xml';

It is the url generation of the gallery.xml file that seems wrong, with the mobile version of SimpleViewer (see my first post).


With the flash version, simpleviewer launches the download request:

http://richard.charvet.free.fr/www/photos/simplegallery/gallery.xml

and it works fine.

But with the mobile version, simpleviwer launches the request:

http://richard.charvet.free.fr/www/photos/simplegallery/index.php?action=sv_album&d=/www/photos/tmp/gallery.xml

which is not good.

Regards,
Emmanuel

Re: Mobile Version - Gallery XML Not Found

The problem stems from the use of your query string in the URL of your page in the generation of the full galleryURL when it is defined using a relative URL.
Try setting the galleryURL using an absolute URL such as:

flashvars.galleryURL="http://richard.charvet.free.fr/www/photos/simplegallery/gallery.xml";
Steven Speirs
SimpleViewer Support Team.

Re: Mobile Version - Gallery XML Not Found

Yes.

After sending my last message, by reading the simpleviewer support pages, I saw that I could use the variable baseURL.
A workaround of the problem described above is to use this variable baseURL.
In order not to put the server address in hard in my php script, and thus maintain the principle of relative URL, this baseURL variable is set with this instruction:

flashvars.baseURL = '<?php echo dirname( $_SERVER['SCRIPT_NAME'] ) ?>';

This change fixes the problem of the download URL of the XML file.
See this link for example, with a static value for the variable galleryURL:

http://richard.charvet.free.fr/www/photos/simplegallery/index.php?action=sv_album&d=/www/photos/tmp/

But now I'm faced with another problem: the encoding of the galleryURL variable value.

With no encoding value:

flashvars.galleryURL = 'index.php?action=sv_gallery&d=/www/photos/tmp/'

simpleviewer works with the mobile version, but don't work with flash version
An example is here:

http://richard.charvet.free.fr/www/photos/simplegallery2/index.php?action=sv_album&d=/www/photos/tmp/

With HTML entities encoding:

flashvars.galleryURL = 'index.php?action=sv_gallery&amp;d=/www/photos/tmp/';

sompleviwer don't work with the mobile version and the flash version
An example is here:

http://richard.charvet.free.fr/www/photos/simplegallery3/index.php?action=sv_album&d=/www/photos/tmp/

With URL encoding:

flashvars.galleryURL = 'index.php%3Faction%3Dsv_gallery%26d%3D%2Fwww%2Fphotos%2Ftmp%2F';

simple viewer works with the flash version, but don't work with the mobile version
An example is here:

http://richard.charvet.free.fr/www/photos/simplegallery4/index.php?action=sv_album&d=/www/photos/tmp/

It is difficult to have both versions that work simultaneously.

Is the only solution is to force the use of javascript version whatever the terminal type (mobile and desktop browser) ?

Regards,
Emmanuel

Re: Mobile Version - Gallery XML Not Found

More specifically, it may be due to your use of slashes in your query string.
According to section 3.4 of this document: http://www.ietf.org/rfc/rfc2396.txt

Within a query component, the characters ";", "/", "?", ":", "@",
   "&", "=", "+", ",", and "$" are reserved.

Are you able to substitute the slashes in your query string with a non-reserved character to see if this works?

Is the only solution is to force the use of javascript version whatever the terminal type (mobile and desktop browser) ?

If substituting the slashes does not help, then, other than using absolute URLs, your suggestion quoted above may be the only other solution.

Steven Speirs
SimpleViewer Support Team.

Re: Mobile Version - Gallery XML Not Found

Yes, I think you're right.
It should be using this slash character which makes trouble.
Thank you for your feedback.
I must change my scripts, and will inform you if this has solved my problems.
Thank you.

Regards,
Emmanuel