WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Shashin] Error message with widgets (30 posts)

  1. webbert
    Member
    Posted 5 years ago #

    Hi

    Im using WP 2.7 and Shashin 2.3.5

    I get a error message with some of the widgets
    Like the "random images"

    Warning: Invalid argument supplied for foreach() in xx/xx/xx/wp-content/plugins/shashin/ShashinWidget.php on line 108

    Any idea of how i can fix this?

  2. Mike Toppa
    Member
    Posted 5 years ago #

    Hi - that foreach statement is looping over a list of your albums. Have you added any of your Picasa albums to Shashin? Follow the Shashin link under your Tools menu - that's where you can load your Picasa albums into Shashin.

  3. hoppylorinc
    Member
    Posted 4 years ago #

    Hi

    I am using WP 2.7.1 and Shashin 2.4.1

    None of the widgets are working for me. The codes are ok on pages but I got this error message in the place of widgets.

    Shashin Error: unable to retrieve albums.

    When adding the code suggested directly to sidebar.php, I got this:

    <!--
    Fatal error: Call to undefined method Shashin::getalbumlist()

    Am I doing anything wrong?

  4. Mike Toppa
    Member
    Posted 4 years ago #

    Hi - I'm not sure why the widgets aren't working for you. Is it all of them or just some of them? I have tested them with WP 2.7.1 and WP 2.8. Could you let me know which widget you tried, and what settings you used?

    It looks like I accidently removed the getalbumlist() wrapper function in the latest version of Shashin. I will add it back and upload a fixed version.

    Mike T

  5. hoppylorinc
    Member
    Posted 4 years ago #

    Hi, thanks for the reply. Single Image, Image Thumbnails seems ok, Random, Newest, Albums Thumbs are broken.
    Looking forward for the fixed version.

  6. Mike Toppa
    Member
    Posted 4 years ago #

    Hi - I just uploaded Shashin 2.4.2 to wordpress.org - the Shashin::getAlbumList() function should work for you now. But I don't know why some of the widgets aren't working for you - I'm not aware of a problem with them. I'd like to see a screenshot of your widget admin page, so I can see exactly how you're using them and then try to reproduce it. Can you upload a screenshot somewhere I can see it?

  7. zer0efx
    Member
    Posted 4 years ago #

    Afternoon! Thanks for upgrading this and getting it ready for 2.8

    After Installing and attempting to add Albums, I get this error
    ShashinAlbum::setUserAlbums - Failed to insert database record for album ID 2147483647. Possible SQL Error:

  8. zer0efx
    Member
    Posted 4 years ago #

    Hi again, sorry for the double post, I also just tried to target a specific album in the Tools menu and I get this error
    ShashinAlbum::setAlbum - Failed to insert/update database record for album. SQL Error:

    I'll try to uninstall and reinstall and see if that works. Thanks for the great plugin though! I've been looking for a good one to post my albums!

  9. Mike Toppa
    Member
    Posted 4 years ago #

    Hi - let's take a look at the database insert query that's failing. If you don't mind a little code editing, please go to line 251 in ToppaWPFunctions.php (in your shashin plugin folder). Add this line immediately before the "return" line:

    var_dump($sql);
    exit;

    Then try to add just one album again. It should then spew a SQL statement to your screen. Please copy and paste it here so I can take a look.

  10. zer0efx
    Member
    Posted 4 years ago #

    Sorry for the late response.. Here it is:

    string(516) "insert into wp_shashin_album (album_id,user,name,link_url,title,description,location,cover_photo_url,photo_count,pub_date,geo_pos,include_in_random,last_updated) values (5347326438288378193,'TravelingWebGuy','HikeBehindMyApartments','http://picasaweb.google.com/TravelingWebGuy/HikeBehindMyApartments','Hike Behind my Apartments','','Tierrasanta California','http://lh4.ggpht.com/_CWScU39hW10/SjWFEHQ7yVE/AAAAAAAAAO8/TP26rilBWBo/s160-c/HikeBehindMyApartments.jpg',29,1244962800,'32.82917 -117.10278','Y',1245703401);"

  11. Mike Toppa
    Member
    Posted 4 years ago #

    I tested your SQL statement, and it worked fine for me, so it's not a syntax problem. Let's see if we can get a message from your database as to why it's failing for you. Please go to line 251 again in ToppaWPFunctions.php and remove the lines you added before. Then make it look like this:

    // return $wpdb->query($sql);
    var_dump($wpdb->query($sql));
    $wpdb->print_error();
    exit;

    So you're commenting out the "return" line that's there, and then adding 3 lines that should tell us why the database insert is failing. Then try to add the album again, and copy-and-paste the output here.

  12. zer0efx
    Member
    Posted 4 years ago #

    Thanks, I added new the code in and this is what is returned:
    bool(false)

  13. zer0efx
    Member
    Posted 4 years ago #

    Hey dude, I just figured it out.. I have MySQL 4.0 on the server. Going to update to 5 and import the other tables.

    Sorry for not checking that first man!

    Cheers for all the help!

  14. zer0efx
    Member
    Posted 4 years ago #

    Upgraded and now it works exactly how it should! w00t!

    Thanks again!

  15. Mike Toppa
    Member
    Posted 4 years ago #

    I'm glad you got it working. Your mySQL version should have been the first thing I asked; sorry for not thinking of it. For anyone else following this, Shashin requires mySQL 4.1 or higher, as listed on my Shashin page.

  16. ejc10000
    Member
    Posted 4 years ago #

    I tried to add an individual album and I am getting the same error reported above. However I am using the correct version of mySQL.

    ShashinAlbum::setAlbumPhotos - Failed to insert record for photo ID 2147483647. SQL Error:

    WordPress:2.8.4
    mySQL:5.0.51b
    Shasin:2.4.2

    Any help would be appreciated.

    Thanks

  17. Mike Toppa
    Member
    Posted 4 years ago #

    Hi - A few other people have reported this error since the release of Shashin 2.4, and they've all been running WordPress on Windows. Are you on Windows? I don't have a Windows server and so far no one running Windows has been able to help me debug. I'll be happy to work with you on this if you're up for adding some debugging code to your copy of Shashin.

  18. mark123456
    Member
    Posted 4 years ago #

    hi
    does this mean that i have bad luck if my provider only gives me mySQL version 4.0?
    or is there a workaround so that i can use this plugin?
    thanks
    mark

  19. Mike Toppa
    Member
    Posted 4 years ago #

    Hi Mark - go to ToppaWPFUnctions.php and comment out lines 245-248. The "on duplicate key update" syntax was introduced in mySQL 4.1. In doing this you'll lose the ability of Shashin to accommodate photos being moved from one album to another. As long as you don't move photos between albums, you'll be ok. I'm pretty sure that's the only 4.1 specific code, but if you run into something else, post a follow-up.

  20. mark123456
    Member
    Posted 4 years ago #

    hi toppa,
    thanks for the tip.
    I commented it but unfortunately still have the error when I try to add an album.

    ShashinAlbum::setUserAlbums - Failed to insert database record for album ID 2147483647. Possible SQL Error:

    Is there anything else I can do?

  21. Mike Toppa
    Member
    Posted 4 years ago #

    Hi Mark - sorry for the late reply. I'm guessing you're running into the same problem zer0efx ran into (above). But he upgraded his mySQL before we got to the bottom of the problem. If you have a mySQL browser like phpMyAdmin, browse the wp_shashin_album table and look for a record with the album ID you see in the error message. It may be that it's trying to insert a record that's already there, and it's failing since the "on duplicate key update" option isn't available (but it shouldn't be relying on that in this case - if it is, then there's a problem in my code).

  22. aleli.maldonado
    Member
    Posted 4 years ago #

    Hi toppa, I´m using WordPress 2.8.1. so Shashin is included,but this error appears:

    Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /www/blogsterceros/htdocs/wordpress/wp-includes/class-snoopy.php on line 1142

    Warning: fsockopen() [function.fsockopen]: unable to connect to sededecana:80 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /www/blogsterceros/htdocs/wordpress/wp-includes/class-snoopy.php on line 1142
    Support Shashin » Shashin Help
    Shashin

    ShashinAlbum::setUserAlbums - Failed to parse album feed.

    Any help would be appreciated.

  23. asaf.bendor
    Member
    Posted 4 years ago #

    Hello toppa

    I am using wp 2.8.4 and Shashin 2.4.2 for a long time, with mySQL 5.0 in 3-4 different web sites.

    I have just seen that after adding new albums to picasa, they don't Sync at all with your pluging, not just daily but not at all - I checked the -Sync all albums daily, and i don't have several hundered albums (i have less then 10 with less then 20 pic each)

    I haven't change anything, would be happy if you could check this out.

    One of my site is @ http://www.ido.signin.co.il/pic/

    Thank you,
    Asaf

  24. Mike Toppa
    Member
    Posted 4 years ago #

    Hi aleli - You should be trying to connect to a picasa server - from your error message, it looks like you're trying to connect to something called "sededecana"

  25. Mike Toppa
    Member
    Posted 4 years ago #

    Hi asaf - could you try going to the Shashin tools page and clicking the "sync" icon for one of your albums? If you get an error message, please post it here.

    Also, are you saying that the automatic daily syncing is working for albums you added before, but not for new albums, or something else? Did the problem start after upgrading from the previous version of Shashin?

  26. asaf.bendor
    Member
    Posted 4 years ago #

    Hey toppa - I press the sync icon for one of my albums and get the - Album synchronized. message (no error...)

    As you write - the automatic daily syncing is working for albums I added before, but not for new albumsץ.

    I can't say when it started, I have just notice that in the last two weeks.

    Do you need my login pass in order to deep check ?

  27. Mike Toppa
    Member
    Posted 4 years ago #

    Hi asaf - when you clicked the sync icon, did it successfully sync the album, or did it fail but not report an error? Can you try the following:

    * click the sync button for a new album, and check if it's succesful,
    * click the sync button for an old album and check if it's successful
    * then click the "sync all" button and check if it's successful

    I haven't heard of this problem before, so I'm trying to determine the scope of the syncing problem you're having.

  28. asaf.bendor
    Member
    Posted 4 years ago #

    Hi toppa

    I try your things with no luck:

    *click the sync button for an old album -it give the message- Album synchronized... but actually he didn't sync the album

    *click the "sync all" button - it give the message - All albums synced for... but actually he didn't sync all albums

    *click the sync button for a new album - i can't do it because he doesn't show me the new albums

    If you need my user ID and password in order to check this closer, give me your mail address. i would be happy if you could check that out.

    Thank you,
    Asaf

  29. asaf.bendor
    Member
    Posted 4 years ago #

    hey

    Had a mistake, when i click the sync button for an old album -it give the message- Album synchronized... and DID SYNC THE ALBUM SUCCESSFULLY

  30. Mike Toppa
    Member
    Posted 4 years ago #

    Hi asaf - sorry for the late reply. If you're still out there, use the contact form on my web site - http://www.toppa.com/contact - and I'll email you back (I'll be quicker next time).

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags