WordPress.org

Ready to get started?Download WordPress

Forums

Warning in theme preview (9 posts)

  1. danceswithcats
    Member
    Posted 3 years ago #

    I just downloaded and installed the Platform theme, and when I selected "Preview" I got the following error:

    Warning: Invalid argument supplied for foreach() in /home/content/j/a/n/janea/html/wp-content/themes/platform/core/library/class.template.php on line 215

    I'd love to use this theme, but I'm afraid of crashing my entire site if I do. Any ideas what's going on here?

    I saw the exact same question on the Platform Pro support site, but because I haven't bought any of their products -- nor do I intend to at the moment -- I have no way to see any feedback there. The question is still marked as unresolved on that forum, too.

    Thanks everyone.

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    this has probably to do with either categories or tags not yet being created for the new site.

    if you like, you could locate this file '/core/library/class.template.php' in your 'platform' theme folder, and paste the code into a http://wordpress.pastebin.com/ and post the link to it here; someone might have a look at it.

  3. danceswithcats
    Member
    Posted 3 years ago #

    Thanks! Although the site does have tags and categories (I'm using the Suffusion theme currently), it's possible that the preview wasn't able to find that information.

    (Sorry, coding failboat alert--the link is in the next post down.)

  4. danceswithcats
    Member
    Posted 3 years ago #

    Here's the pastebin code from my '/core/library/class.template.php' file in the Platform theme folder. The site currently does have categories and tags (I'm using the Suffusion theme right now), but maybe the preview didn't read them?

    Class Template PHP file

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    with tags and cats was only a guess;
    this 'foreach' warning seems to have to do with some (print) areas which you would set in the theme options - looks unsuspicious enough to me.

  6. arpowers
    Member
    Posted 3 years ago #

    Try re-downloading the theme files..

    WordPress.org has been having issues with incomplete files in some of the template files.

    This specific error is because the theme isn't able to read a function that exists in the
    config.templates.php file.

    Also, check and make sure the file 'config/config.templates.php' file is in the theme.

    (If not, this is def. a problem with the WordPress.org servers.)

  7. darrenklein
    Member
    Posted 3 years ago #

    I am having the same problem. I checked the directory and the file exists. Any other ideas? Thank you, DMK

  8. rcarroll
    Member
    Posted 3 years ago #

    I'm having the same problem, has anyone figured this out?

  9. darrenklein
    Member
    Posted 3 years ago #

    Upgrading to PHP 5.x solved it.

Topic Closed

This topic has been closed to new replies.

About this Topic