Solution to K2 Items Disappearing
I have been asked by three different web designers this week how to fix the
foreach() on line 80 error
which makes K2 items disappear from the Joomla Content Management System. Here's how to fix it by Noostyle Web Design Belfast.
The Problem
Line 80 is a foreach() loop trying to pull data from your database. You'll need to have something like PhpMyAdmin installed and you'll need permission to run SQL queries against your database. If you are worried or unsure about this, contact your web designer or web host.
Go into PhpMyAdmin, click 'databases', choose your database then click on jos_k2_items from the list. It should show the following error:
#145 - Table './jos_k2_items' is marked as crashed and should be repaired
The Solution:
In phpMyAdmin:
1. Select the database in use
2. Click to browse the table "jos_k2_items"
3. Click on "SQL" tab
4. Type "REPAIR TABLE jos_k2_items" in the query box and click on 'Go'.
The query box should now tell you that the action has exectued successfully.
NOTE: the default prefix for Joomla database tables is "jos_". If you altered this during installation, then you'll need to change the command 'REPAIR TABLE (name of the table with your K2 articles)'
To find out more visit our Web Design Belfast page.
Good luck.




