Download & Extend

Importing existing album didn't import photos.

Project:Picasa
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

First of all, congrats on such a nice module, the idea is great.

I am trying to use it but when I import an existing album from Picasa, which is a very nice feature, the albums get listed perfectly, I select the one I would like to import, but no photos are imported, so the node is created showing just the album title, location and description and I get an error with the query inserting information on picasa_gphoto.

I've looked into it and removing the quotes from the %s on like 88 of picasa.module solves the issue, so the _picasa_insert_gphoto function now looks like this, for me:

function _picasa_insert_gphoto($node, $data){
  $sql = 'INSERT INTO {picasa_gphoto} (nid, id, name, location, access, timestamp, '.
    'numphotos, numphotosremaining, bytesused, user, nickname, commentingenabled, '.
    'commentcount ) VALUES (%d, "%s", "%s", "%s", "%s", %d, %d, %d, %d, "%s", "%s", '.
    '%s, %d)';
  db_query($sql, $node->nid, $data->gphoto['id'], $data->gphoto['name'],
    $data->gphoto['location'], $data->gphoto['access'],
    _picasa_time($data->gphoto['timestamp'], 'timestamp'), $data->gphoto['numphotos'],
    $data->gphoto['numphotosremaining'], $data->gphoto['bytesused'], $data->gphoto['user'],
    $data->gphoto['nickname'], $data->gphoto['commentingenabled'], $data->gphoto['commentcount']
  );
}

The problem was that the commentingenabled field was a tinyint (for a boolean), and the module was passing "true" with the quotes, as a string.

So, if you could include this change on your next release, it would be a great help.

Thanks again for the module, it's getting really good.

Comments

#1

for me the quick and dirty solution in theme_picasa_image function (line 572 on picasa.module)
   $output = '<img src="'. str_replace("?imgmax=Array","",$image) .'" />';
did it.
I don't know where this problem comes from.
Does anybody know how to debug?

#2

Esperante: Agordu "Google AJAX Feed API Key". Tio helpis al mi.
---
Set "Google AJAX Feed API Key". it heled me.

nobody click here