• Resolved ggdesigns

    (@ggdesigns)


    After loading a ton of images I get this warning message when I try to get to my portfolio in the admin:

    Warning: Invalid argument supplied for foreach() in /usr/home/tamisart/public_html/wp/wp-content/plugins/responsive-portfolio/responsive-portfolio.php on line 210

    and this warning displays on the public page:

    Warning: Invalid argument supplied for foreach() in /usr/home/tamisart/public_html/wp/wp-content/plugins/responsive-portfolio/responsive-portfolio-short-code.php on line 179

    It was working fine and then all of the sudden when I went to save after loading a bunch more images, I lost it all. WTH?

    https://wordpress.org/plugins/responsive-portfolio/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter ggdesigns

    (@ggdesigns)

    I tried deactivating and deleting the plugin and then re-installing it. Same problem. I don’t know if this helps but this is the foreach code the warning references in responsive-portfolio.php:

    /* load saved photos into gallery */
        if($TotalImages) {
            foreach($rpg_all_photos_details as $rpg_single_photos_detail) {
                $name = $rpg_single_photos_detail['rpg_image_label'];
                $url = $rpg_single_photos_detail['rpg_image_url'];
                ?>

    And this is the foreach code the other warning references that’s in responsive-portfolio-short-code.php:

    /**
    				 * Get All Photos from Gallery Post Meta
    				 */
    				$rpg_all_photos_details = unserialize(get_post_meta( get_the_ID(), 'rpg_all_photos_details', true));
    				//print_r(($rpg_all_photos_details)); echo "<br><br>";
    				$TotalImages =  get_post_meta( get_the_ID(), 'rpg_total_images_count', true );
    				$i = 1;
    
    				foreach($rpg_all_photos_details as $rpg_single_photos_detail) {
    					$name = $rpg_single_photos_detail['rpg_image_label'];
    					$url = $rpg_single_photos_detail['rpg_image_url'];
    					?>

    and this is the page I had this working on previously: http://tamicurtisstudios.com/wp/music-gallery/

    Again, the only change was to add more images to the gallery.

    Thread Starter ggdesigns

    (@ggdesigns)

    So I just tried adding another gallery and it IS working. What do I need to do to get help with the other one?

    This is the one that is working: http://tamicurtisstudios.com/wp/nature-gallery/

    Plugin Author weblizar

    (@weblizar)

    Hi GGdesigns,

    As you told me, you added tons of images in Music Gallery, And during posting(publishing gallery) all images for save in database, the posting variable size exist and all data not saved properly.

    On server Posting Data variable size varies according to server configuration.

    Some default post data size allowed by server like: 2MB, 6MB, 8MB

    For example: if your server Post Data Variable size is 4MB, and you are posting data size 4MB++, then ++ data will be lost during saving and possessing by server.

    So, please add images in clunks like add 10-15 images first time then publish, after that again add 10-15 images, do same process in 3-4 times to add more images and update the gallery then you find a break point, where the all posting data not accepting by the server.

    Hope that will help you troubleshoot the problem.

    Thanks
    Weblizar

    Thread Starter ggdesigns

    (@ggdesigns)

    That’s actually what seems to cause the problem. Multiple saves. I did save after entering about 10 each time. I just tried again and the same thing happened. Perhaps the issue is too many saves on the same gallery within a certain time period????

    All of my other galleries are smaller. I just entered those all at one time and had no trouble. The file sizes are pretty small so I doubt that is the issue. Maybe 60 images is just too much for one gallery? Maybe I should try splitting it up into 2 galleries.

    So much time wasted….

    Thanks for getting back to me.

    Plugin Author weblizar

    (@weblizar)

    Yes! you can split the gallery into two with 30-30 images in each.

    And paste the both gallery shortcode one by one on same page. Then all 60 images will appear together on same page.

    After that this will work perfectly.

    I checked, you made such a beautiful galleries using plugin.

    Thanks
    Weblizar

    Thread Starter ggdesigns

    (@ggdesigns)

    Thank you. I was going to try to do this. I have some of them added. I can only get so far before it happens again. (I finally backed up the website so I can restore rather than continually adding 🙂

    Since I was able to add several other galleries with no problem I thought there must be something wrong with the images for this one gallery. So I re-saved all of the images and then re-uploaded one by one and the same darn thing happened!

    I can’t figure out what’s going on.

    Anyway, I don’t think this is a plugin thing anymore. I think it is a file/server problem. I do really like this plugin. Other than this one gallery, this has been very easy to use and implement! Thank you for trying to help!!!

    Thread Starter ggdesigns

    (@ggdesigns)

    I just figured out the problem was the use of an apostrophe in the image title/label of ONE image in the gallery. ALL OF THIS TIME WASTED because of an apostrophe! UGH!

    I happened to read another support problem regarding commas (which you fixed since) and thought I should check. Anything labeled with a comma is working but one image had an apostrophe so I tried it without and this issue disappears. “It’s a Wonderful World” has to be entered Its A Wonderful World.

    I just wanted to share this so someone else doesn’t have to waste all of this time!!!

    Plugin Author weblizar

    (@weblizar)

    Thanks GGDesign for notifying this bug in sight.

    We will push an update to resolve that bug soon.

    Thanks
    Weblizar

    Thread Starter ggdesigns

    (@ggdesigns)

    Cool thanks!

    I ended up purchasing the Pro version. This is not an issue in the pro version. I really like the versatility of the Pro version as well. Great plugin! Thanks again!!!

    I’ve found the free version breaks (same errors as reported above) with apostrophes and periods in the image label text. Removing them fixed my issues as well.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Warning: Invalid argument…’ is closed to new replies.