• 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:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

Image deletion turned page into internal system error

Status
Not open for further replies.

Kenzato

Chevereto Member
🎯Description of the issue

Deleting image as admin turned into a internal system error webpage instead of a file dosent exist/redirect

▶🚶‍Reproduction steps
  1. Be admin
  2. Delete someones image
  3. reload
😢Unexpected result

Webpage becomes a internal system error instead of just saying file dosent exist/ redirecting
example page https://kenzato.uk/booru/image/T0XRg

📃Error log message

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

Stack trace:
#0 /booru/lib/G/classes/class.db.php(180): PDOStatement->execute()
#1 /booru/lib/G/classes/class.db.php(205): G\DB->exec()
#2 /booru/app/lib/classes/class.redirect.php(30): G\DB->fetchSingle()
#3 /booru/app/lib/classes/class.redirect.php(35): CHV\Redirect::get('/image/T0XRg')
#4 /booru/app/lib/classes/class.redirect.php(57): CHV\Redirect::getUrl('/image/T0XRg')
#5 /booru/app/loader.php(810): CHV\Redirect::handle('/image/T0XRg')
#6 /booru/lib/G/classes/class.handler.php(137): CHV\{closure}(G\Handler)
#7 /booru/app/loader.php(818): G\Handler->__construct(Array)
#8 /booru/index.php(20): include_once('/booru/app/loader.php')
 
Execute this query in your DB console:

Code:
DROP TABLE IF EXISTS `chv_redirects`;
CREATE TABLE `chv_redirects` (
  `redirect_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `redirect_from` varchar(2083) NOT NULL,
  `redirect_content_id` bigint(32) NOT NULL,
  `redirect_content_type` enum('image','user','album') NOT NULL,
  PRIMARY KEY (`redirect_id`),
  UNIQUE KEY `redirect_from` (`redirect_from`(255)),
  KEY `redirect_content_id` (`redirect_content_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
Execute this query in your DB console:

Code:
DROP TABLE IF EXISTS `chv_redirects`;
CREATE TABLE `chv_redirects` (
  `redirect_id` bigint(32) NOT NULL AUTO_INCREMENT,
  `redirect_from` varchar(2083) NOT NULL,
  `redirect_content_id` bigint(32) NOT NULL,
  `redirect_content_type` enum('image','user','album') NOT NULL,
  PRIMARY KEY (`redirect_id`),
  UNIQUE KEY `redirect_from` (`redirect_from`(255)),
  KEY `redirect_content_id` (`redirect_content_id`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8;

Error
SQL query:



CREATE TABLE `chv_redirects` (
`redirect_id` bigint(32) NOT NULL AUTO_INCREMENT,
`redirect_from` varchar(2083) NOT NULL,
`redirect_content_id` bigint(32) NOT NULL,
`redirect_content_type` enum('image','user','album') NOT NULL,
PRIMARY KEY (`redirect_id`),
UNIQUE KEY `redirect_from` (`redirect_from`(255)),
KEY `redirect_content_id` (`redirect_content_id`)
) ENGINE=%table_engine% DEFAULT CHARSET=utf8



MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%table_engine% DEFAULT CHARSET=utf8' at line 9
 
Status
Not open for further replies.
Back
Top