Linux
Apache/2.2.3 (CentOS)
PHP Version 5.2.13
MySQL - 5.0.77
PDO Driver for MySQL, client library version - 5.0.77
MODx Revolution 2.0.8-pl (traditional)
Hello forum people!
I have an issue with which I could use some suggestions on solving...
I have an existing site, that has been running happily for 3 or 4 months until this week. The site editors have complained that areas of the site populated by TVs are no longer displaying data.
The resources in question still contain the relevant TVs, and these TVs contain their relevant content (as originally specified by the editors). However, if you click on Template Variables, under the Elements tab, it no longer contains any TVs.
I assumed the TVs had been accidentally deleted, so I went to a pre-production server to copy the missing TVs. When I tried to re-add the TVs to the production server, I receive the message "An error occurred while saving the Template Variable".
So I went to the database to see what was going on, and noticed that the TVs still exist within the database. As far as i can see they are all still there and contain all the required fields to be accessible.
So why arent they being picked up by MODX (and displayed in the manager GUI)?
Im hoping someone will come up with a suggestion that doesn’t involve a fresh install! =)
Any thoughts would be greatly appreciated.
Regards,
Jon.
And attached here is a screen snap showing the missing TVs in the GUI, and the error message received when adding a new TV.
The first thing to try is deleting all the files in the core/cache directory. It might just be a corrupted cache file.
Next, check the DB in PhpMyAdmin for any crashed tables.
Is it possible that someone has messed with the permission system or Form Customization. Putting the TVs in a protected category, for example, would hide them.
Hey Bob,
Thank you for giving input, and on a Saturday too!
I checked all the tables, they all returned 'OK'.
There has been no form customisation.
I cleared the cache from the manager, but for some reason getting permission denied when trying to delete files and folders in /core/cache/ via FTP (will have to call hosting people in office hours).
I have however found something interesting, there is a lot of this in the logs:
[2011-10-14 14:18:10] (ERROR @ /index.php) Error 42S22 executing statement:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'modTemplateVar.display_params' in 'field list'
)
Its late here, and my eyes hurt. While Im sleeping feel free to answer this anyone =)
Jon.
That's a MySQL error. My guess is that your host upgraded the server.
Upgrading to the current version of MODX might fix things.
Should I just upgrade MODX, or would I need to create a new mySQL db too?
Im not sure what checking the installer does in regards to the db, its structure, and integrity...
As long as there are no crashed tables, the upgrade should be straightforward and will use the existing DB.
As always, it's a good idea to do a full backup of the site before upgrading.
Thanks for your input Bob.
In the end it appeared to be due to some kind of the corruption to the 'site_tmplvars' table. Im assuming caused by someone editing the table incorrectly for some reason. Still not sure.
Dropping the table and replacing from backup fixed the problem, all the TVs reappeared in the manager.
I'm glad you got it sorted.