Forum

Thread tagged as: Problem, Addons, Blog

Blog and Blocks broken since update

I updated a site to the newly released version of the blog app, updating Perch core in the process, and now have encountered a weird thing when using a freeform template that makes use of blocks to create a blog post.

Clicking any of the links to create a block presents the title of the new block but no input field. I also have two random input fields visible before creating any blocks.

This is my freeform.html blog template located in perch > templates > blog > posts

<article class="h-entry">

<div class="page-header cover <perch:if exists="image"><perch:blog id="theme" label="Cover Photo Colour" type="select" options="dark,light" order="3" />" style="background-image: url(<perch:blog id="image" type="image" label="Cover Photo" order="2" />);background-size: cover;"</perch:if>">
    <div class="container question-title">
        <h1><perch:blog id="postTitle" type="text" label="Title" required="true" size="xl autowidth" order="1" /></h1>
    </div>
</div>

<div id="intro">
    <div class="container">
    <perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="4" size="s" />
    </div>
</div>

<div id="content" class="container">

    <perch:blocks>

        <perch:block type="text" label="text">
            <perch:blog id="text" type="textarea" label="Text" markdown="true" editor="markitup" imagewidth="640" imageheight="480" />
        </perch:block>

         <perch:block type="largeheading" label="large heading">
            <h4><perch:blog id="heading" type="text" label="heading" required="true" title="true" /></h4>
        </perch:block>

        <perch:block type="mediumheading" label="medium heading">
            <h5><perch:blog id="heading" type="text" label="heading" required="true" title="true" /></h5>
        </perch:block>

        <perch:block type="smallheading" label="small heading">
            <h6><perch:blog id="heading" type="text" label="heading" required="true" title="true" /></h6>
        </perch:block>

        <perch:block type="pullquote" label="pull quote">
            <blockquote class="<perch:blog id="class" type="select" options="Pull left|left,Pull right|right,Centre|centre" label="Alignment" order="2" />">
                <perch:blog id="quote" type="textarea" size="xs" label="Quote" />
            </blockquote>
        </perch:block>

        <perch:block type="image" label="full image">
            <img class="full-image" src="<perch:blog type="image" id="LargeImage" label="Image" width="1400" />" alt="<perch:blog type="text" id="alt" label="Description" help="e.g. Photo of MD John Smith with his best wig on" title="true" />" />
        </perch:block>

        <perch:block type="mediumimage" label="medium image">
            <div class="medium-image <perch:blog id="class" type="select" options="Pull left|left,Pull right|right,Centre|centre" label="Alignment" order="2" />">
            <img src="<perch:blog type="image" id="MediumImage" label="Image" width="700" />" />
            <perch:if exists="caption"><p class="caption"><perch:blog type="textarea" size="xs" id="caption" label="Image Caption" /></p></perch:if>
            </div>
        </perch:block>

        <perch:block type="twoimages" label="two images side by side">
            <div class="two-images">
                <img class="left" src="<perch:blog type="image" id="LeftImage" label="Left Image" width="700" />" />
                <img class="right" src="<perch:blog type="image" id="RightImage" label="Right Image" width="700" height="500" />" />
            </div>
        </perch:block>

        <perch:block type="smallimage" label="small image">
            <div class="small-image <perch:blog id="class" type="select" options="Pull left|left,Pull right|right,Centre|centre" label="Alignment" order="2" /> ">
                <img src="<perch:blog type="image" id="SmallImage" label="Image" width="250" />" />
            <perch:if exists="caption"><p class="caption"><perch:blog type="textarea" size="xs" id="caption" label="Image Caption" /></p></perch:if>
            </div>
        </perch:block>

        <perch:block type="youtube" label="YouTube Video">
            <div class="video-container">
              <perch:blog id="YouTube" type="youtube" label="YouTube URL" output="embed" />
            </div>
        </perch:block>

    </perch:blocks>

     <div class="author">

    <perch:if exists="author_image">
        <img src="<perch:blog id="author_image" type="image" label="Author Image" type="hidden" />" width="60" />
    </perch:if>

    <p class="meta">Posted

        <perch:if exists="authorGivenName">
            by <a href="/blog/archive.php?author=<perch:blog id="authorSlug" type="text" />"><span class="p-author h-card"><perch:blog id="authorGivenName" type="hidden" /> <perch:blog id="authorFamilyName" type="hidden" /></span></a>
        </perch:if>

        on <time class="dt-published" datetime="<perch:blog id="postDateTime" type="date" label="Date" time="true" format="Y-m-d H:i:s" divider-before="Meta information" />"><perch:blog id="postDateTime" type="date" time="true" format="%d %B %Y" /></time>.</p>

        <p>This post has been tagged <perch:blog id="postTags" /></p>

        <perch:categories id="categories" set="blog" label="Categories" display-as="checkboxes">
            <a href="archive.php?cat=<perch:category id="catSlug" type="slug" />" class="p-category">
                <perch:category id="catTitle" type="text" />
            </a>
        </perch:categories>

    </div> <!-- Close Author -->

</div> <!-- Close Container -->

</article>

This is what it looks like when first arriving on the edit screen for a new post:

Edit screen

Here is what happens when I create a block:

New block

Phil Bowell

Phil Bowell 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which versions were you updating from?

If you inspect the 'random' fields, what IDs do they have?

I believe I updated from the most recent version of the blog app and from 2.8.12 of Perch.

The first mystery field is for the author slug, not sure where it's getting that from, and the second is for tags, which doesn't seem be labelled properly.

When I add a block and inspect it this is what the html looks like:

<div class="block-item"><h2 class="divider">text<span class="rm"><a href="#" class="icon"><span>Delete this item?</span></a></span></h2><input type="hidden" id="perch__blocks_0__block_type" name="perch__blocks_0__block_type" value="text" class=""><input type="hidden" id="perch__blocks_0__block_id" name="perch__blocks_0__block_id" value="ny9kao" class=""><input type="hidden" id="perch__blocks_0__block_index" name="perch__blocks_0__block_index" value="" class="index"></div>

This is then followed by .block-add-bar.

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can add type="hidden" to those fields.

Of course, thanks Drew. Any ideas on why the Blocks are not showing their content fields?

I would really appreciate some guidance as to why my blocks are not loading correctly? It is holding up a project I cannot get them to work when they were prior to running this blog app update.

I've tried replacing all my blocks, even copying the code from the support document into a fresh block and it still does the same thing.

I just updated to the latest version of Perch on this site and had this debug, wondering if it's related. Although the sets updated there were a number of errors in the debug.

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='4fc593ae4a4ef44285059475710ca4d1' LIMIT 1
UPDATE perch2_users SET userHash='3bf3ce13446775ede435008012973044' WHERE userID='1'
SELECT p.privKey FROM perch2_user_privileges p
SELECT * FROM (SELECT DISTINCT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID DESC) AS settings GROUP BY settingID, settingValue, userID
SHOW TABLES LIKE 'perch2_content_index'
CREATE TABLE IF NOT EXISTS `perch2_content_index` ( `indexID` int(10) NOT NULL AUTO_INCREMENT, `itemID` int(10) NOT NULL DEFAULT '0', `regionID` int(10) NOT NULL DEFAULT '0', `pageID` int(10) NOT NULL DEFAULT '0', `itemRev` int(10) NOT NULL DEFAULT '0', `indexKey` char(64) NOT NULL DEFAULT '-', `indexValue` char(255) NOT NULL DEFAULT '', PRIMARY KEY (`indexID`), KEY `idx_key` (`indexKey`), KEY `idx_val` (`indexValue`), KEY `idx_rev` (`itemRev`), KEY `idx_item` (`itemID`), KEY `idx_keyval` (`indexKey`,`indexValue`), KEY `idx_regrev` (`regionID`,`itemRev`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
CREATE TABLE IF NOT EXISTS `perch2_resources` ( `resourceID` int(10) unsigned NOT NULL AUTO_INCREMENT, `resourceApp` char(32) NOT NULL DEFAULT 'content', `resourceBucket` char(16) NOT NULL DEFAULT 'default', `resourceFile` char(255) NOT NULL DEFAULT '', `resourceKey` enum('orig','thumb') DEFAULT NULL, `resourceParentID` int(10) NOT NULL DEFAULT '0', `resourceType` char(4) NOT NULL DEFAULT '', PRIMARY KEY (`resourceID`), UNIQUE KEY `idx_file` (`resourceBucket`,`resourceFile`), KEY `idx_app` (`resourceApp`), KEY `idx_key` (`resourceKey`), KEY `idx_type` (`resourceType`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
ALTER TABLE `perch2_content_items` ADD INDEX `idx_regrev` USING BTREE (itemID, regionID, itemRev)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_regrev'
ALTER TABLE `perch2_content_items` ADD INDEX `idx_order` USING BTREE (itemOrder)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_order'
ALTER TABLE `perch2_content_regions` ADD INDEX `idx_key` USING BTREE (regionKey)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_key'
ALTER TABLE `perch2_content_regions` ADD INDEX `idx_path` USING BTREE (regionPage)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_path'
ALTER TABLE `perch2_page_templates` ADD `templateNavGroups` VARCHAR(255) NULL DEFAULT '' AFTER `templateReference`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'templateNavGroups'
CREATE TABLE IF NOT EXISTS `perch2_navigation` ( `groupID` int(10) NOT NULL AUTO_INCREMENT, `groupTitle` varchar(255) NOT NULL DEFAULT '', `groupSlug` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`groupID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
CREATE TABLE IF NOT EXISTS `perch2_navigation_pages` ( `navpageID` int(10) unsigned NOT NULL AUTO_INCREMENT, `pageID` int(10) unsigned NOT NULL DEFAULT '0', `groupID` int(10) unsigned NOT NULL DEFAULT '0', `pageParentID` int(10) unsigned NOT NULL DEFAULT '0', `pageOrder` int(10) unsigned NOT NULL DEFAULT '1', `pageDepth` tinyint(10) unsigned NOT NULL, `pageTreePosition` varchar(64) NOT NULL DEFAULT '', PRIMARY KEY (`navpageID`), KEY `idx_group` (`groupID`), KEY `idx_page_group` (`pageID`,`groupID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC
ALTER TABLE `perch2_user_privileges` ADD UNIQUE INDEX `idx_key` (`privKey`)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('content.navgroups.configure','Configure navigation groups',7), ('content.navgroups.create','Create navigation groups',8), ('content.navgroups.delete','Delete navigation groups',9)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'content.navgroups.configure' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('content.pages.create.toplevel','Add new top-level pages',3)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'content.pages.create.toplevel' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('content.pages.delete.own','Delete pages they created themselves',4)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'content.pages.delete.own' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('content.templates.configure','Configure master pages',6)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'content.templates.configure' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('content.pages.republish','Republish pages', 12)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'content.pages.republish' for key 'idx_key'
ALTER TABLE `perch2_pages` ADD `pageAccessTags` VARCHAR(255) NOT NULL DEFAULT '' AFTER `pageNavOnly`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageAccessTags'
ALTER TABLE `perch2_pages` ADD `pageCreatorID` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `pageAccessTags`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageCreatorID'
ALTER TABLE `perch2_pages` ADD `pageModified` DATETIME NOT NULL DEFAULT '2014-01-01 00:00:00' AFTER `pageCreatorID`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageModified'
ALTER TABLE `perch2_pages` ADD `pageAttributes` TEXT NOT NULL AFTER `pageModified`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageAttributes'
ALTER TABLE `perch2_pages` ADD `pageAttributeTemplate` VARCHAR(255) NOT NULL DEFAULT 'default.html' AFTER `pageAttributes`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageAttributeTemplate'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('content.pages.attributes','Edit page titles and attributes',6)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'content.pages.attributes' for key 'idx_key'
CREATE TABLE IF NOT EXISTS `perch2_user_role_privileges` ( `roleID` int(10) unsigned NOT NULL, `privID` int(10) unsigned NOT NULL, PRIMARY KEY (`roleID`,`privID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
SHOW TABLES LIKE 'perch2_resource_log'
ALTER TABLE `perch2_resources` ADD `resourceCreated` DATETIME NOT NULL DEFAULT '2000-01-01 00:00:00' AFTER `resourceType`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceCreated'
ALTER TABLE `perch2_resources` ADD `resourceUpdated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `resourceCreated`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceUpdated'
ALTER TABLE `perch2_resources` ADD `resourceAWOL` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `resourceUpdated`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceAWOL'
ALTER TABLE `perch2_resources` ADD INDEX `idx_awol` (`resourceAWOL`)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_awol'
ALTER TABLE `perch2_resources` ADD `resourceTitle` CHAR(255) NULL DEFAULT NULL AFTER `resourceAWOL`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceTitle'
ALTER TABLE `perch2_resources` ADD `resourceFileSize` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `resourceTitle`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceFileSize'
ALTER TABLE `perch2_resources` ADD `resourceWidth` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `resourceFileSize`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceWidth'
ALTER TABLE `perch2_resources` ADD `resourceHeight` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `resourceWidth`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceHeight'
ALTER TABLE `perch2_resources` ADD `resourceCrop` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `resourceHeight`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceCrop'
ALTER TABLE `perch2_resources` ADD `resourceDensity` FLOAT NOT NULL DEFAULT '1' AFTER `resourceCrop`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceDensity'
ALTER TABLE `perch2_resources` ADD `resourceTargetWidth` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `resourceDensity`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceTargetWidth'
ALTER TABLE `perch2_resources` ADD `resourceTargetHeight` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `resourceTargetWidth`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceTargetHeight'
ALTER TABLE `perch2_resources` ADD `resourceMimeType` CHAR(64) NULL DEFAULT NULL AFTER `resourceTargetHeight`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceMimeType'
ALTER TABLE `perch2_resources` ADD FULLTEXT INDEX `idx_search` (`resourceTitle`)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_search'
ALTER TABLE `perch2_resources` ADD `resourceInLibrary` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `resourceMimeType`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'resourceInLibrary'
ALTER TABLE `perch2_resources` ADD INDEX `idx_library` (`resourceInLibrary`)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_library'
CREATE TABLE IF NOT EXISTS `perch2_resource_tags` ( `tagID` INT(10) NOT NULL AUTO_INCREMENT, `tagTitle` VARCHAR(255) NOT NULL DEFAULT '', `tagSlug` VARCHAR(255) NOT NULL DEFAULT '', `tagCount` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`tagID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC
CREATE TABLE IF NOT EXISTS `perch2_resources_to_tags` ( `resourceID` int(10) NOT NULL DEFAULT '0', `tagID` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`resourceID`,`tagID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED
CREATE TABLE IF NOT EXISTS `perch2_resource_log` ( `logID` int(10) unsigned NOT NULL AUTO_INCREMENT, `appID` char(32) NOT NULL DEFAULT 'content', `itemFK` char(32) NOT NULL DEFAULT 'itemRowID', `itemRowID` int(10) unsigned NOT NULL DEFAULT '0', `resourceID` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`logID`), KEY `idx_resource` (`resourceID`), KEY `idx_fk` (`itemFK`,`itemRowID`), UNIQUE KEY `idx_uni` (`appID`,`itemFK`,`itemRowID`,`resourceID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('assets.create','Upload assets',1)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'assets.create' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('assets.manage','Manage assets',2)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'assets.manage' for key 'idx_key'
CREATE TABLE IF NOT EXISTS `perch2_categories` ( `catID` int(10) NOT NULL AUTO_INCREMENT, `setID` int(10) unsigned NOT NULL, `catParentID` int(10) unsigned NOT NULL DEFAULT '0', `catTitle` char(64) NOT NULL DEFAULT '', `catSlug` char(64) NOT NULL DEFAULT '', `catPath` char(255) NOT NULL DEFAULT '', `catDisplayPath` char(255) NOT NULL DEFAULT '', `catOrder` int(10) unsigned NOT NULL DEFAULT '0', `catTreePosition` char(255) NOT NULL DEFAULT '000', `catDynamicFields` text NOT NULL, PRIMARY KEY (`catID`), KEY `idx_set` (`setID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
CREATE TABLE IF NOT EXISTS `perch2_category_sets` ( `setID` int(10) NOT NULL AUTO_INCREMENT, `setTitle` char(64) NOT NULL DEFAULT '', `setSlug` char(64) NOT NULL DEFAULT '', `setTemplate` char(255) NOT NULL DEFAULT 'set.html', `setCatTemplate` char(255) NOT NULL DEFAULT 'category.html', `setDynamicFields` text, PRIMARY KEY (`setID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('categories.create','Create new categories',1)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'categories.create' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('categories.delete','Delete categories',2)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'categories.delete' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('categories.manage','Manage categories',3)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'categories.manage' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('categories.sets.create','Create category sets',4)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'categories.sets.create' for key 'idx_key'
INSERT INTO `perch2_user_privileges` (`privKey`, `privTitle`, `privOrder`) VALUES ('categories.sets.delete','Delete category sets',5)
Invalid query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'categories.sets.delete' for key 'idx_key'
CREATE TABLE IF NOT EXISTS `perch2_resource_log` ( `logID` int(10) unsigned NOT NULL AUTO_INCREMENT, `appID` char(32) NOT NULL DEFAULT 'content', `itemFK` char(32) NOT NULL DEFAULT 'itemRowID', `itemRowID` int(10) unsigned NOT NULL DEFAULT '0', `resourceID` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`logID`), KEY `idx_resource` (`resourceID`), KEY `idx_fk` (`itemFK`,`itemRowID`), UNIQUE KEY `idx_uni` (`appID`,`itemFK`,`itemRowID`,`resourceID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
ALTER TABLE `perch2_content_regions` ADD `regionUpdated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `regionEditRoles`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'regionUpdated'
ALTER TABLE `perch2_content_items` ADD `itemUpdated` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER `itemSearch`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'itemUpdated'
ALTER TABLE `perch2_content_items` ADD `itemUpdatedBy` CHAR(32) NOT NULL DEFAULT '' AFTER `itemUpdated`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'itemUpdatedBy'
ALTER TABLE `perch2_pages` ADD `pageTemplate` CHAR(255) NOT NULL DEFAULT '' AFTER `pageAttributeTemplate`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageTemplate'
ALTER TABLE `perch2_pages` ADD `templateID` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `pageTemplate`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'templateID'
ALTER TABLE `perch2_pages` ADD `pageSubpageTemplates` VARCHAR(255) NOT NULL DEFAULT '' AFTER `templateID`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageSubpageTemplates'
ALTER TABLE `perch2_pages` ADD `pageCollections` VARCHAR(255) NOT NULL DEFAULT '' AFTER `pageSubpageTemplates`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'pageCollections'
CREATE TABLE IF NOT EXISTS `perch2_category_counts` ( `countID` int(10) unsigned NOT NULL AUTO_INCREMENT, `catID` int(10) unsigned NOT NULL, `countType` char(64) NOT NULL DEFAULT '', `countValue` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`countID`), KEY `idx_cat` (`catID`), KEY `idx_cat_type` (`countType`,`catID`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8
ALTER TABLE `perch2_categories` CHANGE `catDisplayPath` `catDisplayPath` CHAR(255) NOT NULL DEFAULT ''
-- DROP INDEX `idx_uni` ON `perch2_resource_log`
ALTER TABLE `perch2_resource_log` ADD UNIQUE INDEX `idx_uni` (`appID`, `itemFK`, `itemRowID`, `resourceID`)
Invalid query: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'idx_uni'
ALTER TABLE `perch2_users` ADD `userPasswordToken` CHAR(255) NOT NULL DEFAULT 'expired' AFTER `userMasterAdmin`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'userPasswordToken'
ALTER TABLE `perch2_users` ADD `userPasswordTokenExpires` DATETIME NOT NULL DEFAULT '2015-01-01 00:00:00' AFTER `userPasswordToken`
Invalid query: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'userPasswordTokenExpires'
SHOW TABLES LIKE 'perch2_resource_log'
SELECT COUNT(*) FROM perch2_resource_log
DELETE FROM perch2_settings WHERE settingID='update_2.8.20' AND userID=0 LIMIT 1
INSERT INTO perch2_settings(settingID,settingValue,userID) VALUES('update_2.8.20','done',0)

Investigating further into this as nothing I do seems to have any effect. This is the html of a block when I try to add one.

<div class="block-item">
<h2 class="divider">text<span class="rm"><a href="#" class="icon"><span>Delete this item?</span></a></span></h2>
<input type="hidden" id="perch__blocks_0__block_type" name="perch__blocks_0__block_type" value="text" class="">
<input type="hidden" id="perch__blocks_0__block_id" name="perch__blocks_0__block_id" value="o0fbbj" class="">
<input type="hidden" id="perch__blocks_0__block_index" name="perch__blocks_0__block_index" value="" class="index">
</div>

It seems to be hiding the inputs, which explains why they are not visible but nothing in my templates tells them to be hidden.

I am still none the wiser on this. No matter what I do I cannot get a blog post with blocks to show the actual inputs in the blocks. Is there any idea what may be causing it please!? It has been two months since I originally asked for support on it.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's working completely fine here. Are you able to reproduce it on a fresh test site? We can't reproduce your problem at all.