In my Page.php file I deleted the following lines and I do a build (/dev/build?flush=all)
class Page extends SiteTree {
/*
public static $db = array(
'OpeningHours' => 'HTMLText',
);
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab(
'Root.Content.Main',
new HtmlEditorField(
'OpeningHours',
'Opening hours of the bar',
'Content'
)
);
return $fields;
}
*/
.....
......
but has given the following errors:
Building database ss_dominio using MySQL 5.5.14
Creating database tables
PageComment
SiteConfig
SiteTree
Email_BounceRecord
QueuedEmail
File
Group
LoginAttempt
Member
MemberPassword
Permission
PermissionRole
PermissionRoleCode
Widget
WidgetArea
Page
Table Page: renamed to _obsolete_Page
Table Page_versions: renamed to _obsolete_Page_versions
Table Page_Live: renamed to _obsolete_Page_Live
ContentPage
IntroPage
ErrorPage
[User Error] Couldn't run query: SELECT COUNT(*) FROM "ErrorPage_versions" LEFT JOIN "Page_versions" ON "Page_versions"."RecordID" = "ErrorPage_versions"."RecordID" AND "Page_versions"."Version" = "ErrorPage_versions"."Version" WHERE "Page_versions"."ID" IS NULL Table 'ss_dominio.Page_versions' doesn't exist
GET /dev/build?flush=all
Line 525 in /var/www/vhosts/dominiosoft.com/httpdocs/sapphire/core/model/MySQLDatabase.php
Source
516 }
517
518 function databaseError($msg, $errorLevel = E_USER_ERROR) {
519 // try to extract and format query
520 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
521 $formatter = new SQLFormatter();
522 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
523 }
524
525 user_error($msg, $errorLevel);
526 }
527
528 /**
529 * Return a boolean type-formatted string
530 *
531 * @param array $values Contains a tokenised list of info about this data type
Trace
Couldn't run query: SELECT COUNT(*) FROM "ErrorPage_versions" LEFT JOIN "Page_versions" ON "Page_versions"."RecordID" = "ErrorPage_versions"."RecordID" AND "Page_versions"."Version" = "ErrorPage_versions"."Version" WHERE "Page_versions"."ID" IS NULL Table 'ss_dominio.Page_versions' doesn't exist
Line 525 of MySQLDatabase.php
MySQLDatabase->databaseError(Couldn't run query: SELECT COUNT(*) FROM "ErrorPage_versions" LEFT JOIN "Page_versions" ON "Page_versions"."RecordID" = "ErrorPage_versions"."RecordID" AND "Page_versions"."Version" = "ErrorPage_versions"."Version" WHERE "Page_versions"."ID" IS NULL | Table 'ss_dominio.Page_versions' doesn't exist,256)
Line 123 of MySQLDatabase.php
MySQLDatabase->query( SELECT COUNT(*) FROM "ErrorPage_versions" LEFT JOIN "Page_versions" ON "Page_versions"."RecordID" = "ErrorPage_versions"."RecordID" AND "Page_versions"."Version" = "ErrorPage_versions"."Version" WHERE "Page_versions"."ID" IS NULL ,256)
Line 129 of DB.php
DB::query( SELECT COUNT(*) FROM "ErrorPage_versions" LEFT JOIN "Page_versions" ON "Page_versions"."RecordID" = "ErrorPage_versions"."RecordID" AND "Page_versions"."Version" = "ErrorPage_versions"."Version" WHERE "Page_versions"."ID" IS NULL )
Line 325 of Versioned.php
Versioned->augmentDatabase(,,,,,,)
Line 963 of Object.php
Object->extend(augmentDatabase,)
Line 3012 of DataObject.php
DataObject->requireTable()
Line 213 of DatabaseAdmin.php
DatabaseAdmin->doBuild(,1)
Line 106 of DatabaseAdmin.php
DatabaseAdmin->build(SS_HTTPRequest)
Line 193 of Controller.php
Controller->handleAction(SS_HTTPRequest)
Line 143 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 134 of DevelopmentAdmin.php
DevelopmentAdmin->build(SS_HTTPRequest)
Line 143 of RequestHandler.php
RequestHandler->handleRequest(SS_HTTPRequest)
Line 147 of Controller.php
Controller->handleRequest(SS_HTTPRequest)
Line 282 of Director.php
Director::handleRequest(SS_HTTPRequest,Session)
Line 125 of Director.php
Director::direct(/dev/build)
Line 127 of main.php