Zen Cart Logo
Forums / All Other Contributions/Addons / 1146 Tables error after installing ultimate SEO URLs.

1146 Tables error after installing ultimate SEO URLs.

Views: 11,726

Results 1 to 20 of 23
23 Feb 2008, 6:51 PM
#1
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

1146 Tables error after installing ultimate SEO URLs.

Oh no.. I just installed this mod and I got this error:

1146 Table 'wishgivi_zc2.zen_seo_cache' doesn't exist
in:
[DELETE FROM zen_seo_cache WHERE cache_expires <= '2008-02-22 20:39:03']

And I found no tables for mod on the database.. what gives? I'm running 1.3.7, and I tried to install version 2.105

I tried uninstalling it too and it won't go away.. I deleted all of the files but it still tries to load the mod! I couldn't find the seo_cache table in my database, either!! this is really frustrating

23 Feb 2008, 7:27 PM
#2
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

I'm suspecting that I have to change the code in /admin/includes/extra datafiles/seo.php: ```

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2005 Joshua Dechant | // | | // | Portions Copyright (c) 2004 The zen-cart developers | // | | // | http://www.zen-cart.com/index.php | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | http://www.zen-cart.com/license/2_0.txt. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: seo.php // define('TABLE_SEO_CACHE', DB_PREFIX . 'seo_cache'); ?>

I tried changing it too

define('zen_', DB_PREFIX . 'seo_cache');


but that just added an extra prefix and I was getting the same error.
23 Feb 2008, 7:31 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1146 Tables error after installing ultimate SEO URLs.

mohinder:

1146 Table 'wishgivi_zc2.zen_seo_cache' doesn't exist

And I found no tables for mod on the databaseOf course you wouldn't find it in the database ... the error message is already telling you that the table doesn't exist.

If you uninstalled it and your site is still referencing the table somewhere, then the mod is still partially installed.
If you only just installed it, then you are probably missing the database setup part of installation.
Perhaps the mod's readme will help you better, or maybe the issue is already discussed in that mod's support thread?

23 Feb 2008, 7:33 PM
#4
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

DrByte:

Of course you wouldn't find it in the database ... the error message is already telling you that the table doesn't exist.

If you uninstalled it and your site is still referencing the table somewhere, then the mod is still partially installed.
If you only just installed it, then you are probably missing the database setup part of installation.
Perhaps the mod's readme will help you better, or maybe the issue is already discussed in that mod's support thread?There is no SQL install file. It just prompts me to upload all of the files in the readme. I've looked for the answer in the SEO URLs thread, and nobody seems to have the same problem.

==========================
INSTALLATION INSTRUCTIONS
==========================

1. Copy files from `_zen_cart_folder` to your Zen Cart install
2. Copy (or MERGE if you have made changes) files from v137-specific-files to your Zen Cart install
3. A sample .htaccess file is included. Simply rename to .htaccess and edit the word /shop/ to match your site
4. Config the module in CONFIGURATION - SEO URLS

Here is the install code, which I'm assuming is supposed to add the table to the database:

<?php
/*
    +----------------------------------------------------------------------+
    |    Ultimate SEO URLs For Zen Cart, version 2.100                        |
    +----------------------------------------------------------------------+
    |                                                                      |
    |    Derrived from Ultimate SEO URLs v2.1 for osCommerce by Chemo         |
    |                                                                      |
    |    Portions Copyright 2005, Joshua Dechant                              |
    |                                                                      |
    |    Portions Copyright 2005, Bobby Easland                               |
    |                                                                      |
    |    Portions Copyright 2003 The zen-cart developers                      |
    |                                                                      |
    +----------------------------------------------------------------------+
    | This source file is subject to version 2.0 of the GPL license,       |
    | that is bundled with this package in the file LICENSE, and is        |
    | available through the world-wide-web at the following url:           |
    | http://www.zen-cart.com/license/2_0.txt.                             |
    | If you did not receive a copy of the zen-cart license and are unable |
    | to obtain it through the world-wide-web, please send a note to       |
    | [email protected] so we can mail you a copy immediately.          |
    +----------------------------------------------------------------------+
*/

    class SEO_URL_INSTALLER{    
        var $default_config;
        var $db;
        var $attributes;

        function SEO_URL_INSTALLER() {
            $this->attributes = array();
        
            $x = 0;
            $this->default_config = array();

            $this->default_config['SEO_ENABLED'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable SEO URLs?', 'SEO_ENABLED', 'true', 'Enable the SEO URLs?  This is a global setting and will turn them off completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['SEO_ADD_CPATH_TO_PRODUCT_URLS'] = array(
                'DEFAULT' => 'false',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Add cPath to product URLs?', 'SEO_ADD_CPATH_TO_PRODUCT_URLS', 'false', 'This setting will append the cPath to the end of product URLs (i.e. - some-product-p-1.html?cPath=xx).', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['SEO_ADD_CAT_PARENT'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Add category parent to begining of URLs?', 'SEO_ADD_CAT_PARENT', 'true', 'This setting will add the category parent name to the beginning of the category URLs (i.e. - parent-category-c-1.html).', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['SEO_URLS_FILTER_SHORT_WORDS'] = array(
                'DEFAULT' => '0',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Filter Short Words', 'SEO_URLS_FILTER_SHORT_WORDS', '0', 'This setting will filter words less than or equal to the value from the URL.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, NULL)"
            );
            $x++;

            $this->default_config['SEO_URLS_USE_W3C_VALID'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Output W3C valid URLs (parameter string)?', 'SEO_URLS_USE_W3C_VALID', 'true', 'This setting will output W3C valid URLs.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['USE_SEO_CACHE_GLOBAL'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable SEO cache to save queries?', 'USE_SEO_CACHE_GLOBAL', 'true', 'This is a global setting and will turn off caching completely.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['USE_SEO_CACHE_PRODUCTS'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable product cache?', 'USE_SEO_CACHE_PRODUCTS', 'true', 'This will turn off caching for the products.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
                );
            $x++;

            $this->default_config['USE_SEO_CACHE_CATEGORIES'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable categories cache?', 'USE_SEO_CACHE_CATEGORIES', 'true', 'This will turn off caching for the categories.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['USE_SEO_CACHE_MANUFACTURERS'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable manufacturers cache?', 'USE_SEO_CACHE_MANUFACTURERS', 'true', 'This will turn off caching for the manufacturers.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['USE_SEO_CACHE_ARTICLES'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable articles cache?', 'USE_SEO_CACHE_ARTICLES', 'true', 'This will turn off caching for the articles.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['USE_SEO_CACHE_INFO_PAGES'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable information cache?', 'USE_SEO_CACHE_INFO_PAGES', 'true', 'This will turn off caching for the information pages.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['USE_SEO_REDIRECT'] = array(
                'DEFAULT' => 'true',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enable automatic redirects?', 'USE_SEO_REDIRECT', 'true', 'This will activate the automatic redirect code and send 301 headers for old to new URLs.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['SEO_REWRITE_TYPE'] = array(
                'DEFAULT' => 'Rewrite',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Choose URL Rewrite Type', 'SEO_REWRITE_TYPE', 'Rewrite', 'Choose which SEO URL format to use.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''Rewrite''),')"
            );
            $x++;

            $this->default_config['SEO_CHAR_CONVERT_SET'] = array(
                'DEFAULT' => '',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enter special character conversions', 'SEO_CHAR_CONVERT_SET', '', 'This setting will convert characters.<br><br>The format <b>MUST</b> be in the form: <b>char=>conv,char2=>conv2</b>', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, NULL)"
            );
            $x++;

            $this->default_config['SEO_REMOVE_ALL_SPEC_CHARS'] = array(
                'DEFAULT' => 'false',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Remove all non-alphanumeric characters?', 'SEO_REMOVE_ALL_SPEC_CHARS', 'false', 'This will remove all non-letters and non-numbers.  This should be handy to remove all special characters with 1 setting.', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''true'', ''false''),')"
            );
            $x++;

            $this->default_config['SEO_URLS_CACHE_RESET'] = array(
                'DEFAULT' => 'false',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Reset SEO URLs Cache', 'SEO_URLS_CACHE_RESET', 'false', 'This will reset the cache data for SEO', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), 'zen_reset_cache_data_seo_urls', 'zen_cfg_select_option(array(''reset'', ''false''),')"
            );
            $x++;

            //IMAGINADW.COM
            $this->default_config['SEO_URLS_ONLY_IN'] = array(
                'DEFAULT' => 'index, product_info, products_new, products_all, featured_products, specials, contact_us, conditions, privacy, reviews, shippinginfo, faqs_all, site_map, gv_faq, discount_coupon, page, page_2, page_3, page_4',
                'QUERY' => "INSERT INTO `".TABLE_CONFIGURATION."` VALUES ('', 'Enter pages to allow rewrite', 'SEO_URLS_ONLY_IN', 'index, product_info, products_new, products_all, featured_products, specials, contact_us, conditions, privacy, reviews, shippinginfo, faqs_all, site_map, gv_faq, discount_coupon, page, page_2, page_3, page_4', 'This setting will allow the rewrite only in the specified pages. If it\'s empty all pages will be rewrited. <br><br>The format <b>MUST</b> be in the form: <b>page1,page2,page3</b>', GROUP_INSERT_ID, ".$x.", NOW(), NOW(), NULL, NULL)"
            );
            $x++;

            $this->db = &$GLOBALS['db'];

            $this->init();
        }
    
/**
 * Initializer - if there are settings not defined the default config will be used and database settings installed. 
 * @author Bobby Easland 
 * @version 1.1
 */    
    function init() {
        foreach( $this->default_config as $key => $value ){
            $container[] = defined($key) ? 'true' : 'false';
        } # end foreach
        $this->attributes['IS_DEFINED'] = in_array('false', $container) ? false : true;
        switch(true){
            case ( !$this->attributes['IS_DEFINED'] ):
                $this->eval_defaults();
                $sql = "SELECT configuration_key, configuration_value  
                        FROM " . TABLE_CONFIGURATION . " 
                        WHERE configuration_key LIKE '%SEO%'";
                $result = $this->db->Execute($sql);
                $num_rows = $result->RecordCount();
                $this->attributes['IS_INSTALLED'] = (sizeof($container) == $num_rows) ? true : false;
                if ( !$this->attributes['IS_INSTALLED'] ){
                    $this->install_settings(); 
                }
                break;
            default:
                $this->attributes['IS_INSTALLED'] = true;
                break;
        } # end switch
    } # end function
    
/**
 * This function evaluates the default serrings into defined constants 
 * @author Bobby Easland 
 * @version 1.0
 */    
    function eval_defaults(){
        foreach( $this->default_config as $key => $value ){
            define($key, $value['DEFAULT']);
        } # end foreach
    } # end function

/**
 * This function removes the database settings (configuration and cache)
 * @author Bobby Easland 
 * @version 1.0
 */    
    function uninstall_settings(){
        $this->db->Execute("DELETE FROM `".TABLE_CONFIGURATION_GROUP."` WHERE `configuration_group_title` LIKE '%SEO%'");
        $this->db->Execute("DELETE FROM `".TABLE_CONFIGURATION."` WHERE `configuration_key` LIKE '%SEO%'");
        $this->db->Execute("DROP TABLE IF EXISTS " . TABLE_SEO_CACHE);
    } # end function
    
/**
 * This function installs the database settings
 * @author Bobby Easland 
 * @version 1.0
 */    
    function install_settings(){
        $this->uninstall_settings();
        $sort_order_query = "SELECT MAX(sort_order) as max_sort FROM `".TABLE_CONFIGURATION_GROUP."`";
        $sort = $this->db->Execute($sort_order_query);
        $next_sort = $sort->fields['max_sort'] + 1;
        $insert_group = "INSERT INTO `".TABLE_CONFIGURATION_GROUP."` VALUES ('', 'SEO URLs', 'Options for Ultimate SEO URLs by Chemo', '".$next_sort."', '1')";
        $this->db->Execute($insert_group);
        $group_id = $this->db->insert_ID();

        foreach ($this->default_config as $key => $value){
            $sql = str_replace('GROUP_INSERT_ID', $group_id, $value['QUERY']);
            $this->db->Execute($sql);
        }

        $insert_cache_table = "CREATE TABLE " . TABLE_SEO_CACHE . " (
          `cache_id` varchar(32) NOT NULL default '',
          `cache_language_id` tinyint(1) NOT NULL default '0',
          `cache_name` varchar(255) NOT NULL default '',
          `cache_data` mediumtext NOT NULL,
          `cache_global` tinyint(1) NOT NULL default '1',
          `cache_gzip` tinyint(1) NOT NULL default '1',
          `cache_method` varchar(20) NOT NULL default 'RETURN',
          `cache_date` datetime NOT NULL default '0000-00-00 00:00:00',
          `cache_expires` datetime NOT NULL default '0000-00-00 00:00:00',
          PRIMARY KEY  (`cache_id`,`cache_language_id`),
          KEY `cache_id` (`cache_id`),
          KEY `cache_language_id` (`cache_language_id`),
          KEY `cache_global` (`cache_global`)
        ) TYPE=MyISAM;";
        $this->db->Execute($insert_cache_table);
    } # end function    
} # end class
?>
23 Feb 2008, 7:49 PM
#5
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

DrByte:

Of course you wouldn't find it in the database ... the error message is already telling you that the table doesn't exist.

If you uninstalled it and your site is still referencing the table somewhere, then the mod is still partially installed.
If you only just installed it, then you are probably missing the database setup part of installation.
Perhaps the mod's readme will help you better, or maybe the issue is already discussed in that mod's support thread?I tried deleting EVERY single file that was installed, and replacing with the originals. It would still reference to the mod, looking for the old files. Which is weird, a table doesn't seem to exist but the site is still trying to access the mod.

23 Feb 2008, 7:55 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1146 Tables error after installing ultimate SEO URLs.

mohinder:

[DELETE FROM zen_seo_cache WHERE cache_expires <= '2008-02-22 20:39:03']Okay, so I downloaded the code and searched every file in the contribution for WHERE cache_expires, in order to find out where your error is coming from.
That instruction is only found in the /includes/classes/seo.url.php file.
Have you deleted that file from your server?

23 Feb 2008, 8:04 PM
#7
mohinder avatar

mohinder

Zen Follower

Join Date:
Mar 2007
Posts:
115
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

Thanks, I just fixed the problem. I searched for "seo" on phpmyadmin and it turns out they were in zen_configuration.

I deleted the tables and deleted the files and now everything works fine.

3 Mar 2008, 3:22 PM
#8
prattski avatar

prattski

New Zenner

Join Date:
Nov 2007
Posts:
19
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

Just in case there are any others of you who are experiencing this problem (because I did), the fix is EASY. Ultimate SEO URLs was supposed to create a table in the database called seo_cache or if you had a prefix it would be prefix_seo_cache.

In my database, it created a table called, TABLE_SEO_CACHE which was wrong, so I just changed the table name to seo_cache and then it worked perfectly.

3 Mar 2008, 7:28 PM
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: 1146 Tables error after installing ultimate SEO URLs.

Prattski:

In my database, it created a table called, TABLE_SEO_CACHE which was wrong... which means you didn't upload all the files for the mod correctly ... because that TABLE_xxxx setting is defined in the .php files.

8 May 2008, 1:54 AM
#10
ambiguator avatar

ambiguator

New Zenner

Join Date:
Aug 2007
Posts:
9
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

Looks to me like the cause of the problem is the file ...classes/seo.install.php getting installed before extra_datafiles/seo.php

this causes the SQL table to get created before the name of the SQL table is defined through the constant TABLE_SEO_CACHE. Thus PHP treats this as a string literal and continues. Then when extra_datafiles/seo.php finally gets uploaded, the name of the SQL table is wrong.

I had the exact same problem (v2.105, zc 1.3.7) and performed the exact same solution.

10 Jun 2008, 10:16 AM
#11
mariellen avatar

mariellen

New Zenner

Join Date:
Jun 2008
Posts:
3
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

mohinder:

There is no SQL install file. It just prompts me to upload all of the files in the readme. I've looked for the answer in the SEO URLs thread, and nobody seems to have the same problem.

I had the same problem. The user I had set up my site with did not have permission to DROP/CREATE tables.

I just ran this script to create the table manually. There may be more stuff I need to run but for now it seems to be hunky dory.

CREATE TABLE seo_cache (
`cache_id` varchar(32) NOT NULL default '',
`cache_language_id` tinyint(1) NOT NULL default '0',
`cache_name` varchar(255) NOT NULL default '',
`cache_data` mediumtext NOT NULL,
`cache_global` tinyint(1) NOT NULL default '1',
`cache_gzip` tinyint(1) NOT NULL default '1',
`cache_method` varchar(20) NOT NULL default 'RETURN',
`cache_date` datetime NOT NULL default '0000-00-00 00:00:00',
`cache_expires` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY  (`cache_id`,`cache_language_id`),
KEY `cache_id` (`cache_id`),
KEY `cache_language_id` (`cache_language_id`),
KEY `cache_global` (`cache_global`)
) TYPE=MyISAM;
14 Jun 2010, 8:18 AM
#12
mcpisik avatar

mcpisik

Zen Follower

Join Date:
Jan 2007
Location:
Mount Maunganui, New Zealand
Posts:
417
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

Ah yes, also had no table created, so ran the script.
Version 1.3.9 cart and so far so good....so thanks to all above.

18 Feb 2011, 5:06 PM
#13
dontblink7 avatar

dontblink7

New Zenner

Join Date:
Jan 2011
Posts:
53
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

Man i'm trying to uninstall ultimate seo urls from my website, can you help me cause iv'e pulled out all the files and it's still there and now my websites down because it's still trying to access seo urls and the files arent there. HELP!!!!!

7 Jun 2011, 9:03 AM
#14
dcwd avatar

dcwd

New Zenner

Join Date:
Dec 2003
Posts:
10
Plugin Contributions:
1

Re: 1146 Tables error after installing ultimate SEO URLs.

Prattski:

Just in case there are any others of you who are experiencing this problem (because I did), the fix is EASY. Ultimate SEO URLs was supposed to create a table in the database called seo_cache or if you had a prefix it would be prefix_seo_cache.

In my database, it created a table called, TABLE_SEO_CACHE which was wrong, so I just changed the table name to seo_cache and then it worked perfectly.

This was EXTREMELY helpful!
Thanks so much!

24 Aug 2011, 10:54 PM
#15
fiberdawn avatar

fiberdawn

New Zenner

Join Date:
Nov 2007
Location:
Oregon
Posts:
15
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

Hi.
Zen cart 1.3.9h
I just installed this Ultimate SEO mod and I also had a problem that the cache table was not created. Turns out the ~/includes/classes/seo.install.php file has TYPE=MyISAM on the create table statement.

I just took the create table ddl and altered it so I could run it from my php Admin, but it would probably work better for someone to change the MyISAM in the download and set it to MySQL (which I think is what most sites are using).

I'm not used to the mods auto-updating the db... I'm used to a separate SQL file that needs to be run as a specific step in the Install instructions. But I'm OK with it. I would suggest that the documentation be updated to say that it will be editing files in the Zen Cart DB. (or maybe I just missed that).

We usually like to know everything that is going to be changed.

Thanks for the mod.. will see how it works for me now. Testing first locally.

31 Jan 2012, 4:14 PM
#16
adem_i avatar

adem_i

New Zenner

Join Date:
Jul 2010
Location:
Sydney, Australia
Posts:
86
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

Prattski:

Just in case there are any others of you who are experiencing this problem (because I did), the fix is EASY. Ultimate SEO URLs was supposed to create a table in the database called seo_cache or if you had a prefix it would be prefix_seo_cache.

In my database, it created a table called, TABLE_SEO_CACHE which was wrong, so I just changed the table name to seo_cache and then it worked perfectly.

Hi Prattski, just wondering how you searched your SQL database? I've copied over all the files, yet the link doesn't appear in the configuration drop down. Currently trying to troubleshoot, but don't have an extensive knowledge on php. Anyhelp would be appreciated,
thanks

5 May 2012, 5:16 PM
#17
tracey avatar

tracey

New Zenner

Join Date:
Jan 2008
Location:
Switzerland
Posts:
38
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

adem.i:

Hi Prattski, just wondering how you searched your SQL database? I've copied over all the files, yet the link doesn't appear in the configuration drop down. Currently trying to troubleshoot, but don't have an extensive knowledge on php. Anyhelp would be appreciated,
thanks

Hi Adem.i,

This might be a bit late to answer your question, but in case anyone else is having the same problem I'll do my best to answer it.

If you can't see the Ultimate SEO URLs here: Admin >> Configuration >> Ultimate SEO URLs then this is related to these files:
_zen_cart_folder_English / includes / classes / seo.install.php
_zen_cart_folder_English / includes / classes / seo.url.php

If you have uploaded these files, and are seeing a blank screen when they are uploaded, then it's possibly a problem with the update to your database. Some of the files uploaded in the install are supposed to alter your database and it's possible that didn't happen correctly as mentioned earlier in this thread.

You can view your database by logging into your hosting account and selecting "phpMyAdmin":
Attachment 10423

Then you will see the list of "database tables":
Attachment 10424

Just run the following query, under the "SQL" tab. See original post #11 by Mariellen:

CREATE TABLE seo_cache (
cache_id varchar(32) NOT NULL default '',
cache_language_id tinyint(1) NOT NULL default '0',
cache_name varchar(255) NOT NULL default '',
cache_data mediumtext NOT NULL,
cache_global tinyint(1) NOT NULL default '1',
cache_gzip tinyint(1) NOT NULL default '1',
cache_method varchar(20) NOT NULL default 'RETURN',
cache_date datetime NOT NULL default '0000-00-00 00:00:00',
cache_expires datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (cache_id,cache_language_id),
KEY cache_id (cache_id),
KEY cache_language_id (cache_language_id),
KEY cache_global (cache_global)
) TYPE=MyISAM;

If that doesn't work, your PHP might be an older version, as was the case with my site.
Just change the last line from:
) TYPE=MyISAM;

to:
) ENGINE=MyISAM;

Then you should see this screen when you navigate here: Admin >> Configuration >> Ultimate SEO URLs
Attachment 10422

Hope that helps! :smile:

9 Oct 2012, 1:31 PM
#18
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

This is very disconcerting. Today my site was down with this very problem. What could have caused it? The only change I have made recently is to change configure files to always require https. Also, there is a nightly backup. It is possible it somehow the mod dropped the table?

Fortunately, this was able to solve the problem:

CREATE TABLE seo_cache (
`cache_id` varchar(32) NOT NULL default '',
`cache_language_id` tinyint(1) NOT NULL default '0',
`cache_name` varchar(255) NOT NULL default '',
`cache_data` mediumtext NOT NULL,
`cache_global` tinyint(1) NOT NULL default '1',
`cache_gzip` tinyint(1) NOT NULL default '1',
`cache_method` varchar(20) NOT NULL default 'RETURN',
`cache_date` datetime NOT NULL default '0000-00-00 00:00:00',
`cache_expires` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`cache_id`,`cache_language_id`),
KEY `cache_id` (`cache_id`),
KEY `cache_language_id` (`cache_language_id`),
KEY `cache_global` (`cache_global`)
) ENGINE=MyISAM;
22 Oct 2012, 9:57 PM
#20
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: 1146 Tables error after installing ultimate SEO URLs.

And to fix the problem, change /includes/classes/seo.install.php

near the end

		) TYPE=MyISAM;";

to

		) ENGINE=MyISAM;";