WordPress.org

Ready to get started?Download WordPress

Forums

Travelogue theme is cool but.... (12 posts)

  1. 4evrblu
    Member
    Posted 7 years ago #

    Has anyone using Tavelogue 2 noticed this error::

    Warning: Invalid argument supplied for foreach() in /home/content/t/o/t/totalphysique/html/bluestravels/wordpress/wp-admin/upgrade-functions.php on line 623

    I installed the entire folder into my themes directory. I left the file and folder directory in the download untouched, and just uploaded the entire folder to THEMES. Then I chose it and got that error running left to right along the very top of the Admin Panel.

    Any idea what that is?

  2. quietas
    Member
    Posted 7 years ago #

    The original creator had a small typo when he posted it.

    Follow the info at:

    http://2gng.net/bb/viewtopic.php?pid=8#p8

    That will fix it so that it is looking for the right tables. My site is at http://www.alaskamorrows.com if you need some inspiration. Drop me a line if if you need a hand.

  3. 4evrblu
    Member
    Posted 7 years ago #

    http://www.alaskamorrows.com/ Looks great! Mind if I link to you?

    As for the fix, I implemented it, and the result was even more of a mess. Eeek!

    I will try once more before I give up.

  4. Tfleming
    Member
    Posted 7 years ago #

    I'm having the same "Invalid argument supplied for foreach()" error pop up, but only when I use my Travelogue theme. It's not there when I use the default or classic themes.

    Unfortunately, the 2gng site has been abandoned and I can't find the solution otherwise.

    My specific error is this:

    Warning: Invalid argument supplied for foreach() in /home2/tfleming/tonyfleming-www/wordpress/wp-admin/upgrade-functions.php on line 879

    879 foreach($indices as $index) {
    880 // Push a query line into $cqueries that adds the index to that table
    881 $cqueries[] = "ALTER TABLE {$table} ADD $index";
    882 $for_update[$table.'.'.$fieldname] = 'Added index '.$table.' '.$index;
    883 }

  5. Tfleming
    Member
    Posted 7 years ago #

    ARGH... frustrated, I just ripped out that section of the upgrade-functions.php file... and it now works fine! Stupid design....

  6. moshu
    Member
    Posted 7 years ago #

    I understand your frustration (and I am glad you "fixed" it in a way) but cross-posting the same question in many different topics won't help you: it will annoy helpers.

  7. ankubis
    Member
    Posted 7 years ago #

    Hi all,

    I have the same "error" - Travelogue 2.0 and WordPress 2.0.

    What does that part of upgrade-functions.php do? anything than can survive being "ripped out"?

    thanks

  8. Root
    Member
    Posted 7 years ago #

    This is what happens when *designers* are let loose on the php. :)

  9. ankubis
    Member
    Posted 7 years ago #

    Ok. fixed it. (I think).

    Problem manifested on my MySQL 4.0 site, but not on my MySQL 4.1 Site.

    the 4.0 was unhappy about the lack of an index in the Travelogue2 table (default is wp_t2).

    To fix this, I altered the following file: ../themes/travelogue2/plugins/travelogue2-install.php

    I added an id to the table (not sure if this helped, but I wanted a simple PRIMARY).

    `$sql = "CREATE TABLE ".$table_name." (
    id INT(20) NOT NULL AUTO_INCREMENT,
    name text NOT NULL,
    value text NOT NULL,
    description text NOT NULL,
    PRIMARY KEY (id)
    );";`

    NOTE 2 spaces between the KEY and (id).

    Yes, nicer ways to do it, but it works - phew.

  10. spoofhound89
    Member
    Posted 6 years ago #

    Found the fix via webarchive.org:

    Travelogue 2.0
    ===============
    Just spent an hour trying to get the travelogue v2.0 wordpress theme to work.

    Had the "blah blah in upgrade-functions.php line blah blah" error when i went to activate the theme.

    Seached on the web for answers, came to your site. However your blog has seem to have dissappeared, and along with it, any answers you might have.

    So I looked myself. I hate doing php, but I found the problem, and fixed it.

    First off, go back to the default theme, then if the table "wp_t2" exists in the wordpress database, you will have to drop it.

    Then change the following two files:

    in travelogue2\functions.php
    change line 102 from

    $table_name = $table_prefix . "travelogue2";
    to
    $table_name = $table_prefix . "t2";

    in travelogue2\plugins\travelogue2-install.php
    change
    $sql = "CREATE TABLE ".$table_name." (
    name text NOT NULL,
    value text NOT NULL,
    description text NOT NULL
    );";
    to
    $sql = "CREATE TABLE ".$table_name." (
    name varchar(20) NOT NULL,
    value text NOT NULL,
    description text NOT NULL,
    PRIMARY KEY (name)
    );";

    And volia, you should see your website.
    Problem was caused by the travelogue database not having a primary key or unique column, and the functions.php file checking for the wrong table to see if travelogue had been installed or not.

  11. jocelynlt
    Member
    Posted 6 years ago #

    I had the same problem with a new install of travelogue2. I'm running WP 2.0 on http://www.disadventure.com and it was working fine with another theme. I installed the theme, and then I got three errors:

    Warning: Invalid argument supplied for foreach() in disadventure.com/wp/wp-admin/upgrade-functions.php on line 864

    Warning: Cannot modify header information - headers already sent by (output started at disadventure.com/wp/wp-admin/upgrade-functions.php:864) in disadventure.com/wp/wp-login.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at disadventure.com/wp/wp-admin/upgrade-functions.php:864) in disadventure.com/wp/wp-includes/pluggable.php on line 275

    So I tried the fix that spoofhound 89 proposed because it was the only one I could understand, but it still doesn't work. I can't log into the wp-admin page to try ankubis' suggestion.
    Can anyone help me? Will the problem go away if I just delete the theme files from my wp-content/themes folder?

    Curse this guy for designing a crappy theme then going away to convert people!
    feel free to e-mail me if you have suggestions:
    jocelynLT gmail com

  12. rhequiem
    Member
    Posted 6 years ago #

    I'm fairly new at all of this. I got WordPress installed and working and have installed a few other themes that are working normally. However, when I uploaded travelogue 2, it looks like it installs normally, but when I go to my site I get this "ERROR: The Travelogue 2 table doesn't exist within your WordPress database." right beneath the polaroid image and nothing else below... Any suggestions? This theme looks great, and I'd really like to get it working

Topic Closed

This topic has been closed to new replies.

About this Topic