Hi ExpressionEngine developers,
I was asked to work on a client’s existing ExpressionEngine site which didn’t seem to present any issues at first; however, after digging and fixing many things (and realising that ExpressionEngine needed to be upgraded in order to use the new modules and plug ins), I came across many problems.
I upgraded from 2.4.0 to 2.9.3, simplified and fixed a load of templates (as well as reducing the number of templates) and updated and upgraded what modules I could. And of course, I replaced the deprecated and no-longer-in-existence methods with the ones suggested on the EllisLab site.
The PHP error log is now not reporting any issues - which is good - but the site still has many problems which appear to be down to the database.
For instance, the category template in the products template group will show the available products by looking up the category group as defined in url segment 3; here is a small codes example:
{if segment_3}
{exp:gwcode_categories cat_url_title="{segment_3}" custom_fields="yes" style="linear" limit="1"}
<h1>{cat_name}</h1>
{if cat_description}
{!-- cat_description --}
{/if}
{/exp:gwcode_categories}
{/if}The problem is that when I uncomment the cat_description tag, some categories will show fine, with others not showing at all. But this only happens on the staging site and not my localhost. All categories will show on my localhost without a problem. So the issue appears to be some data in the database on the staging site even though both databases in question are from the same source.
I’ve tried using the {exp:categories} tags, obviously using the correct tags within and I still get the same problem.
It’s really difficult to debug and fix stuff when no errors are in the error_log file and I cannot replicate the same results on my dev machine, so is there a way to check the database for errors or any other issues?
Has anyone come across a similar problem, and how (if at all) was it resolved?
Many thanks,
Shaun.
I’ve found a solution, when importing the database, I added:
CREATE DATABASE IF NOT EXISTS staging_db DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE staging_db;
at the top, otherwise some fields were defaulting to latin1 and latin1_swedish_ci.
At least this explains the lack of PHP errors being logged - it was a problem with the database.
Many thanks,
Shaun.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.