Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2005
    Posts
    35
    Plugin Contributions
    0

    Default Attribute controller - error message when adding attribute values

    I've been playing with the new v1..5.5. responsive version (and very nice it is too).
    I'm working on a clean install on my pc. I used XAmpp to load Apache and MySQL.
    Had no problems with the install and have manually added just two test products to play with.
    My problem comes when trying to set up attributes. On my live system (V1.3.9) I have just one Option name - "Price" and three option values - "Full", "Concession" and "concession n/a" - so far, so simple.
    When I try to set up the same on 1.5.5. I can create the 'Price' option name as a radio button, but when I attempt to save any option values I get the dreaded message "WARNING: An Error occurred, please refresh the page and try again."

    The page reference is
    http://localhost/Cat2016/Myadminfile...s&value_page=1

    I've tried replacing the option_name and option_value php files in admin without any success.

    Any thoughts anyone please ?
    Tony

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Attribute controller - error message when adding attribute values

    Check your /logs folder for the presence of files named myDEBUG-adm-*.log. One of those files will contain details regarding the "error".

  3. #3
    Join Date
    Jul 2005
    Posts
    35
    Plugin Contributions
    0

    Default Re: Attribute controller - error message when adding attribute values

    Yes, thanks for that. I've looked but there's nothing obvious (at least to me). The relevant bit appears to be :-

    Accessed page [options_values_manager.php] with action=add_product_option_values. Review page_parameters and postdata for details.

    stdClass Object
    (
    [option_id] => 1
    [value_id] => 1
    [value_name] => stdClass Object
    (
    [1] => new
    )

    [products_options_values_sort_order] => 2
    )

    THEN

    Accessed page [options_values_manager.php
    Array
    (
    )
    Tony

  4. #4
    Join Date
    Jul 2005
    Posts
    35
    Plugin Contributions
    0

    Default Re: Attribute controller - error message when adding attribute values

    MORE.....
    Just done a completely new install (database and zencart) and this time the log shows a considerable amount of additional data compared to above .....


    stdClass Object
    (
    [products_id] => 1
    [current_category_id] => 1
    [options_id] => 1
    [values_id] => Array
    (
    [0] => 1
    )

    [price_prefix] => +
    [value_price] =>
    [products_attributes_weight_prefix] => +
    [products_attributes_weight] =>
    [products_options_sort_order] => 1
    [attributes_price_onetime] =>
    [attributes_price_factor] =>
    [attributes_price_factor_offset] =>
    [attributes_price_factor_onetime] =>
    [attributes_price_factor_onetime_offset] =>
    [attributes_qty_prices] =>
    [attributes_qty_prices_onetime] =>
    [attributes_price_words] =>
    [attributes_price_words_free] =>
    [attributes_price_letters] =>
    [attributes_price_letters_free] =>
    [attributes_display_only] => 0
    [product_attribute_is_free] => 1
    [attributes_default] => 1
    [attributes_discounted] => 1
    [attributes_price_base_included] => 1
    [attributes_required] => 0
    [img_dir] => attributes/
    [overwrite] => 1
    [products_attributes_filename] =>
    [products_attributes_maxdays] => 7
    [products_attributes_maxcount] => 5
    )


    A mystery !
    Tony

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Attribute controller - error message when adding attribute values

    Neither of the logs you posted contains any error. Could you possible post the full contents of one of those logs (using the "CODE" tags, the # in the post-writing menu-bar, to "wrap" those contents)? You're looking for a .log file that contains either PHP Fatal error or PHP Error.

    When posting, make sure to xxx-out your admin-folder's name!

  6. #6
    Join Date
    Jul 2005
    Posts
    35
    Plugin Contributions
    0

    Default Re: Attribute controller - error message when adding attribute values

    Thanks for your interest. I found this (below)which showed the problem. I used PHPMyadmin to delete the offending records from the products_options_values table and then re-entered the data. This time it worked like a charm. All useful learning experience but I'm glad I was using a 'play' file and not the production model :-)
    Thanks again


    [11-Jul-2016 19:25:19 Europe/Berlin] Request URI: /Cat2016/adminXXXX/options_values_manager.php?action=add_product_option_values&value_page=1, IP address: ::1
    #1 trigger_error() called at [C:\xampp\htdocs\Cat2016\includes\classes\db\mysql\query_factory.php:167]
    #2 queryFactory->show_error() called at [C:\xampp\htdocs\Cat2016\includes\classes\db\mysql\query_factory.php:139]
    #3 queryFactory->set_error() called at [C:\xampp\htdocs\Cat2016\includes\classes\db\mysql\query_factory.php:266]
    #4 queryFactory->Execute() called at [C:\xampp\htdocs\Cat2016\adminXXX\options_values_manager.php:72]


    [11-Jul-2016 19:25:19 Europe/Berlin] PHP Fatal error: 1062: Duplicate entry '1-1' for key 'PRIMARY' :: insert into products_options_values
    (products_options_values_id, language_id, products_options_values_name, products_options_values_sort_order)
    values ('1',
    '1',
    'new2 value',
    '4') ==> (as called by) C:\xampp\htdocs\Cat2016\adminXXX\options_values_manager.php on line 72 <== in C:\xampp\htdocs\Cat2016\includes\classes\db\mysql\query_factory.php on line 167
    Tony

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,472
    Plugin Contributions
    88

    Default Re: Attribute controller - error message when adding attribute values

    I'm glad that you found the reason that the "Error" message was displayed (and were able to recover), but I'm mystified as to how you "got to" the issue.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Attribute controller - error message when adding attribute values

    Quote Originally Posted by rustwood View Post
    I used PHPMyadmin to delete the offending records from the products_options_values table
    NOTE: If you delete records from products_options_values then you ALSO need to delete the CORRESPONDING records from products_options_values_to_products_options, else your data will be corrupt and unreliable.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jul 2005
    Posts
    35
    Plugin Contributions
    0

    Default Re: Attribute controller - error message when adding attribute values

    Thank you - noted. Not an issue for me as this is just a 'play' shop to practice on before committing to the upgrade. I'll probably create 3 or 4 versions on my laptop before boldly going forth with the real thing.
    Tony

 

 

Similar Threads

  1. Attribute Controller - Prices and Weight - Decimal Values Problem
    By GoldBuckle in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 7 Oct 2015, 12:03 PM
  2. v139d Error when opening Attribute Controller
    By kerrydunk in forum General Questions
    Replies: 1
    Last Post: 24 Jun 2014, 08:49 AM
  3. error adding attribute option values
    By g28469b in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 6 Jul 2010, 12:09 PM
  4. Alphabetical order of Option Values in Attribute Controller
    By D-man in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Dec 2008, 05:56 PM
  5. Problems in attribute controller - no option values
    By miriam_t in forum Basic Configuration
    Replies: 3
    Last Post: 28 Oct 2008, 06:49 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR