Forum
Upgraded from 2.3.2 to 2.8.13 - Content not saving to regions
Hi Folks, I upgraded a site from 2.3.2 to 2.8.13 this morning. I copied over the perch/core, overwriting the existing perch/core folder and also overwrote the perch/addons/plugins/editors/markitup folder with the necessary. Since then If we try save anything to existing regions, they advise "content updated successfully" on the Perch screen but they don't stay saved in the region and off course don't update the corresponding site. I tried changing the template from a basic markitup textblock to a redactor template and it was no use. Please see below the DEBUG message when I try save something in a region.. Can you please please help!! :-/
Debug Message
SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='009bd795d37fca73d2cf540f1e0ac417' LIMIT 1
UPDATE perch2_users SET userHash='ca152b112a907079068d3790d21518fa' WHERE userID='1'
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
SELECT * FROM perch2_content_regions WHERE regionID=2 LIMIT 1
SELECT * FROM perch2_pages WHERE pageID='1' LIMIT 1
SELECT * FROM perch2_content_items WHERE regionID=2 AND itemRev=29 ORDER BY itemOrder ASC
SELECT * FROM perch2_content_items WHERE regionID=2 AND itemRev=29 ORDER BY itemOrder ASC
Using template: /templates/content/redactor.html
INSERT INTO perch2_content_items (itemID, regionID, pageID, itemRev, itemOrder, itemJSON, itemSearch, itemUpdatedBy) SELECT itemID, regionID, pageID, 30 AS itemRev, itemOrder, itemJSON, itemSearch, '1' AS itemUpdatedBy FROM perch2_content_items WHERE regionID=2 AND itemRev=29 ORDER BY itemOrder ASC
Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'itemUpdatedBy' in 'field list'
REPLACE INTO perch2_resource_log (appID, itemFK, itemRowID, resourceID) SELECT cr.appID, cr.itemFK, c2.itemRowID, cr.resourceID FROM perch2_resource_log cr, perch2_content_items c1, perch2_content_items c2 WHERE cr.appID='content' AND cr.itemFK='itemRowID' AND cr.itemRowID=c1.itemRowID AND c1.itemID = c2.itemID AND c1.regionID=2 AND c2.regionID=2 AND c1.itemRev = 29 AND c2.itemRev = 30
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'caulfie1_perch.perch2_resource_log' doesn't exist
SELECT itemRowID FROM perch2_content_items WHERE regionID=2 AND itemRev=30 ORDER BY itemOrder ASC
UPDATE perch2_content_regions SET regionLatestRev=30 WHERE regionID='2'
SELECT regionRev FROM perch2_content_regions WHERE regionID=2
DELETE FROM perch2_content_items WHERE regionID=2 AND itemRev!=29 AND itemRev IN (SELECT itemRev FROM (SELECT DISTINCT itemRev FROM perch2_content_items WHERE regionID=2 ORDER BY itemRev DESC LIMIT 8, 99999) AS t2)
DELETE FROM perch2_resource_log WHERE appID='content' AND itemFK='itemRowID' AND itemRowID NOT IN (SELECT itemRowID FROM perch2_content_items)
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'caulfie1_perch.perch2_resource_log' doesn't exist
SELECT * FROM perch2_content_items WHERE regionID=2 AND itemRev=30 ORDER BY itemOrder ASC
SELECT * FROM perch2_content_items WHERE regionID=2 AND itemRev=30 ORDER BY itemOrder ASC
Using template: /templates/content/redactor.html
UPDATE perch2_content_regions SET regionHTML='', regionRev=30, regionLatestRev=30 WHERE regionID='2'
Setting alert: Content successfully updated (success)
SELECT * FROM perch2_resources WHERE resourceApp='content' AND resourceInLibrary=0 AND resourceCreated<'2015-10-11 14:19:39' AND resourceID NOT IN (SELECT resourceID FROM perch2_resource_log)
Invalid query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'caulfie1_perch.perch2_resource_log' doesn't exist
SELECT MIN(itemRev) FROM perch2_content_items WHERE regionID=2
DELETE FROM perch2_content_index WHERE regionID=2 AND itemRev<21
SELECT * FROM perch2_content_items WHERE regionID=2 AND itemRev=30 ORDER BY itemOrder ASC
OPTIMIZE TABLE perch2_content_index
UPDATE perch2_pages SET pageModified='2015-10-12 14:19:39' WHERE pageID='1'
Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'pageModified' in 'field list'
SELECT * FROM perch2_content_items WHERE regionID=2 AND itemRev=30 ORDER BY itemOrder ASC
Queries: 25
Memory: 3.5951
Array
(
[type] => 2
[message] => Invalid argument supplied for foreach()
[file] => /home/caulfie1/public_html/perch/core/apps/content/modes/edit.form.post.php
[line] => 150
)
DIAGNOSTIC REPORT
Debug Message
SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='5256c3d3f81fc37d0fbca9cd58045bf9' LIMIT 1
UPDATE perch2_users SET userHash='936e5b93f2f8cd862b215dae32b13e75' WHERE userID='1'
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID
Queries: 5
Memory: 1.8902
TEMPLATE
<perch:content id="text" type="textarea" label="Text" textile="true" html="true" editor="redactor" imagewidth="640" imageheight="480" />
HTML
<div id="center_content">
<div id="wrap">
<div id="col_600">
<div id="header">
<h1> <?php perch_content('Home Header'); ?>
</h1>
</div>
<?php perch_content('Home Text'); ?>
<div id="header"><a href="https://www.caulfieldcountryboards.ie/shop/"><img src="images/caulfield_free_postage_in_ireland.png" alt="Free Postage in Ireland" width="595" height="114" border="0" style="margin-bottom:10px; margin-top:0px;"></a>
<h1><?php perch_content('About Us Header'); ?></h1>
</div>
<a href="our_story/index.php"><img src="images/meet_the_team.png" alt="Meet the Team"></a>
<?php perch_content('About us Text'); ?>
</div>
</div>
</div>
Can you try forcing Perch to update by visiting this URL?
Hi Drew, Thanks for coming back so quick! When I append the above URL onto our site I get these errors:
Hi, There was an "accept these errors and continue" link under these errors which I hadn't yet clicked. However I've just tried to save again to a region and it seems to be working now?! I'm assuming the update went ahead anyway?
Apologies, but this is the first Perch update I've done and I followed the directions on this page > https://grabaperch.com/update
In future should we be using the /perch/core/update/?force=update option instead??
Ok, sounds like you're all good.
I'm not sure why you needed that step - it's there as a fallback for cases like this. In future you hopefully shouldn't need it.