• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • 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

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