Hi all, I'm not sure what's happening to my installation of the Flickr module. Here's some background:
- I was getting a MySQL error when installing the Flickr 5.x-1.x module
- The error said something about not being able to create the flickr-users table
- I successfully created the mysql table myself by pasting the create table code into phpmyadmin

I am now getting a strange error message on the node where I have displayed two of the flickr blocks -- recent and random photos. The blocks display correctly, but after i edit the page and then hit refresh, i get either one or two of the following message:

Flickr error 1: User not found
Flickr error 1: User not found

Does anyone know how to remove this?

Comments

drewish’s picture

did you enter a sitewide user id? or did you specify it on the block?

CosmicVoyager’s picture

I also get this error occasionally. I've got a sitewide ID defined, and it works great most of the time, but once in a while the error comes up, and disappears when I refresh the page.

andrewlevine’s picture

If this happens only occasionally what could this be? A bad connection to the database? A temporary problem with flickr?

drewish, any ideas?

karens’s picture

Status: Active » Needs review
StatusFileSize
new755 bytes

I also had this problem, I periodically got the message which disappeared on a refresh. I found the problem. There is an error in the calculation of the random block index number so that it occasionally selects a non-existant index number. For example, if there is one result, the random index must stop at 0, not 1. The attached patch will fix this.

andrewlevine’s picture

great catch. but is there any reason we need to get the intval of a count()-1? I believe count always will return an int.

karens’s picture

I just have gotten into the habit of using intval() so php doesn't treat my math calc as a string, but I didn't test whether it was needed or not.

andrewlevine’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new748 bytes

patch looks right, it works, but i have not been able to confirm that it does or does not fix this bug. I removed the intval, just because it confused me.

drewish, please commit if you think this looks right. thanks KarenS

drewish’s picture

Status: Reviewed & tested by the community » Fixed

looks good, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)
geshan’s picture

I got rid of the user not found error but I cant get a unique photo in the random photos block. It repeats please help..
Geshan