• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

404 error

Status
Not open for further replies.

Che

Chevereto Member
I'm not pretty sure that it's bug of the script coz my admins changed 404 settings of the server yesterday, but it looks like bug ...
Rodolfo, just let you know that I have no chv_ prefix in my database (as I can see script try to access database with prefix), actually I don't use any prefix.

🎯Description of the issue

404 error

▶🚶‍Reproduction steps
  1. Open any 404 page, for example site.com/404

😢Unexpected result

Error text on the screen

📃Error log message

Fatal error [42S02]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'omgpx.chv_redirects' doesn't exist
Triggered in /lib/G/classes/class.db.php at line 180

Stack trace:
#0 /lib/G/classes/class.db.php(180): PDOStatement->execute()
#1 /lib/G/classes/class.db.php(205): G\DB->exec()
#2 /app/lib/classes/class.redirect.php(30): G\DB->fetchSingle()
#3 /app/lib/classes/class.redirect.php(35): CHV\Redirect::get('/404')
#4 /app/lib/classes/class.redirect.php(57): CHV\Redirect::getUrl('/404')
#5 /app/loader.php(810): CHV\Redirect::handle('/404')
#6 /lib/G/classes/class.handler.php(137): CHV\{closure}(G\Handler)
#7 /app/loader.php(818): G\Handler->__construct(Array)
#8 /index.php(20): include_once('/app/loader.php')
 
i guess that error is because you are missing the table and i think it uses chv_ automaticly. Since when i installed chevereto it assigned chv_ automaticly.
 
I did check it in first. Table is "redirects" without any prefix and it is empty coz it is a new install of the script.
Also I checked two of my old sites (without prefix too) and the same error. Early it shown "page doesn't exist" or something like this.
 
Okay then try this, open settings.php from app folder look for following line "$settings['db_table_prefix'] = 'chv_';" if it says chv_ remove that and save file so it is
$settings['db_table_prefix'] = ''; like this. Empty between the ' ' part. Hopefully that should fix the error.
 
Thanks, but I have no prefix and never use it in my live, I always clean the prefix field during install of any scripts 😉
$settings['db_table_prefix'] = ''; in the file, no prefix in the database etc. And it is because I think that is the bug.
 
I also have this error in change the language.

Fatal error [42S02]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'img.chv_redirects' doesn't exist
Triggered in /lib/G/classes/class.db.php at line 180
 
Thanks, but I have no prefix and never use it in my live, I always clean the prefix field during install of any scripts 😉
$settings['db_table_prefix'] = ''; in the file, no prefix in the database etc. And it is because I think that is the bug.
ok then it probably is a bug, rason why i asked you to check is to make sure that script did not accidentaly ignore that setting when you run installer. But it seems it did not, so then a code is faulty some where that still asks for chv_ perifix.
 
I also have this error in change the language.

Fatal error [42S02]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'img.chv_redirects' doesn't exist
Triggered in /lib/G/classes/class.db.php at line 180
for you please do same check, if you also removed chv_ underinstallation then it needs a fix.
 
My fault, I used chv_ in the redirect class for the DB prefix.

Change this:
Code:
$db->query('SELECT * FROM chv_redirects WHERE redirect_from=:from;');

To this:
Code:
$db->query('SELECT * FROM ' . DB::getTable('redirects') . ' WHERE redirect_from=:from;');
 
Status
Not open for further replies.
Back
Top