Page 1 of 3 123 LastLast
Results 1 to 10 of 24
  1. #1
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default renaming DB tables for compatibility?

    Hi -

    So, my database tables have a "zen_" prefix. This is causing some inconvenience, as at least one third-party add-on uses an install script that doesn't work with such prefixes.

    Can anyone tell me what I have to do to strip out these prefixes? Is it as simple as using mySQL to go in and edit the table names? (Of course, I then have to modify my configure.php files, too.)

    Thanks for any assistance.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: renaming DB tables for compatibility?

    Add-ons that have a SQL patch should have the patch run through "Install SQL Patches" in your store admin console.

    ZC will know if the tables are prefixed, and if they are, the appropriate prefix will be added when the patch is run.

    If you use phpMyAdmin to do the sql patching, then it's just a case of editing IN the prefix, where appropriate.
    20 years a Zencart User

  3. #3
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: renaming DB tables for compatibility?

    Hi, SB –

    I did in fact use the "Install SQL Patches" facility. The author of the add-on recommended pasting the contents of the script into the box, but I tried it both that way and simply uploading the file. The result was the same:

    1146 Table 'cindere8_znc1.configuration_group' doesn't exist
    in:
    [SELECT @cgi := configuration_group_id FROM configuration_group WHERE configuration_group_title = 'Zen Lightbox';]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
    I'm ASSUMING that, since this error message looks very similar to the one I was getting before I fixed my configure files, that this is a prefix problem. If this assumption is incorrect, though, then I'll listen to whatever you suggest.

  4. #4
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: renaming DB tables for compatibility?

    When you moved your database, it failed to create a table called:

    configuration_group.

    The problem is not prefixes. It is a missing table.
    20 years a Zencart User

  5. #5
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: renaming DB tables for compatibility?

    Go into phpMyAdmin and see if you have a table called configuration_group.

    Another way to check is to go into your shop admin and see if you have a dropdown menu for configuration.
    20 years a Zencart User

  6. #6
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: renaming DB tables for compatibility?

    According to mySQL, there is indeed such a table (with the "zen_") prefix, of course. It is one of 95 tables in the new DB, which (from memory) is the same number the old DB had.

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: renaming DB tables for compatibility?

    Hmmmm... who is hosting your site? It looks like one of those set ups that houses the dbase on a separate server.

    When you set up your configure.php files, did you use localhost, or is there a different server address?
    20 years a Zencart User

  8. #8
    Join Date
    May 2008
    Posts
    452
    Plugin Contributions
    0

    Default Re: renaming DB tables for compatibility?

    When I said "mySQL" above, I meant "phpMyAdmin." The table is there (again, with the prefix). And, the "Configuration" menu does appear on the admin page.

    My host is bluehost. The configure files use localhost.

    Everything in the stock admin area seems to work fine, so I'm kind of reluctant to believe the problem's not limited to this add-on.

    One possible glitch is that I keep all of my ZC files under a directory called "shop" and use an .htaccess file to redirect from the root to /shop. Perhaps the script is tripping up on this? Just a wild guess.

  9. #9
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: renaming DB tables for compatibility?

    Quote Originally Posted by mzimmers View Post
    One possible glitch is that I keep all of my ZC files under a directory called "shop" and use an .htaccess file to redirect from the root to /shop. Perhaps the script is tripping up on this? Just a wild guess.
    If you temporarily disable .htaccess (call it .htaccess-suspended) and then try? What happens?
    20 years a Zencart User

  10. #10
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,266
    Plugin Contributions
    3

    Default Re: renaming DB tables for compatibility?

    You can always run patches via phpMyAdmin... just remember to edit in the zen_ prefix where necessary... This will ONLY be on the table name, NOT the field names within a table.

    eg:
    products (table) becomes...

    zen_products (table)

    products_id (field so NO prefix)
    20 years a Zencart User

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v152 Plugin authors: Check for use of mysql* functions for compatibility with v1.5.2
    By lat9 in forum Contribution-Writing Guidelines
    Replies: 7
    Last Post: 27 May 2014, 07:10 AM
  2. Checking Contributions for PHP 5.3 Compatibility
    By swguy in forum Contribution-Writing Guidelines
    Replies: 0
    Last Post: 29 Jun 2010, 04:29 PM
  3. Easy Populate Compatibility for 1.3.8a?
    By dmfelder in forum All Other Contributions/Addons
    Replies: 6
    Last Post: 29 Jun 2008, 12:26 AM
  4. Problem during upgrade (after renaming tables to remove zen_ prefix)
    By rainthebat in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 11 Dec 2007, 05:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg