Jump to content
thirty bees forum
  • 0

500 error in product page in BO


Question

Posted

Hello,

I'm getting a 500 error when trying to create/edit products. It seems different tabs are having trouble loading. An error message could be like the following:

Tab : Prices (500 error)
A server error occurred while loading the tabs: some tabs could not be loaded.
Please try again by refreshing the page.
If you are still encountering this problem, please check your server logs or contact your hosting provider for assistance.

How many and which tabs are loaded vary, but it always gives a 500 error. It works again if I enable debug mode, however. I also just created a staging version of my site via Cloudways, and this version works! I cannot see any difference in configuration between the two.

I'm not sure if it's related, but I also got an 500 error on the frontend, which gave me this result when decrypted:

Source file: vendor/smarty/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php

            $_resource_part_2_length = strlen($_resource_part_2);
59:        }
60:        $_dir = $_compile_dir;
61:        if ($smarty->use_sub_dirs && isset($_compile_id)) {
62:            $_dir .= $_compile_id . $_dir_sep;
63:        }
64:        if (isset($_compile_id)) {
65:            $_compile_id_part = $_compile_dir . $_compile_id . $_dir_sep;
66:            $_compile_id_part_length = strlen($_compile_id_part);
67:        }
68:        $_count = 0;
69:        try {
70:            $_compileDirs = new RecursiveDirectoryIterator($_dir);
71:            // NOTE: UnexpectedValueException thrown for PHP >= 5.3
72:        }
73:        catch (Exception $e) {
74:            return 0;
75:        }
76:        $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
77:        foreach ($_compile as $_file) {
78:             if (substr(basename($_file->getPathname()), 0, 1) == '.') {
79:                continue;
80:            }
81:            $_filepath = (string) $_file;
82:            if ($_file->isDir()) {
83:                if (!$_compile->isDot()) {
84:                    // delete folder if empty
85:                    @rmdir($_file->getPathname());
86:                }
87:            } else {

I'm hoping this might make sense to someone, cause it makes no sense to me, and it's very frustrating not being able to edit or create products.

6 answers to this question

Recommended Posts

  • 0
Posted

Ok, so my server just went completely out of order. I had the guys at Cloudways look at it, and apperently it's because of this sql query:

 54 | ufpcfxkrgh | localhost | ufpcfxkrgh | Query   |   15 | Sending data | SELECT c.`id_guest`, c.`ip_address`, c.`date_add`, c.`http_referer`, "-" AS `page`
FROM `tb_connections` c
INNER JOIN `tb_guest` g ON c.`id_guest` = g.`id_guest`
WHERE (g.`id_customer` IS NULL OR g.`id_customer` = 0  AND c.id_shop IN (1, 2) ) AND (TIME_TO_SEC(TIMEDIFF('2020-04-27 09:12:00', c.`date_add`)) < 1800) AND (c.`ip_address` NOT IN (1043105662))
ORDER BY c.`date_add` DESC |         0 |             0 |

I figure it might have something to do with me trying to add the following not too long ago:

http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/#.XqaNMGgzaUk

I couldn't make it work however, so I deleted the override. Could this be it? And could there still be something in the database that is causing the query? 

Any help would be greatly appreciated! Thanks!

  • 0
Posted
19 minutes ago, b_otho said:

Ok, so my server just went completely out of order. I had the guys at Cloudways look at it, and apperently it's because of this sql query:


 54 | ufpcfxkrgh | localhost | ufpcfxkrgh | Query   |   15 | Sending data | SELECT c.`id_guest`, c.`ip_address`, c.`date_add`, c.`http_referer`, "-" AS `page`
FROM `tb_connections` c
INNER JOIN `tb_guest` g ON c.`id_guest` = g.`id_guest`
WHERE (g.`id_customer` IS NULL OR g.`id_customer` = 0  AND c.id_shop IN (1, 2) ) AND (TIME_TO_SEC(TIMEDIFF('2020-04-27 09:12:00', c.`date_add`)) < 1800) AND (c.`ip_address` NOT IN (1043105662))
ORDER BY c.`date_add` DESC |         0 |             0 |

I figure it might have something to do with me trying to add the following not too long ago:

http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/#.XqaNMGgzaUk

I couldn't make it work however, so I deleted the override. Could this be it? And could there still be something in the database that is causing the query? 

Any help would be greatly appreciated! Thanks!

Unlikely. 

This sql query is run by dashactivity module -- the main Dashboard page in your thirtybees backoffice. The query is perfectly valid, and it runs without problems on virtually all thirtybees installations that exists. 

You probably have huge tb_connections and tb_guest tables. There are modules that can clear these tables for you 

  • 0
Posted

I've new cleaned up the database with above-mentioned module. Seems to work great so far. The tb_connections and tb_guest tables both had about 150 mb of data which is now deleted.

Also, my dashboard now loads quickly!

  • 0
Posted

I stuck with the same error. Solution was delete via ftp folder  cache/smarty/cache . Maybe someone can explain how this cache works, so I can make changes that are necessary to avoid this kind of problems.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...