Perch Update 2.1
17 January 2013
We’ve updated Perch with a number of new features and bug fixes discovered through our support system. This is an update to Perch 2. Please read the full Perch 2.0 update notes if updating from Perch 1.
Do I need to install this?
This update is recommended for those experiencing the below issues, those wanting to use new features, and those wanting to receive technical support.
What does it fix?
This release fixes the below issue:
- Fixes an issue which caused occasional ‘blank’ admin pages on some hosting configurations
- Switches image resizing to use GD by preference, to avoid problematic ImageMagick installations
- Fixes a bug where sibling navigation would show hidden pages
- Reinstates resource cleanup for any new resources added (unfortunately, old resources will need to be cleaned up manually)
- Prevents
aria-*attributes on form fields being incorrectly stripped out - Fixes a bug with
dataselectfieldtypes not working within apps
What features does it add?
- Adds multiple filters to
perch_content_custom - Adds multiple page options to perch_content_custom:
'page'=>array('/property.php', '/property_archive.php')or'page'=>'/property*' - New
perch_search_form() function for easily outputting a search form - New
densityattribute on images (default 1) - New
sharpenattribute on images 0-10 (default 4) - Image fieldtype has new
output="tag"mode for quick output of basic tags - Adds resource buckets
- Adds
config/buckets.phpfor specifying custom resource buckets - Adds
bucketattribute for resource buckets. - Adds navigation groups
- New method
PerchSystem::get_page()to get path as Perch sees it. - Switched DB connection library from
mysqltoPDO, will fallback toMySQLi - New DB options:
PERCH_DB_CHARSET,PERCH_DB_PORT,PERCH_DB_SOCKET. Leave all unset unless you know you need them. - New
PERCH_TZconfig variable for setting timezone (also set during setup) - Textile now using HTML5 mode if
PERCH_HTML5is true - Updated Textile to 2.5.0 (including fixes for links with spaces in them)
- New
PERCH_RWDconfig option for omitting width and height on Textile images - New template value
id="_page"for content regions - New
type="cms"form field for inserting hidden CMS field without usingtype="submit" - Adds
'sort-type'=>'numeric'toperch_content_custom() - Adds
urlencode="true"attribute to template tags perch:if@format@ attribute now works withidas well asdifferent- New
return-htmloption for use withskip-templateinperch_content_custom(). dataselectoptions can now be space-delimited field IDs- Adds padding formatting option
format="P:length|string|left" - Adds
hide-default-docandadd-trailing-slashoptions to search results - Many performance and memory footprint improvements
- New update mechanism
What impact does it have for my clients?
This update should not have any impact on users unless they are experiencing the above issues.
A note about database connections
Forthcoming changes in PHP mean that Perch 2.1 now uses a different method of connecting to the database. As part of that, we’ve taken the decision to explicitly select a UTF8 character set for the database connection. If your site currently doesn’t use a UTF8 connection, and you use non-ASCII characters in your content, you can set Perch to use your old character set in the perch/config/config.php file. e.g.
define('PERCH_DB_CHARSET', 'latin1');
Where do I get the update?
Log into your account and re-download the files. The download has been replaced with the newest version.
Always make a back-up of your files and database before updating.
Unzip the download and replace your perch/core folder with the new perch/core folder. Perch will update itself when you log in.