Problem with Picasa albums with spaces

General questions on how to do things using Photonic

Problem with Picasa albums with spaces

Postby dionv » 01 Feb 2012, 08:10

I just installed this plugin and it seems promising, however I have encountered an issue, which appears to have been reported by others, but which does not seem to have been explicitly identified as a bug.

If I set Photonic to just display everything, it shows all my albums and the images within. The shortcode is:

Code: Select all
[gallery type='picasa' user_id='my_google_id' kind='album' thumbsize='75']


Most of the albums include spaces in their names, especially the automatically created ones like "Photos from posts" and "Profile photos".

However, if I specify an album that contains a space, it will not display. The shortcode is:

Code: Select all
[gallery type='picasa' user_id='my_google_id' kind='album' album='Photos from posts' thumbsize='75']


I also tested this with my "Random Stuff" album. It would not display until I renamed it to "RandomStuff" and used the new, non-spaced, name in the shortcode.

It's been a long time since I hacked away at code, but it seems to me that there is a bit of a bug in how album names are handled. I know from Unix/Linux that wrapping a variable in single quotes can have problems is there are spaces in the result, but using double quotes says to take the result exactly as presented. Is there something like that for PHP?

Thanks for the great work thus far!

Dion
dionv
 
Posts: 2
Joined: 01 Feb 2012, 07:32

Re: Problem with Picasa albums with spaces

Postby sayontan » 01 Feb 2012, 09:01

This isn't a bug. This is just the way the Google API handles it - I have 0 control over it. Of course, I could make my code strip out all the special characters so that "Santa Cruz, August 2006" becomes "SantaCruzAugust2006", without spaces and commas, but then I might run into other issues. E.g. I can have two albums called "Santa Cruz, August 2006", but Google will internally give the second album a slug "SantaCruzAugust20062". There is no way I can intelligently determine the correct album if you have named both albums the same.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: Problem with Picasa albums with spaces

Postby dionv » 08 Feb 2012, 07:58

Thanks for the quick reply, and sorry for my delay in replying back.

Oddly enough, it seems there have been some changes somewhere in the past few days. Initially when I looked at all of my personally-created album URLs they had numerical slugs. Today, my album URLs all have text slugs.

Unfortunately, my problem seems to persist, even if I use the proper slugs. It's possible I have a plugin conflict, so I will troubleshoot further on a clean test installation and see what happens.

Thanks,

Dion
dionv
 
Posts: 2
Joined: 01 Feb 2012, 07:32

Re: Problem with Picasa albums with spaces

Postby sayontan » 08 Feb 2012, 10:13

dionv wrote: Initially when I looked at all of my personally-created album URLs they had numerical slugs. Today, my album URLs all have text slugs.

Slugs have always been text-based (at least the public-facing ones). They use a variant of the album name by stripping out spaces and special characters, then add a numeric index if the generated slug is not unique. This has been the case since several years.

dionv wrote:Unfortunately, my problem seems to persist, even if I use the proper slugs.

I thought you said in your first post that it was working ("RandomStuff" works but not "Random Stuff")
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas


Return to Support Requests

Who is online

Users browsing this forum: No registered users and 1 guest