lat9:
@sungmo, what is the history of your store? The value that is causing that error to be generated (PRODUCTS_OPTIONS_VALUES_TEXT_ID) should be a database-based constant.
You can correct the error you posted by copying the following, pasting it into your admin's Tools->Install SQL Patches and pressing 'send':
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('ID for text and file products options values', 'PRODUCTS_OPTIONS_VALUES_TEXT_ID', '0', 'Numeric value of the products_options_values_id used by the text and file attributes.', 6, NULL, now(), now(), NULL, NULL);
> Please note that the zc_install process created that constant, so I'm trying to understand how it was removed from the database in the first place.
> **mc12345678:**
>
> One way to identify the how it happened, is to identify what plugins have been installed or attempted to be installed. There used to be a few that would/could clear records of the database that had a gID equal to 0 which included PRODUCTS_OPTIONS_VALUES_TEXT_ID as well as two other constants that previously were assigned to gID=0 instead of how they have been reassigned to gID=6.
> **lat9:**
>
> @mc12345678, actually the constant **PRODUCTS_OPTIONS_VALUES_TEXT_ID **has been registered in configuration group ***6 ***(hidden/modules) since at least Zen Cart 1.3.8a timeframe.
>
> That's why I asked the question, since that value isn't one of the three that were previously defined in configuration group **0**.
> **mc12345678:**
>
> My bad, I was thinking mostly of PRODUCTS_OPTIONS_TYPE_SELECT although there were two other configuration_key values that also were stored at gID of 0. Those other two though were not in mind. The request of what plugins had been installed or attempted to be installed/removed still remains as an action. Even though I wrongly attributed PRODUCTS_OPTIONS_VALUE_TEXT_ID to what used to be more of a problem.
>
> If the issue is associated to some plugin software, then knowing which one would help prevent the same thing from occurring to others.
No, y'all missed an important distinction here.
See how the SQL quoted in the error here: "... VALUES (**(int)**PRODUCTS_OPTIONS_VALUES_TEXT_ID, 1, 'TEXT')... contains the PHP (int) directive?
While if the "(int)" weren't part of the error message you'd be right, since the error message includes the PHP code for (int), it means someone has tampered with the code and is outputting the PHP into the SQL.
Solution: put back the original code instead of whatever has been done to change it.