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?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | block_rand.patch.txt | 748 bytes | andrewlevine |
| #4 | flickr_block.module_0.patch | 755 bytes | karens |
Comments
Comment #1
drewish commenteddid you enter a sitewide user id? or did you specify it on the block?
Comment #2
CosmicVoyager commentedI 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.
Comment #3
andrewlevine commentedIf this happens only occasionally what could this be? A bad connection to the database? A temporary problem with flickr?
drewish, any ideas?
Comment #4
karens commentedI 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.
Comment #5
andrewlevine commentedgreat catch. but is there any reason we need to get the intval of a count()-1? I believe count always will return an int.
Comment #6
karens commentedI 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.
Comment #7
andrewlevine commentedpatch 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
Comment #8
drewish commentedlooks good, committed.
Comment #9
(not verified) commentedComment #10
geshan commentedI 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