Zen Cart Logo
Forums / Upgrading to 2.x.x / Logs created by products with missing description records

Logs created by products with missing description records

Views: 1,261

Results 1 to 3 of 3
3 Mar 2025, 12:52 PM
#1
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,691
Plugin Contributions:
56

Logs created by products with missing description records

Zen Cart 2.1.0 will create debug logs when attempting to display products with no associated products description records. Unfortunately, at this time there is no way to fix such records in the Zen Cart admin; they must be fixed in phpMyAdmin. This will be resolved in the next release of Zen Cart.

See Github issue 7012 if you wish to read more about this:
https://github.com/zencart/zencart/issues/7012

20 Oct 2025, 5:17 PM
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,691
Plugin Contributions:
56

Re: Logs created by products with missing description records

If you have this issue, here's how to fix it:

  • in phpMyAdmin, run the query:
    select p.products_id from products p where not exists (select pd.products_description from products_description pd where p.products_id = pd.products_id);

  • At the bottom of the screen it gives you operations you can do on query results; choose "Export." Export in CSV format.

  • Take this file and use your text editor to create insert statements.

INSERT INTO products_description (products_id, products_description) VALUES (14562, '');

(where 14562 is one of the IDs in the export.). Do this for each id in the export file.

Run the resultant file through Admin > Tools > Install SQL Patches.

You can now edit each of these products in the Zen Admin (Admin > Catalog > Categories/Products, then search for each product id, then hit edit).
This will allow you to set the name and description for the product.

20 Oct 2025, 7:41 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: Logs created by products with missing description records

Adding onto swguy's post:
After querying for a list of where-not-exists, for your own records,
it might be possible to insert all missing ones with something like:

INSERT INTO products_description (products_id, products_name, products_description, language_id)
SELECT p.products_id, p.products_model, 'description missing, contact our administrator', l.languages_id
FROM products AS p
CROSS JOIN languages AS l
LEFT JOIN products_description AS pd
  ON pd.products_id = p.products_id AND pd.language_id = l.languages_id
WHERE pd.products_id IS NULL;

(and then you could search for "administrator" to fix all of those products.)