Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Posts
    50
    Plugin Contributions
    0

    Default Problems after installing / uninstalling recaptcha

    Despite my best intentions of backing up all the files and taking a backup of the database I do not seem to be able to roll back the installation to the state it was in prior to attempting to install recaptcha addon.

    I'm running 1.3.9h and installed "pickupman-zencart-recaptcha-2157d716cab4" being the latest version I could find.

    After installation and configuring keys I tried the "contact us" page and recaptcha worked fine.

    Problem 1:
    After installing recaptcha the first casualty was an error when undertaking a search. The following replaces the search results page:

    1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by p.products_sort_order, pd.products_name limit 10' at line 1
    in:
    [SELECT DISTINCT p.products_image, p.products_quantity , m.manufacturers_id, p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_price_sorter, p.products_qty_box_status, p.master_categories_id FROM (zen_products p LEFT JOIN zen_manufacturers m USING(manufacturers_id), zen_products_description pd, zen_categories c, zen_products_to_categories p2c ) LEFT JOIN zen_meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE (p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%sea%' OR p.products_model LIKE '%sea%' OR m.manufacturers_name LIKE '%sea%' OR (mtpd.metatags_keywords LIKE '%sea%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%sea%' AND mtpd.metatags_description !='') OR pd.products_description LIKE '%sea%') )) order by p.products_sort_order, pd.products_name order by p.products_sort_order, pd.products_name limit 10]
    Checking in the logs I obtained the following:
    [23-Apr-2011 09:29:47] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/[path deleted]/zc_admin/includes/functions/extra_functions/recaptcha_functions.php:42) in /home/[pathe deleted]/includes/functions/sessions.php on line 114
    [23-Apr-2011 09:29:47] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/[path deleted]/zc_admin/includes/functions/extra_functions/recaptcha_functions.php:42) in /home/path deleted]/zc_admin/includes/init_includes/init_templates.php on line 28
    There were other error messages broadly similar.

    Problem 2
    I decided to uninstall recaptcha. I renamed all the recaptcha installation files and restored the original files. Login, Contact Us and Search all produced blank pages. I finally removed completely all the renamed recaptcha files so that all files were original install files.

    The error logs now show"

    [23-Apr-2011 11:20:00] PHP Warning: require(includes/classes/recaptchalib.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/..../includes/modules/pages/advanced_search/header_php-recaptcha-broken.php on line 14
    [23-Apr-2011 11:20:00] PHP Warning: require(includes/classes/recaptchalib.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/...../includes/modules/pages/advanced_search/header_php-recaptcha-broken.php on line 14
    [23-Apr-2011 11:20:00] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/classes/recaptchalib.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/..../includes/modules/pages/advanced_search/header_php-recaptcha-broken.php on line 14

    After removing the files, Search and Advanced Search produce the SQL error output shown above when there is a search result hit. Advanced Search, the page displaying "At least one of the fields in the search form must be entered." and the page "There is no product that matches the search criteria." all appear correctly. Login now works as does Contact Us.

    Problem 3
    Breadcrumbs on three pages are still incorrect: Search, Contact Us, Login. Breadcrumbs show multiple instances:

    Home :: Advanced Search :: Advanced Search
    and
    Home :: Advanced Search :: Search Results :: Advanced Search :: Search Results
    I have tried searching on "SELECT DISTINCT p.products_image, p.products_quantity"... etc in Tools --> Developers Toolkit without success.

    Any suggestions as to what's happening and what I've missed?

    Thanks,
    Ric
    Last edited by RicM; 23 Apr 2011 at 12:31 PM.

  2. #2
    Join Date
    Nov 2007
    Location
    Woodbine, Georgia, United States
    Posts
    4,246
    Plugin Contributions
    58

    Default Re: Problems after installing / uninstalling recaptcha

    Quote Originally Posted by RicM View Post
    Despite my best intentions of backing up all the files and taking a backup of the database I do not seem to be able to roll back the installation to the state it was in prior to attempting to install recaptcha addon.

    I'm running 1.3.9h and installed "pickupman-zencart-recaptcha-2157d716cab4" being the latest version I could find.

    After installation and configuring keys I tried the "contact us" page and recaptcha worked fine.

    Problem 1:
    After installing recaptcha the first casualty was an error when undertaking a search. The following replaces the search results page:



    Checking in the logs I obtained the following:


    There were other error messages broadly similar.

    Problem 2
    I decided to uninstall recaptcha. I renamed all the recaptcha installation files and restored the original files. Login, Contact Us and Search all produced blank pages. I finally removed completely all the renamed recaptcha files so that all files were original install files.

    The error logs now show"




    After removing the files, Search and Advanced Search produce the SQL error output shown above when there is a search result hit. Advanced Search, the page displaying "At least one of the fields in the search form must be entered." and the page "There is no product that matches the search criteria." all appear correctly. Login now works as does Contact Us.

    Problem 3
    Breadcrumbs on three pages are still incorrect: Search, Contact Us, Login. Breadcrumbs show multiple instances:


    and


    I have tried searching on "SELECT DISTINCT p.products_image, p.products_quantity"... etc in Tools --> Developers Toolkit without success.

    Any suggestions as to what's happening and what I've missed?

    Thanks,
    Ric
    Did you uninstall the SQL patch to your database?

    ~Melanie
    PRO-Webs, Inc. since 2003 :: Zen Cart Hosting :: Zen Cart SEO – 12 Steps to Success
    **I answer questions in the forum, private messages are not conducive to a helpful community.

  3. #3
    Join Date
    Mar 2011
    Posts
    50
    Plugin Contributions
    0

    Default Re: Problems after installing / uninstalling recaptcha

    Hi Melanie,

    Thanks for replying.

    The install routine uses recaptcha_functions.php make modifications to the dB.

    The two tables are:
    TABLE_CONFIGURATION_GROUP --> [prefix]_configuration_group
    TABLE CONFIGURATION --> [prefix]_configuration

    There are three changes during install:
    INSERT INTO " . TABLE_CONFIGURATION_GROUP . " VALUES ('', 'reCAPTCHA', 'Config options for reCAPTCHA text', '1', '1')");

    $group_id = mysql_insert_id();
    "UPDATE " . TABLE_CONFIGURATION_GROUP . " SET sort_order = " . $group_id . " WHERE configuration_group_id = " . $group_id);

    "INSERT INTO " . TABLE_CONFIGURATION . " VALUES
    ('', 'Enable Contact Form', 'CONTACT_US_RECAPTCHA_STATUS', 'true', 'Disply reCAPTCHA text on contact form (default: true)', " . $group_id . ", '9', NULL, now(), NULL, 'zen_cfg_select_option(array(\"true\", \"false\"),'),
    ('', 'reCAPTCHA Public Key', 'CONTACT_US_RECAPTCHA_PUBLIC_KEY', '', 'Public key given from reCAPTCHA website (default: blank).', " . $group_id . ", '0', NULL, now(), NULL, NULL),
    ('', 'reCAPTCHA Private Key', 'CONTACT_US_RECAPTCHA_PRIVATE_KEY', '', 'Private key given from reCAPTCHA website (default: blank).', " . $group_id . ", '0', NULL, now(), NULL, NULL),
    ('', 'reCAPTCHA Theme', 'CONTACT_US_RECAPTCHA_THEME', 'white', 'Choose a theme option for the widget.', " . $group_id . ", '1', NULL, now(), NULL, 'zen_cfg_select_option(array(\"red\", \"white\", \"blackglass\", \"clean\"),')
    ");
    The uninstall procedure is:
    "delete from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_title = 'reCAPTCHA'");

    "delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $keys) . "')");
    Both tables have no references to reCaptcha so it looks as though the uninstall ran correctly because the values have been deleted.

    I checked this in phpMyAdmin and the dB when compared with the clean (pre-install reCaptcha) have identical rows for [prefix]_configuration_group.

    However, when it comes to [prefix]_configuration there there is an extra row to do with additional pages - which is correct.

    The error is obviously in the mysql and that's where I need to look next.

    Ric

  4. #4
    Join Date
    Mar 2011
    Posts
    50
    Plugin Contributions
    0

    Default Re: Problems after installing / uninstalling recaptcha

    Further to the above.

    There are two curious differences between [prefix]_configuration prior to installing reCaptcha and after uninstalling it (SQL Export):


    Post reCaptcha removal (i.e., current)

    (418, 'Categories - Always Show on Main Page', 'SHOW_CATEGORIES_ALWAYS', '0', 'Always Show Categories on Main Page<br />0= off<br />1= on<br />Default category can be set to Top Level or a Specific Top Level', 19, 45, '2011-04-06 08:33:22', '2011-03-29 09:25:33', NULL, 'zen_cfg_select_option(array(''0'', ''1''), ');
    INSERT INTO `zen_configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES

    (419, 'Main Page - Opens with Category', 'CATEGORIES_START_MAIN', '0', '0= Top Level Categories<br />Or enter the Category ID#<br />Note: Sub Categories can also be used Example: 3_10', 19, 46, '2011-04-05 07:33:43', '2011-03-29 09:25:33', '', ''),
    Pre reCaptcha installation:
    (418, 'Categories - Always Show on Main Page', 'SHOW_CATEGORIES_ALWAYS', '0', 'Always Show Categories on Main Page<br />0= off<br />1= on<br />Default category can be set to Top Level or a Specific Top Level', 19, 45, '2011-04-06 08:33:22', '2011-03-29 09:25:33', NULL, 'zen_cfg_select_option(array(''0'', ''1''), '),

    (419, 'Main Page - Opens with Category', 'CATEGORIES_START_MAIN', '0', '0= Top Level Categories<br />Or enter the Category ID#<br />Note: Sub Categories can also be used Example: 3_10', 19, 46, '2011-04-05 07:33:43', '2011-03-29 09:25:33', '', '');
    INSERT INTO `zen_configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
    (notice the , and ; at the end of line 418 respectively and the fact that the INSERT statement seems to switch between 418 and 419

    The second instance is shown below:

    Post reCaptcha removal (i.e., current):
    (565, 'Tax Class', 'MODULE_SHIPPING_FREEOPTIONS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', 6, 0, NULL, '2011-03-30 09:21:22', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes(');
    INSERT INTO `zen_configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
    (566, 'Tax Basis', 'MODULE_SHIPPING_FREEOPTIONS_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', 6, 0, NULL, '2011-03-30 09:21:22', NULL, 'zen_cfg_select_option(array(''Shipping'', ''Billing'', ''Store''), '),
    Pre reCaptcha installation
    (565, 'Tax Class', 'MODULE_SHIPPING_FREEOPTIONS_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', 6, 0, NULL, '2011-03-30 09:21:22', 'zen_get_tax_class_title', 'zen_cfg_pull_down_tax_classes('),
    (566, 'Tax Basis', 'MODULE_SHIPPING_FREEOPTIONS_TAX_BASIS', 'Shipping', 'On what basis is Shipping Tax calculated. Options are<br />Shipping - Based on customers Shipping Address<br />Billing Based on customers Billing address<br />Store - Based on Store address if Billing/Shipping Zone equals Store zone', 6, 0, NULL, '2011-03-30 09:21:22', NULL, 'zen_cfg_select_option(array(''Shipping'', ''Billing'', ''Store''), ');
    INSERT INTO `zen_configuration` (`configuration_id`, `configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES
    I have run dB checfk and repair and all was well. I'm not aware of any recent changes to Categories or Tax Class.

    Ric

 

 

Similar Threads

  1. v150 Installing old Google ReCaptcha addon - ZC1.50
    By Miff in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 28 Feb 2012, 07:37 PM
  2. Replies: 0
    Last Post: 23 Feb 2010, 08:47 AM
  3. Installing/Uninstalling Modules
    By nicksc in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 4 Apr 2008, 03:51 PM
  4. Problems after installing SSL
    By Ousel in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 1 Dec 2006, 03:47 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