This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Invalid argument supplied for…..

  • Creator
    Topic
  • #4025
    mseanm
    Member

    Hola!

    I’ve uploaded the latest version I have of Akita (through ThemeForest) on a clean, brand new install of WordPress and I get this message on the site:

    Warning: Invalid argument supplied for foreach() in /home/jrbreedl/public_html/wp-content/themes/akita/framework/frontend/functions/general.php on line 801

    I looked at line 801 and it says this:

    foreach( $elements as $area ){

    Am I missing something?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #4028
    missalice
    Participant

    Dear Jason,
    my website is still http://www.baliberty.com. Have a look, you’ll see the issue :
    SAME PROBLEM THAN msnam with a

    Warning: Invalid argument supplied for foreach() in /homez.625/balibert/www/wp-content/themes/akita/framework/frontend/functions/general.php on line 801″

    This problem is ONLY on the Home page
    BUT another page has trouble
    http://www.baliberty.com/padi-specialites/
    which is not designed by css visibly.

    Is it conneted ? What do i have to correct ?

    Previuoulsy,
    I did few optimization for a better speed loading pages :
    1 creation of a subdomain for all the images (new directory is called “medias”)
    2 creation of a file htaccess in this directory with
    “- RequestHeader unset Cookie
    – Header unset Set-Cookie”
    3 install WP super cache + Minify
    4 add few optimization in the config.php :
    define(‘WP_DEBUG’, false);
    define(‘CONCATENATE_SCRIPTS’, false);
    define(‘WP_POST_REVISIONS’, 2);
    define(‘EMPTY_TRASH_DAYS’, 3 );
    define(‘WP_MEMORY_LIMIT’, ‘128M’);
    define(‘COOKIE_DOMAIN’, ‘www.baliberty.com’);
    define(“WP_CONTENT_URL”, “http://medias.baliberty.com”);
    5 add few optimization in the .htacess also.
    and it was working.

    Then i was in the WP admin, trying to correct the page
    http://www.baliberty.com/padi-specialites/
    because the content couldn’t apperead.
    And the builder of this page had lost is diffrent element ?
    So I quit WP admin and then the problem appears.
    Strange, no ?

    So, I’ve removed these modified files (config, htacces) and replace it Version 0 but nothing seems to change.

    Would you have any idea, Dear Magic Jason ?
    🙂
    Thaks a lot
    Alice

    #4029
    missalice
    Participant

    Dear Jason,
    and now the problem is also here
    http://www.baliberty.com/niveau-2-padi-advanced-open-water/

    It’s gonna drive me crazy !

    Hope you could investigate to solve it
    Thankssssss
    Alice

    #4043
    Jason Bobich
    Keymaster

    I’ve uploaded the latest version I have of Akita (through ThemeForest) on a clean, brand new install of WordPress and I get this message on the site:

    Warning: Invalid argument supplied for foreach() in /home/jrbreedl/public_html/wp-content/themes/akita/framework/frontend/functions/general.php on line 801

    It’s not possible for you to activate the theme on a fresh install of WordPress and get this warning. So, there’s some sort of piece of information you’re overlooking or maybe leaving out here.

    This warning is actually pretty straight forward. — All it means is that you have a broken layout with no elements assigned to your homepage. On whatever site you’re getting this error, go to Builder in your WordPress admin, and edit the layout attached you’ve attached to your homepage. Does the layout have any elements? I’m guessing it doesn’t and that’s your issue.

    Why might this happen? — I can think of two theoretical reasons.

    1) You started to create a layout in the Layout Builder, but for some reason never finished it. Then you applied that as your homepage.

    2) You’re attempting to transfer a pre-existing site you had with the theme, but you’re not correctly transferring your database.

    #4072
    missalice
    Participant

    Dear Jason,
    Thanks for your answer.
    So I’ve reloaded a wp-content file backup.
    The “Invalid argument…” is not here anymore.
    But and few pages, there is no CSS design anymore :
    Why ?
    http://www.baliberty.com/sites/
    http://www.baliberty.com/padi-specialites/
    http://www.baliberty.com/niveau-2-padi-advanced-open-water/

    Do not understand where to look to solve theses stranges things.
    Thanksssss
    Alice

    #4076
    mseanm
    Member

    On my end, that seemed to clear things up. Thank you very much!!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.