If this is your first visit, check our documentation. To post, register or login.
Forums / Business Issues / Choosing Designers, Hosts, and Programmers / v1.5.1 Random intervals of loss of product titles and descriptions

v1.5.1 Random intervals of loss of product titles and descriptions

Started by aei_dan on 19 Dec 2014, 4:34 PM · Views: 138

Results 1 to 4 of 4
19 Dec 2014, 4:34 PM
#1
aei_dan avatar

aei_dan

New Zenner

Join Date:
Aug 2009
Location:
Tempe, Arizona
Posts:
11
Plugin Contributions:
0

v1.5.1 Random intervals of loss of product titles and descriptions

Every so many months, our website product titles and descriptions disappear. I log into the MySQL db and it details in the 'zencart_products_description' table the 'products_name' and 'products_description' blank data on random items. Random meaning, not all items have blank data, but the majority is blanked out. This has happened anywhere from a few hours after being logged into the admin console, to happening when our office hasn't logged in to the admin console for 2 weeks.

In the past we've tried to rectify the problem by upgrading to zen cart 1.5.1 (from 1.3.x), changed the db password, and switched to a new db username/pw, installed a website firewall, created a newly created db and manually entered all product tables and data (created from new generated zen cart db), reverted to logs and found no unknown login identification IPs.

The rest of the db is intact. The website is still functional as it should be. Its just with these two sets of information in the pre-specified table that seem to just vanish.

I have read through some threads here with similar issues (i.e. just after user installs zen cart, just after user adds an item, just after user updates an item) but nothing with the same random instances that we're experiencing.

Open to any new suggestions to rectify this problem of ours. Our hosting is through HostGator, which to say in the least they have no specific explanation other than to install a previously saved backup. Thank you in advance for any assistance.

19 Dec 2014, 7:47 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: v1.5.1 Random intervals of loss of product titles and descriptions

If it's triggered by user-edits, then the typical cause of that has been mismatched character sets. (database using one thing but PHP files contain instructions for another). Typically this is where you've imported data built on iso-8859-1 but your Zen Cart is using utf8, but you haven't converted the data to match. In non-english-only sites the effect of this mismatch is more obvious.

If you're using 3rd party tools to manage your product data, then it's worth following that trail too.

Simple use of original Zen Cart code and a corresponding standard MySQL database doesn't result in random loss of very specific data.

The key to a solution here is of course in identifying what exactly the "random" event is.

Sometimes a thorough audit of all PHP files exposes things you hadn't considered to be related. ie: http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

Or, if there's a possibility that unauthorized changes have been made to the server then this is a worthwhile exercise until you've satisfied yourself in every step that everything's as it should be, with nothing missing and nothing added: http://www.zen-cart.com/wiki/index.php/Recovering_From_Hacks

.
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.

19 Dec 2014, 8:02 PM
#3
aei_dan avatar

aei_dan

New Zenner

Join Date:
Aug 2009
Location:
Tempe, Arizona
Posts:
11
Plugin Contributions:
0

Re: v1.5.1 Random intervals of loss of product titles and descriptions

Thank you DrByte for your input. I'll exercise your suggested tasks and report my findings/results.

29 Dec 2014, 4:03 PM
#4
aei_dan avatar

aei_dan

New Zenner

Join Date:
Aug 2009
Location:
Tempe, Arizona
Posts:
11
Plugin Contributions:
0

Re: v1.5.1 Random intervals of loss of product titles and descriptions

I re-read DrBytes post and wanted to elaborate some of the history with the zen cart site. That and take a break from the monotonous db audit I've been working on through the holidays here...

If it's triggered by user-edits, then the typical cause of that has been mismatched character sets. (database using one thing but PHP files contain instructions for another). Typically this is where you've imported data built on iso-8859-1 but your Zen Cart is using utf8, but you haven't converted the data to match. In non-english-only sites the effect of this mismatch is more obvious.

  • The zen cart site had been using an older version for a number of years (1.3.x from 2006 - 2012), and when hosting no longer supported PHP4, we had to upgrade to the (then) latest version of 1.5 which in part was no big deal. What was a big deal was migrating the db in the before mentioned utf8 two years ago. What I did was first build a new zen cart site with the new version of software and db. Next, incorporate the previous theme with some light imagery touch ups. Then, after several failed attempts to migrate in whole the db, split up the original db into several parts (specifically the 'zencart_products_description' table) and manually entered through MyPHPadmin SQL queries by copying and pasting (8-15 pages each copy/paste of db data). Time consuming, but this way everything outside of this particular table everything was current with the most recent released version. There was to note, some special characters that were not transferred over successfully in the text (i.e. "&", "°", "Ω") which was easily rectified by instead using the HTML symbol reference code (when found). I knew this was directly attributed by the mismatched character sets back then.

If you're using 3rd party tools to manage your product data, then it's worth following that trail too.

  • Other than Notepad++ used to read and edit files with, no other tools used other than the MyPHPadmin online interface.

Sometimes a thorough audit of all PHP files exposes things you hadn't considered to be related.

  • This is what I'm in the process of doing, with 3800+ items in the db. Naturally in the last 2+ years over 2/3rd's of this listed inventory has been updated. I do know that some users in the past had copied/pasted out of MS Word into the WYSIWYG, and that is what I'm seeking to clean up. If there is a better tool to use than Notepad++ to view the SQL data from a local computer, or a better recommended way to do this please advise.

In summation, we're in the process to have another recreated site with the latest version of zen cart (i.e. 1.5.3, another fresh new db with transferring the new audited 'zencart_products_description' table, and for testing purposes excluding the personalized coded widgets (* i.e. the "Units in Stock" http://assmann.us/index.php?main_page=product_info&cPath=586_93&products_id=7428*); when there is an upgrade of Zen Cart this custom code is wiped out.

I will say these 'random' loss of data situations have never occurred prior to the migration from the older version of zen cart/PHP4 to the 1.5.x/PHP5 that we now use. As well hope my posted experience can help others with similar situations.