Forum
Help with using custom Redactor install
I'd like to use the old Perch 2 version of Redactor but cannot get it to work.
I have downloaded the Perch 2 version of Redactor from the Add-ons page. I have renamed the folder to my_redactor
and also updated the paths in the _config.inc
file e.g.
<script type="text/javascript" src="PERCH_LOGINPATH/addons/plugins/editors/my_redactor/redactor.min.js?v=1.2.5"></script>
<link rel="stylesheet" href="PERCH_LOGINPATH/addons/plugins/editors/my_redactor/perch/edit.css?v=1.2.5" type="text/css" />
<link rel="stylesheet" href="PERCH_LOGINPATH/addons/plugins/editors/my_redactor/redactor.min.css?v=1.2.5" type="text/css" />
<script type="text/javascript" charset="utf-8">
$(function() {
var set_up_redactor = function() {
$('textarea.redactor:not([data-init])').each(function(i,o){
var self = $(o);
var uploadFields = {
'width' : self.attr('data-width')||'',
'height' : self.attr('data-height')||'',
'crop' : self.attr('data-crop')||'',
'quality': self.attr('data-quality')||'',
'sharpen': self.attr('data-sharpen')||'',
'density': self.attr('data-density')||'',
'bucket' : self.attr('data-bucket')||'default'
};
self.wrap('<div class="editor-wrap" style="float:left;"></div>');
self.redactor({
imageUpload: 'PERCH_LOGINPATH/addons/plugins/editors/my_redactor/perch/upload.php?filetype=image',
fileUpload: 'PERCH_LOGINPATH/addons/plugins/editors/my_redactor/perch/upload.php',
fileUploadFields: uploadFields,
imageUploadFields: uploadFields
});
self.attr('data-init', true);
});
};
set_up_redactor();
$(window).on('Perch_Init_Editors', function(){
set_up_redactor();
});
});
</script>
My Template:
<perch:content id="redactor_text" type="textarea" label="Text" html="true" editor="my_redactor" imagewidth="750" imageheight="480" />
<section class="container introduction">
<div class="row text-center">
<perch:repeater id="intro" label="Introduction">
<div class="col-md-4">
<h3><perch:content id="heading" type="text" label="Heading" required="true" title="true" /></h3>
<perch:content id="text" type="textarea" label="Text" html="true" editor="my_redactor" imagewidth="750" imageheight="480" />
</div>
</perch:repeater>
</div>
</section>
The result is the text are has no formatting tools. There are no errors in dev tools.
Can you offer advice on how we can use the standard Perch 2 Redactor download?
Diagnostics:
Health check
Perch Runway is up to date
PHP 5.6.28 is up to date
MySQL 5.6.34 is up to date
Image processing available
Summary information
Perch information
Perch Runway: 3.0.4
Production mode: Production (100)
Installed apps: content (3.0.4), assets (3.0.4), categories (3.0.4)
DB driver: PDO
DB tables: perch3_backup_plans (0), perch3_backup_resources (0), perch3_backup_runs (0), perch3_categories (0), perch3_category_counts (0), perch3_category_sets (0), perch3_collection_index (0), perch3_collection_items (0), perch3_collection_revisions (0), perch3_collections (0), perch3_content_index (108), perch3_content_items (17), perch3_content_locks (0), perch3_content_regions (5), perch3_menu_items (8), perch3_navigation (0), perch3_navigation_pages (0), perch3_page_routes (0), perch3_page_templates (7), perch3_pages (5), perch3_resource_log (0), perch3_resource_tags (0), perch3_resources (2), perch3_resources_to_tags (0), perch3_settings (20), perch3_user_passwords (0), perch3_user_privileges (27), perch3_user_role_privileges (2), perch3_user_roles (2), perch3_users (1)
Users: 1
App runtimes:
<?php
$apps_list = [
];
Editor plug-ins: my_redactor
H1: aecec8c4aa4cf67a529d17d0e9d3e7f6
L1: fa71a4809903f074254c872acf0dfb07
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
headerColour: 8ed1e3
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 1
content_collapseList: 1
lang: en-gb
installedAt: 3.0.4
update_3.0.4: done
headerScheme: light
update_runway_3.0.4: done
latest_version:
on_sale_version: 3.0.4
dashboard: 0
hide_pwd_reset: 0
siteOffline: 0
content_hideNonEditableRegions: 1
content_frontend_edit: 0
content_skip_region_list: 0
logoPath: /perch/resources/hfh-healthcare-logo-2017.png
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_SITEPATH: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder
PERCH_SCHEDULE_SECRET: PCs6rWqqeeqPgcBc
PERCH_DB_USERNAME: root
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: hfh_new_local
PERCH_DB_PREFIX: perch3_
PERCH_EMAIL_FROM: simon@sly-deisgn.co.uk
PERCH_EMAIL_FROM_NAME: Simon Clay
PERCH_LOGINPATH: /perch
PERCH_PATH: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder/perch
PERCH_CORE: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder/perch/core
PERCH_RESFILEPATH: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_TZ: UTC
PERCH_RUNWAY: 1
PERCH_ERROR_MODE: DIE
PERCH_DATE_LONG: %d %B %Y
PERCH_DATE_SHORT: %d %b %Y
PERCH_TIME_SHORT: %H:%M
PERCH_TIME_LONG: %H:%M:%S
PERCH_RUNWAY_ROUTED:
PERCH_STRONG_PASSWORDS:
PERCH_ASSET_VERSION: ed79f7a54b300ef2b1e6
PERCH_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder/perch/templates
PERCH_TEMPLATE_FILTERS:
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_XHTML_MARKUP:
PERCH_RWD: 1
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_DEFAULT_BUCKET: default
PERCH_TRANSLATION_ASSIST:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_PRIV_ASSIST:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_APPS_EDITOR_PLUGIN: markitup
PERCH_APPS_EDITOR_MARKUP_LANGUAGE: markdown
Hosting settings
PHP: 5.6.28
Zend: 2.6.0
OS: Darwin
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.6.34
Free disk space: 771.86 GB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, hash, fileinfo, filter, ftp, gd, SPL, iconv, intl, json, ldap, mbstring, session, standard, mysqlnd, mysqli, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, mysql, SimpleXML, soap, sockets, exif, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, zip, cgi-fcgi, imap, gettext, mcrypt, pgsql, pdo_pgsql, igbinary, memcached, mhash
GD: Yes
ImageMagick: No
PHP max upload size: 32M
PHP max form post size: 32M
PHP memory limit: 128M
Total max uploadable file size: 32M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: Yes
PHP_FCGI_CHILDREN: 4
PWD: /Applications/MAMP/fcgi-bin
PHP_FCGI_MAX_REQUESTS: 200
__CF_USER_TEXT_ENCODING: 0x1F5:0x0:0x2
ORIG_SCRIPT_NAME: /fcgi-bin/php5.6.28.fcgi
ORIG_PATH_TRANSLATED: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder/perch/core/settings/diagnostics/index.php
ORIG_PATH_INFO: /perch/core/settings/diagnostics/index.php
ORIG_SCRIPT_FILENAME: /Applications/MAMP/fcgi-bin/php5.6.28.fcgi
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/?extended
QUERY_STRING: extended
REQUEST_METHOD: GET
SERVER_PROTOCOL: HTTP/1.1
GATEWAY_INTERFACE: CGI/1.1
REDIRECT_URL: /perch/core/settings/diagnostics/index.php
REDIRECT_QUERY_STRING: extended
REMOTE_PORT: 51139
SCRIPT_FILENAME: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder/perch/core/settings/diagnostics/index.php
SERVER_ADMIN: you@example.com
DOCUMENT_ROOT: /Users/simonclay/Dropbox/Clients/HFH Care/New Website Design/Website Folder
REMOTE_ADDR: ::1
SERVER_PORT: 8888
SERVER_ADDR: ::1
SERVER_NAME: hfhnew
SERVER_SOFTWARE: Apache
PATH: /usr/bin:/bin:/usr/sbin:/sbin
HTTP_ACCEPT_LANGUAGE: en-gb
HTTP_CACHE_CONTROL: max-age=0
HTTP_REFERER: https://hfhnew:8888/perch/core/settings/diagnostics/
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/602.3.12 (KHTML, like Gecko) Safari
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: _ga=GA1.1.1033874148.1495107299; _gid=GA1.1.1859165988.1495190768; PHPSESSID=419c9bf1deec10103bd53c89037912b7; cmsa=1
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_HOST: hfhnew:8888
REDIRECT_STATUS: 200
REDIRECT_HANDLER: php-fastcgi
FCGI_ROLE: RESPONDER
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1495194123.48
REQUEST_TIME: 1495194123
argc: 1
You can't use the Perch 2 version of Redactor with Perch 3.
In another post you mentioned 'You can still install your own - just give it a customised name.' https://forum.grabaperch.com/forum/03-27-2017-perch-3-redactor
Did you mean we can use the Perch 3 redactor folder from
core
to create our customised version, or did you mean 'purchase our own version of redactor' and give it a custom name?You can copy the one from core.
Thanks.
I have copied the Redactor folder from
core
toperch/addons/plugins/editors
and renamed it to 'my_redactor'.I have updated the paths in
_config.json
:But the result is a text area with no Redactor toolbar. No errors in dev tools.
Can you help with what I'm missing? Thanks.
Are you referencing
my_redactor
as your editor in the templates?Yes, I am, as the template at the top of this post.
Your code is still looking for
textarea.redactor