Forum
Errors upon Upgrading from 2.0.6 to 2.5.2
Hi,
Just upgraded from 2.0.6 to 2.5.2 and got the following errors upon logging into Perch. Not sure what to do about these.
Andrew
Software Update
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceCreated
DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00' AFTER resourceType
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceUpdated
TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER resourceCreated
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceAWOL
TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER resourceUpdated
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD INDEX idx_awol
(resourceAWOL
)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceTitle
CHAR(255) NULL DEFAULT NULL AFTER resourceAWOL
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceFileSize
INT(10) UNSIGNED NULL DEFAULT NULL AFTER resourceTitle
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceWidth
INT(10) UNSIGNED NULL DEFAULT NULL AFTER resourceFileSize
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceHeight
INT(10) UNSIGNED NULL DEFAULT NULL AFTER resourceWidth
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceCrop
TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER resourceHeight
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceDensity
FLOAT NOT NULL DEFAULT '1' AFTER resourceCrop
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceTargetWidth
INT(10) UNSIGNED NULL DEFAULT NULL AFTER resourceDensity
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceTargetHeight
INT(10) UNSIGNED NULL DEFAULT NULL AFTER resourceTargetWidth
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceMimeType
CHAR(64) NULL DEFAULT NULL AFTER resourceTargetHeight
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD FULLTEXT INDEX idx_search
(resourceTitle
)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD resourceInLibrary
TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER resourceMimeType
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
The following error occurred:
ALTER TABLE perch2_resources
ADD INDEX idx_library
(resourceInLibrary
)
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist
It looks like you have some tables missing from your install. Was this upgraded from Perch 1 or anything like that?
Nope, straight from Perch 2.0.6. I should add the site seems to be working fine. No missing content that I can see. Just wanted to check what these errors were and if they're going to cause me problems.
OK so I am seeing some some interesting characters in my content. For example ' is displaying as ’.
Something to do with the MarkItUp! Editor?
OK now things have started to break!
I installed the Twitter app and imported some tweets. That all seemed to work. Then I edited my index.php file to add the tweets to the homepage and uploaded this. When I returned to perch the original errors posted above appeared again, and when I clicked 'continue' I could see that a number of pages had lost their navigation structure (appearing alongside pages they should have been subpages of). When I clicked into Page Details I got the following error:
The page attribute template (templates/pages/attributes/default.html) could not be found.
I can add that folder from the perch 2.5.2 zip I downloaded, but the navigation structure is still broken as described above.
Any thoughts?
Andrew
I should also add that the Twitter settings and Tweets I imported have also disappeared.
I've manually fixed the navigation structure and restored the missing twitter data, but I'm still concerned about those errors and if they'll cause me problems in the future.
Also still seeing the issue with special characters displaying incorrectly.
Any help you could provide would be greatly appreciated.
Did you follow the "note about database connections"? https://grabaperch.com/update/v2-1
No, that'll teach me to skip versions! Thanks, that's fixed the special character issue. Do you think I need to do anything else about those errors above?
Looks like it's having trouble finding the perch2_resources table. When I log into phpmyadmin I can see that table but it's empty.
You should be good to copy the
templates/pages/attributes
folder from the download to your site. That should clear that message.What's the next error you're getting?
Sorry, yes I've done that already. The errors I'm referring to are in the first post. I got them when I upgraded from 2.0.6 to 2.5.2. I've posted them again below.
Software Update The following error occurred: ALTER TABLE
perch2_resources
ADDresourceCreated
DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00' AFTERresourceType
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceUpdated
TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTERresourceCreated
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceAWOL
TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTERresourceUpdated
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADD INDEXidx_awol
(resourceAWOL
) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceTitle
CHAR(255) NULL DEFAULT NULL AFTERresourceAWOL
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceFileSize
INT(10) UNSIGNED NULL DEFAULT NULL AFTERresourceTitle
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceWidth
INT(10) UNSIGNED NULL DEFAULT NULL AFTERresourceFileSize
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceHeight
INT(10) UNSIGNED NULL DEFAULT NULL AFTERresourceWidth
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceCrop
TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTERresourceHeight
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceDensity
FLOAT NOT NULL DEFAULT '1' AFTERresourceCrop
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceTargetWidth
INT(10) UNSIGNED NULL DEFAULT NULL AFTERresourceDensity
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceTargetHeight
INT(10) UNSIGNED NULL DEFAULT NULL AFTERresourceTargetWidth
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceMimeType
CHAR(64) NULL DEFAULT NULL AFTERresourceTargetHeight
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADD FULLTEXT INDEXidx_search
(resourceTitle
) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADDresourceInLibrary
TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTERresourceMimeType
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't exist The following error occurred: ALTER TABLEperch2_resources
ADD INDEXidx_library
(resourceInLibrary
) SQLSTATE[42S02]: Base table or view not found: 1146 Table 'bartonch_stage.perch2_resources' doesn't existSo the error is
Table 'bartonch_stage.perch2_resources' doesn't exist
but you're saying that the table does exist?Yep, it's definitely there!
If the table is empty, are you able to delete it? I wonder if it may have become corrupt.
Perch should recreate it if it's missing.
I was able to delete it ok. How do I get Perch to recreate it?
Just refresh the page that's showing the error. If that doesn't work, run this in PHPMyAdmin:
Thanks Drew, that worked.
All set now?