MySql database content not showing on site

A few days ago I found that all user text content and Dashboard text had disappeared from my Elgg site. HTML headings and images from the other database and scripts are showing.  In CPanel  I clicked "Check" and then "Repair" database, then "Flush the Caches" in Elgg - no change.

On examining the MySql data base all user content to date appears to be there. It seems to me the path to the database has been broken. Any ideas how to fix this? I have never had a MySql database failure in the eight years I've been running Elgg version 12.1.13

John

  • Can you still log in? If yes, the connection to the database is still working.

    Has there be any changes on the server, e.g. any updates done of the MySQL server of PHP? Have you checked the error log (Apache error log and PHP error log in case the PHP log is separate)? Any entries indicating what might be wrong?

  • Yes, I can still log in. Will check the Apache and PHP  error log. Will ask server admin about changes. Thank you.

    John

  • So, there should be at least no problem with connecting to the database then. As you say text content is missing it's probably something with the database nonetheless as these kind of content is saved in the database (as opposed to uploaded files/images which would be in the data directory).

    If there are no error messages telling about some broken database table (and PHPMyAdmin in CPanel reports no problems either), you could try the DBValidator plugin to see if there might be some broken database entry blocking the retrival of other content from the database. The best version of the DBValidator plugin has not been released. Instead the best way to get it is to download it with this link: https://github.com/Elgg/dbvalidator/archive/master.zip. After unzipping the plugin folder needs to be renamed to "dbvalidator". The advantage of this version is that it has no longer out-of-memory issues if the database is very large.

    You should do a validation run with the DBValidator first. If it reports no issues, there's no point in doing a repair run (it can't fix all errors but only some). If it finds an error you should first make a backup of the database and then do a repair run.

  • @jon666

    As iionly said:

    no problem with connecting to the database

    It's means that you don't have problems with the database

    Start by turning off all 3rd-party plugins.

    This may also occur due to incompatibility of new versions of PHP/MySQL

  • Thanks for your suggestions iionly and Nikolai. None of them worked. Then I noticed something wierd. In the browser I went to "View Page Source" and saw that all content text was in fact there! My text backgrounds are white, very light yellow and very light grey. I could now barely see  a faint glimmer of content text.  So all this has simply been caused by a change of the text colour in css from black to white. How on earth could such a thing have happened? I haven't touched the site for months!

  • It's interesting ;) 

    I guess there may be 2 reasons for this: 
    - the result of a third-party plugin; 
    - the result of the browser/OS on the color scheme of your site.