Picasa images not displaying

krisvannest - September 18, 2008 - 19:02
Project:Embedded Media Field
Version:6.x-1.15
Component:Embedded Image Field
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi, have latest 5.x-1.2 release of Embedded Media Field, latest CCK, and latest Drupal 5.10, but Picasa thumbnails and images are not being displayed.

For instance, I want to embedd the following graphic URL that Picasa (web) says to use for linking:

But when I enter that in one of my custom content type's Embedded Media Fields, neither the full image nor the thumbnail show up. However, other service providers, such as Photobucket link at http://img213.imageshack.us/img213/4338/moab094pe2.jpg, do show up (both thumbnail and full), and I can also display the Picasa image via manual URL/HTML in a different field for the same node. Just that the Embedded Media Field doesn't show it.

Any ideas?

#1

krisvannest - October 4, 2008 - 14:04
Version:5.x-1.2» 6.x-1.0-alpha2

Also experiencing the same problem with Embedded Media Field/Embedded Image Field 6.x-1.0-alpha2 with Drupal 6 core... I copy-paste the link right next to the image in Picasa, the link that Picasa says to use (see chain icon field in attached screen grab), but Embedded Media Field reports the following error:

You have specified an invalid media URL or embed code.

Any ideas if Picasa offers an alternate link? I thought maybe I was using the wrong one, but can't find a different one anywhere on my Picasa account for this photo.

thx KV

AttachmentSize
Picture 1.png 30.65 KB

#2

nmridul - October 12, 2008 - 15:37

Subscribing.

I have the same problem. Drupal 6.4, Embedded Media Field 6.x-1.x-dev (2008-Oct-12).

Thanks,
Mridul

#3

MissyM - October 24, 2008 - 05:20

subscribing

#4

squashnut - November 11, 2008 - 02:19
Version:6.x-1.0-alpha2» 6.x-1.0-alpha4

Same problem here. Drupal 6.5, using 6.x-1.0 alpha 4 of Emfield. I'm hoping its user error. E.g., what is the specific format for this field? Is it just the URL for picasa? Or is it special coding, user=username, photoid=photonumber etc.

#5

rightchoice2c_me - November 12, 2008 - 07:12

Hey guys,
Hope every one has solved this picasa image probs, if not then here is the solution for that.
I elapsed this page when I too had the same probs with picasa images but after having a glance on code that use to display picasa images in picasa.inc I realized the format of picasa image URL is different from the one which we are using from picasa site.
picasa's URL : http://picasaweb.google.com/example/MyPics#5267624516262987202
but here in emfield module we need to use it like this:
http://picasaweb.google.com/example/MyPics/photo#5267624516262987202

Work hard to understand what U have to do b4 U start, U may not be able to develop every detail but the more U know the less risk U take.

#6

unitec - November 18, 2008 - 16:28

Your offered solution does not work for me.

#7

rightchoice2c_me - November 19, 2008 - 04:35

It worked fine for me.Are you using alpha release??
It worked fine for me even for 5.x-1.3 release too.
check once there might be some probs with photo-id.

#8

alboletono - November 27, 2008 - 13:31

I had got this issue problem for the alpha4 of D6.

Thank you for your ananlyze, it saves me some time !

I think when this module was written, the format of pictures url was different, like you said.

As far as I can understand, you are filling the CCK embed field with a "corrected" url (you add a /photo in your URL).

If it can help someone, I did the reverse ;) I altered the picasa.inc file to correct some regular expressions. It's pretty simple to do. Just have to search for /photo string and erase it.

It is the same in the D5 module.

I think the author can't do the whole think and didn't see the picasa url evolution.

Hope it will be corrected for further releases.

Thanks to all because this module is doing exactly what I want. I couldn't do as good as it already is !

#9

alboletono - November 27, 2008 - 14:04

OK, forget about my modification.
I thought I couldn't retrieve the picture because my wamp server was behind a proxy but my announced modification can't work.

In fact, I didn't understand that the url you are providing in the CCK field must be the URL provided by picasa. It is located on the right. There is a "link" field and a "insert picture into web page" (sorry for translation, I use picasa in french). So the link to provide is the "link" field provided by picasa and not the link in your web explorer ;)

So we have to keep in mind to provide picture url and not the web page url.
To avoid confusion on my drupal site I will override the error to warn the user to use the appropriate URL.

#10

pietervi - January 13, 2009 - 22:30

Hi,

I also encountered this problem, attached is a patch that allows you to copy the url from the address bar and insert it into the emfield.
Hopefully this will work for most of you, let me know if it doesn't.

Pieter

AttachmentSize
picasa.patch 1.59 KB

#11

pietervi - January 15, 2009 - 20:54

This is the complete picasa.inc.
It includes some other changes regarding the picasa host name.
Please test this is out.

AttachmentSize
picasa.inc_.txt 5.63 KB

#12

jwarner - February 2, 2009 - 18:24

pietervi -

Your picasa.inc_.txt works for me when copying the URL of the image.

What still doesn't work is copying the Embed code from the sidebar (see screenshot).

Right now I'm prototyping - but if I move forward with this implementation I'll update your fix to include support for the embed link, which would only be necessary if Google doesn't guarantee that the URL never changes.

Thanks for the great fix!

AttachmentSize
example.jpg 23.22 KB

#13

DementedManiac - March 16, 2009 - 21:50

Hi Pietervi,

your picasa.inc_txt mod almost works here.

I'm in Australia, and the default picasa url here is picasaweb.google.com.au ( note the .au )
If I manually change the link to remove the .au, it seems to work.

I changed the regex from
define('EMIMAGE_PICASAS_REGEX','!picasaweb\.google\.(.{1,3})/([^/]*)/([^/]*)[/photo]*\#([\d]*)([/]*)!i');
to
define('EMIMAGE_PICASAS_REGEX','!picasaweb\.google\.(.{1,3})\.(.{0,3})/([^/]*)/([^/]*)[/photo]*\#([\d]*)([/]*)!i');

as a test I also changed
function emimage_picasa_embedded_link($code, $data) {
$userid = $data['userid'];
$album= $data['album'];
$photoid= $data['photoid'];

return "http://picasaweb.google.com/$userid/$album#$photoid";
}
to
function emimage_picasa_embedded_link($code, $data) {
$userid = $data['userid'];
$album= $data['album'];
$photoid= $data['photoid'];

return "http://picasaweb.google.com.au/$userid/$album#$photoid";
}

still no luck.

example links:

Link http://picasaweb.google.com.au/lh/photo/japWDAjQ_Zy0UCBsf1_ZKw?feat=dire...
URL http://picasaweb.google.com.au/Sting175/StreziFeb09#5313887297904714258
Embd <table style="width:auto;"><tr><td><a href="http://picasaweb.google.com.au/lh/photo/japWDAjQ_Zy0UCBsf1_ZKw?feat=embedwebsite"><img src="http://lh4.ggpht.com/_z5t1Kc-2ioY/Sb64V-ASIhI/AAAAAAAAABk/3gOzC00Mato/s144/IMG_4300.JPG" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="http://picasaweb.google.com.au/Sting175/StreziFeb09?feat=embedwebsite">Strezi Feb 09</a></td></tr></table>

Thanks,

Dawson

#14

thekenshow - March 22, 2009 - 17:11

I've just run into this problem on Drupal 6.10, all modules up to date. When I test your .inc, I get "You have specified an invalid media URL or embed code." when submitting either of these Picasa slideshow addresses:

* The url in the browser address bar
* The Paste link in email or IM url

If I use the Paste HTML to embed in website url, it's accepted but then shows a broken image that's linked to the slideshow on Picasa.

When I tested with individual Picasa image urls instead of slideshows, the browser url worked but the link and embed urls are rejected as invalid.

#15

mvc - June 12, 2009 - 21:28
Version:6.x-1.0-alpha4» 6.x-1.0

These patches didn't work for me.

Besides the URL format change, I needed to support image from picasaweb.google.es and other domains.

Here's a patch that does work for me.

AttachmentSize
310398.patch 1.71 KB

#16

RAKU - November 2, 2009 - 23:01
Version:6.x-1.0» 6.x-1.15

Hi,

Small patch for latest version:

--- /emfield-6.x-1.15.tar/emfield/contrib/emimage/providers/picasa.inc Tue Sep 29 20:52:05 2009
+++ /emfield/contrib/emimage/providers/picasa.inc Mon Nov 02 23:27:36 2009
@@ -77,6 +77,12 @@

   $data['title'] = $xml['MEDIA:GROUP']['MEDIA:DESCRIPTION'][0];
   $data['original'] = $xml['MEDIA:GROUP']['MEDIA:CONTENT'][1][URL];

+  if(empty($data['original']))
+  {
+ $data['original'] = $xml['http://www.w3.org/2005/Atom']['MEDIA:GROUP']['MEDIA:CONTENT'][1][URL];
+  }

   $data['small'] = $xml['MEDIA:GROUP']['MEDIA:THUMBNAIL'][1][URL];
   $data['medium'] = $xml['MEDIA:GROUP']['MEDIA:THUMBNAIL'][3][URL];
   $data['large'] =  $xml['MEDIA:GROUP']['MEDIA:THUMBNAIL'][5][URL];

I don't known why but sometimes MEDIA:GROUP is twice ... and in this case $data['original'] is empty becouse of different array depth.

--
Best regards

 
 

Drupal is a registered trademark of Dries Buytaert.