Post by TAC » Tue Oct 07, 2014 8:35 pm

Hi all,

The site http://thetricklingtap.co.uk/ has been working fine then today the client said he couldn't modify products. So I increased his permissions and suddenly got the blank white page and no shop. The client has continued to add new products.

I removed the permissions but no change.

I checked the error logs and there were none.

I followed the steps here http://forum.opencart.com/viewtopic.php?f=144&t=50555 but no change.

I checked the error logs again and there were some. Did a forum search and followed the step here http://forum.opencart.com/viewtopic.php?f=20&t=117021 but no change.

I repaired the database too.

v 1.5.6.1

No idea what to do next :(
Last edited by TAC on Sat Oct 11, 2014 1:34 am, edited 1 time in total.

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by labeshops » Tue Oct 07, 2014 8:46 pm

Turn on error display temporarily and go to the page. I find some errors show up that way that do not show up in the error logs. My guess is it is having an issue loading something.

Running Opencart v3.0.3.9 with multi-stores and the default template from https://www.labeshops.com which has links to all my stores.


User avatar
Expert Member

Posts

Joined
Thu Aug 04, 2011 4:41 am
Location - Florida, USA

Post by TAC » Tue Oct 07, 2014 8:54 pm

Thank you labeshops for the quick reply :)

Did that and get this

Code: Select all

Warning: mysql_query(): Unable to save result set in /var/www/vhosts/thetricklingtap.co.uk/httpdocs/system/database/mysql.php on line 22Notice: Error: Subquery returns more than 1 row
Error No: 1242
SELECT DISTINCT *, pd.name AS name, p.image, m.name AS manufacturer, (SELECT price FROM product_discount pd2 WHERE pd2.product_id = p.product_id AND pd2.customer_group_id = '1' AND pd2.quantity = '1' AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW()) AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW())) ORDER BY pd2.priority ASC, pd2.price ASC LIMIT 1) AS discount, (SELECT price FROM product_special ps WHERE ps.product_id = p.product_id AND ps.customer_group_id = '1' AND ((ps.date_start = '0000-00-00' OR ps.date_start < NOW()) AND (ps.date_end = '0000-00-00' OR ps.date_end > NOW())) ORDER BY ps.priority ASC, ps.price ASC LIMIT 1) AS special, (SELECT points FROM product_reward pr WHERE pr.product_id = p.product_id AND customer_group_id = '1') AS reward, (SELECT ss.name FROM stock_status ss WHERE ss.stock_status_id = p.stock_status_id AND ss.language_id = '1') AS stock_status, (SELECT wcd.unit FROM weight_class_description wcd WHERE p.weight_class_id = wcd.weight_class_id AND wcd.language_id = '1') AS weight_class, (SELECT lcd.unit FROM length_class_description lcd WHERE p.length_class_id = lcd.length_class_id AND lcd.language_id = '1') AS length_class, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating, (SELECT COUNT(*) AS total FROM review r2 WHERE r2.product_id = p.product_id AND r2.status = '1' GROUP BY r2.product_id) AS reviews, p.sort_order FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN manufacturer m ON (p.manufacturer_id = m.manufacturer_id) WHERE p.product_id = '47' AND pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' in /var/www/vhosts/thetricklingtap.co.uk/httpdocs/system/database/mysql.php on line 50
Still none the wiser ???

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by i2Paq » Tue Oct 07, 2014 9:19 pm


Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by TAC » Tue Oct 07, 2014 9:44 pm

Thank you i2Paq,

I didn't come across that thread. Mind you I'm still confused.

All the products have an image and everything has been added manually one by one. Including categories so it's not as if the export/import tool has made duplicate categories or anything?
The reward, stock_status, weight_class, length_class, rating, or reviews subquery is returning more than 1 row.
I can't see anywhere in that post this was answered?

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by i2Paq » Tue Oct 07, 2014 9:48 pm

TAC wrote:Thank you i2Paq,

I can't see anywhere in that post this was answered?
sometimes there is a duplicate url_alias entry for a category. This change resolves the issue when editing the category again.
https://github.com/opencart/opencart/co ... 98edc2bfb9

I'm not sure if this helps to solve your problem.

It could also be a db issue.

Did anything change with your hoster like a MySQL update?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by TAC » Tue Oct 07, 2014 9:55 pm

Not sure if the host changed anything, I have opened a support ticket with them.

I checked my db and there are only 7 catagories and no duplicate IDs.

I looked at https://github.com/opencart/opencart/co ... 98edc2bfb9 but nto sure what to do, I'm no coder :(

When it first happened I repaired the db, no idea if that makes any difference?

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by i2Paq » Tue Oct 07, 2014 10:00 pm

Repair should not hurt it.

The codepage changes the upload/admin/model/catalog/category.php

replace line 202

Code: Select all

$query = $this->db->query("SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR ' > ') FROM " . DB_PREFIX . "category_path cp LEFT JOIN " . DB_PREFIX . "category_description cd1 ON (cp.path_id = cd1.category_id AND cp.category_id != cp.path_id) WHERE cp.category_id = c.category_id AND cd1.language_id = '" . (int)$this->config->get('config_language_id') . "' GROUP BY cp.category_id) AS path, (SELECT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'category_id=" . (int)$category_id . "') AS keyword FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd2 ON (c.category_id = cd2.category_id) WHERE c.category_id = '" . (int)$category_id . "' AND cd2.language_id = '" . (int)$this->config->get('config_language_id') . "'");
with

Code: Select all

+ $query = $this->db->query("SELECT DISTINCT *, (SELECT GROUP_CONCAT(cd1.name ORDER BY level SEPARATOR ' > ') FROM " . DB_PREFIX . "category_path cp LEFT JOIN " . DB_PREFIX . "category_description cd1 ON (cp.path_id = cd1.category_id AND cp.category_id != cp.path_id) WHERE cp.category_id = c.category_id AND cd1.language_id = '" . (int)$this->config->get('config_language_id') . "' GROUP BY cp.category_id) AS path, (SELECT DISTINCT keyword FROM " . DB_PREFIX . "url_alias WHERE query = 'category_id=" . (int)$category_id . "') AS keyword FROM " . DB_PREFIX . "category c LEFT JOIN " . DB_PREFIX . "category_description cd2 ON (c.category_id = cd2.category_id) WHERE c.category_id = '" . (int)$category_id . "' AND cd2.language_id = '" . (int)$this->config->get('config_language_id') . "'");
Make a backup before changing any file!!

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by TAC » Tue Oct 07, 2014 10:20 pm

I backed up the db from OC and phpMyAdmin

I changed that line of code but the site is still broken, client is getting anxious too :(

I forgot to say the shop is relatively simple, few categories, all top level, not many products and no attributes, options etc. being used.

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by i2Paq » Tue Oct 07, 2014 10:28 pm

I have no clue, could be an issue with one of your db-tables.

When was you last backup?

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by TAC » Tue Oct 07, 2014 10:31 pm

Just a minute ago, haven't done one since I moved the site to the root from a subdomain

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Tue Oct 07, 2014 10:35 pm

If I reinstalled OC and imported the db that might cause the error again?

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Wed Oct 08, 2014 6:41 pm

The host rolled the site back to the day before and it was ok for a while but as soon as I changed the permissions for the client it's gone again. The rest of the site seems to be there but not the homepage.

Instead of changing permissions like I did yesterday I just made him a Top Admin, thinking that would be the safe way to do it.

This is driving me nuts and making me look very unprofessional :(

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by i2Paq » Wed Oct 08, 2014 7:15 pm

Did you make a .sql dump via phpMyAdmin first ;)

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by TAC » Wed Oct 08, 2014 11:15 pm

Thank you i2Paq but no I didn't. In the end I decided to delete the lot and start again using v2.0, which looks amazing :) Luckily this is a client who will learn the new interface very easily.

Trouble is there seem to be no answers to questions about how to customise it. I never use themes, always copy and refine the default one.

Using FireBug I can't even find how to change the colour of the menu bar :(

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by i2Paq » Wed Oct 08, 2014 11:29 pm

I would go with 1.5.6.x

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by TAC » Wed Oct 08, 2014 11:39 pm

I considered that but I really want the responsive element. Is v2.0 not easy to customise?

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by i2Paq » Thu Oct 09, 2014 12:38 am

TAC wrote:I considered that but I really want the responsive element. Is v2.0 not easy to customise?
It is still "under construction" in my opinion.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by TAC » Thu Oct 09, 2014 6:21 am

Thanks again for your help i2Paq, I've installed 1.5.6.4 :)

User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England

Post by TAC » Thu Oct 09, 2014 6:43 am


User avatar
TAC
Active Member

Posts

Joined
Sun Sep 26, 2010 1:33 am
Location - England
Who is online

Users browsing this forum: No registered users and 36 guests