Forum

Thread tagged as: Problem, Blog

Upgrading a Blog (after site was hacked!)

Hi there, A client's site was hacked over the weekend. It's a pretty old site that's still is use. The index.php files and the Blog/index.php in particular were hacked. I backed up the SQL DB, rolled back the Perch/Core & Perch/addons/Apps folders and confirmed that the site's Perch was fairly old (v.2.4.9) So, I upgraded Perch to the latest version 2.8.34. Everything is back as it should be, however the blog no longer lets you add posts. I'm assuming this may be down to the upgrade itself? Can Perch admins confirm this and if so point me in the right direction to upgrade the existing blog. I've included necessary info below.

Diagnostics report
PERCH INFORMATION

Perch: 2.8.34
Production mode: Production (100)
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_shop_foxycart (2), perch_blog (3.7.6), perch_upgrade (1.4)
DB driver: PDO
DB tables: perch2_blog_authors (2), perch2_blog_categories (1), perch2_blog_comments (0), perch2_blog_posts (207), perch2_blog_posts_to_categories (1), perch2_blog_posts_to_tags (0), perch2_blog_tags (0), perch2_categories (0), perch2_category_counts (0), perch2_category_sets (0), perch2_content_index (1616), perch2_content_items (3065), perch2_content_regions (111), perch2_navigation (0), perch2_navigation_pages (0), perch2_page_templates (1), perch2_pages (36), perch2_resource_log (2501), perch2_resource_tags (0), perch2_resources (203), perch2_resources_to_tags (0), perch2_settings (37), perch2_shop_categories (0), perch2_shop_log (165), perch2_shop_orders (165), perch2_shop_product_option_values (0), perch2_shop_product_options (0), perch2_shop_products (1), perch2_shop_products_to_categories (0), perch2_user_passwords (1), perch2_user_privileges (38), perch2_user_role_privileges (15), perch2_user_roles (2), perch2_users (2), perch_blog_categories (2), perch_blog_posts (105), perch_blog_posts_to_categories (1), perch_blog_posts_to_tags (0), perch_blog_tags (0), perch_contentItems (109), perch_settings (11), perch_users (3)
Users: 2
PHPMailer: 5.2.21
App runtimes:
<?php
    include(PERCH_PATH.'/core/apps/content/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_blog/runtime.php');
    include(PERCH_PATH.'/addons/apps/perch_shop_foxycart/runtime.php');
?>
Editor plug-ins: markitup
H1: c93d8562529e245e713fbbb0c08e0c96
L1: ad22f4b2896bc9a59bbaf77f466992e7
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.2.9: done
latest_version: 2.8.15
headerLinkColour: #000000
logoPath: /perch/resources/1312057531_slane_castle_logo_small.jpg
linkColour: #333333
editorMayDeleteRegions: 0
latestUpdate: 1.8.4
perch_blog_post_url: /blog/post.php?s={postSlug}
perch_blog_update: 3.7.5
on_sale_version: 2.8.34
update_2.4.9: done
perch_shop_foxycart_update: 2.0
headerScheme: light
perch_blog_slug_format: %Y-%m-%d-{postTitle}
perch_blog_akismet_key:
perch_upgrade_v1_prefix: perch_
perch_shop_foxy_url: https://slanecastle.foxycart.com/cart
perch_shop_foxy_api: zBDYu5Lu8HwU9BFez7N1pcGnpTfuGwb62EUrAAPCccsfDXk7ZYYe1zskixEP
dashboard: 0
hide_pwd_reset: 0
content_hideNonEditableRegions: 0
content_frontend_edit: 0
perch_blog_comment_notify: 0
perch_shop_foxy_security: 0
perch_shop_display_oos: 0
perch_shop_product_url: /castle//slane-2015-vip.php?s={productSlug}
update_2.8.34: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: slanecas_slanec
PERCH_DB_SERVER: localhost
PERCH_DB_DATABASE: slanecas_slanec
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: studio@bammedia.ie
PERCH_EMAIL_FROM_NAME: Bridget Kerrigan
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/slanecas/public_html/perch
PERCH_CORE: /home/slanecas/public_html/perch/core
PERCH_RESFILEPATH: /home/slanecas/public_html/perch/resources
PERCH_RESPATH: /perch/resources
PERCH_HTML5: 1
PERCH_RUNWAY:
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_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /home/slanecas/public_html/perch/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_STRIPSLASHES:
PERCH_PROGRESSIVE_FLUSH: 1
PERCH_PARANOID:
PERCH_FORCE_SECURE_COOKIES:
PERCH_PASSWORD_MIN_LENGTH: 6
PERCH_MAX_FAILED_LOGINS: 10
PERCH_AUTH_LOCKOUT_DURATION: 1 HOUR
PERCH_VERIFY_UPLOADS:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:
PERCH_SESSION_TIMEOUT_MINS: 20
HOSTING SETTINGS

PHP: 5.6.29
Zend: 2.6.0
OS: Linux
SAPI: cgi-fcgi
Safe mode: not detected
MySQL client: mysqlnd 5.0.11-dev - 20120503 - $Id: 76b08b24596e12d4553bd41fc93cccd5bac2fe7a $
MySQL server: 5.5.52-cll
Free disk space: 1.01 TB
Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dom, filter, ftp, gd, gettext, gmp, hash, iconv, SPL, json, mbstring, mcrypt, session, mysql, mysqli, standard, Phar, posix, pspell, Reflection, mysqlnd, SimpleXML, sockets, imap, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, zip, cgi-fcgi, PDO, pdo_sqlite, pdo_mysql, ionCube Loader, Zend Guard Loader
GD: Yes
ImageMagick: No
PHP max upload size: 20M
PHP max form post size: 20M
PHP memory limit: 64M
Total max uploadable file size: 20M
Resource folder writeable: Yes
Session timeout: 24 minutes
Native JSON: Yes
Filter functions: Yes
Transliteration functions: No
DOCUMENT_ROOT: /home/slanecas/public_html
GATEWAY_INTERFACE: CGI/1.1
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE: en-GB,en-US;q=0.8,en;q=0.6
HTTP_CONNECTION: keep-alive
HTTP_COOKIE: gallery-fadeshow1=2; __unam=5b7ad6a-159d048e45c-1d8a4ce-12; __utma=87641050.1785268930.1485258155.1485258155.1485258155.1; __utmb=87641050.6.10.1485258155; __utmc=87641050; __utmz=87641050.1485258155.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); cmsa=1; PHPSESSID=090c74943347da01901ff42bf4d70ce3
HTTP_HOST: www.slanecastle.ie
HTTP_REFERER: https://www.slanecastle.ie/perch/core/settings/diagnostics/
HTTP_UPGRADE_INSECURE_REQUESTS: 1
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
PATH: /bin:/usr/bin
QUERY_STRING: extended
REDIRECT_STATUS: 200
REMOTE_ADDR: 86.47.33.111
REMOTE_PORT: 10266
REQUEST_METHOD: GET
REQUEST_URI: /perch/core/settings/diagnostics/?extended
SCRIPT_FILENAME: /home/slanecas/public_html/perch/core/settings/diagnostics/index.php
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
SERVER_ADDR: 80.93.29.14
SERVER_ADMIN: webmaster@slanecastle.ie
SERVER_NAME: www.slanecastle.ie
SERVER_PORT: 80
SERVER_PROTOCOL: HTTP/1.1
SERVER_SIGNATURE: <address>Apache Server at www.slanecastle.ie Port 80</address>
SERVER_SOFTWARE: Apache
SITE_WEB_SCRIPT_EXECUTE: /castle/pdf/press/premium.php
UNIQUE_ID: WIdBslBdHQ4AACBF46EAAAAf
PHP_SELF: /perch/core/settings/diagnostics/index.php
REQUEST_TIME_FLOAT: 1485259186.75
REQUEST_TIME: 1485259186
argc: 1



**** TEMPLATE**** <?php include('../perch/runtime.php'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Lord Henry's Blog - Slane Castle</title> <!--css--> <link rel="stylesheet" href="blog.css" type="text/css" /> <link href="../castle/css/castlestyle.css" rel="stylesheet" type="text/css" /> <link href="../castle/css/castleslider.css" rel="stylesheet" type="text/css" /> <link href="../castle/css/castlenavigation.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="favicon.ico"> <!--seo--> <meta name="keywords" content="slane castle, blog, lord henry, henry mountcharles, county meath" /> <meta name="Description" content="Lord Henry's Blog" /> <meta name="audience" content="all" /> <meta name="language" content="en" /> <!-- jQuery library --> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <!--shareicons--> <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="https://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'cfe9910d-0862-41e2-95fd-cacccc54c674'});</script> <!--end of shareicons--> </head> <!--start of body--> <body> <!--940wide--> <div class="wideholder1" id="wideholder1"> <!--top banner--> <div class="topbanner" id="topbanner"> <!--navigationbar--> <div class="navigationbar" id="navbar" style="z-index:1;"> <ul id="nav"> <li><a href="../castle/castle_home.php" title="HOMEPAGE" target="_parent">HOME</a></li> <li><a href="../castle/castle_weddings.php" title="WEDDINGS" target="_parent">WEDDINGS</a> <ul> <li><a href="../castle/castle_weddings.php" title="WEDDINGS" target="_parent">WEDDINGS HOME</a></li> <li><a href="../castle/castle_civil.php" title="CIVIL CEREMONIES &amp; PARTNERSHIPS" target="_parent">CIVIL CEREMONIES &amp; PARTNERSHIPS</a></li> <li><a href="../castle/castle_menus_wine.php" title="MENUS" target="_parent">MENUS &amp; WINE LISTS</a></li> <li><a href="../castle/castle_gallery.php" title="WEDDING GALLERY" target="_parent">WEDDING GALLERY</a></li> <li><a href="../castle/castle_testimonials.php" title="WEDDING TESTIMONIALS" target="_parent" >TESTIMONIALS</a></li> <li><a href="../castle/castle_wedding_enquiry.php" title="WEDDING ENQUIRY" target="_parent">WEDDING ENQUIRY</a></li> </ul> </li> <li><a href="../castle/castle_slane2013.php" title="CONCERTS &amp; EVENTS" target="_parent">CONCERTS &amp; EVENTS</a> <ul> <li><a href="../castle/castle_slane2013.php" title="SLANE 2013" target="_parent">SLANE 2013</a></li> <li><a href="../castle/castle_faqs.php" title="FAQ'S" target="_parent">FAQ'S</a></li> <li><a href="../castle/castle_vip.php" title="VIP AREA" target="_parent">VIP AREA</a></li> <li><a href="../castle/castle_concerts.php" title="PAST CONCERTS" target="_parent">PAST CONCERTS</a></li> <li><a href="../castle/castle_events.php" title="PAST EVENTS" target="_parent">PAST EVENTS</a></li> <li><a href="../castle/castle_private.php" title="PRIVATE EVENTS" target="_parent">PRIVATE EVENTS</a></li> <li><a href="../castle/castle_nightclub.php" title="NIGHTCLUB" target="_parent">NIGHTCLUB</a></li> <li><a href="../castle/castle_concert_gallery.php" title="GALLERY" target="_parent">GALLERY</a></li> </ul> </li> <li><a href="../castle/castle_history.php" title="HISTORY" target="_parent">HISTORY</a> <ul> <li><a href="../castle/castle_history.php" title="THE CONYNGHAM FAMILY" target="_parent">THE CONYNGHAM FAMILY</a></li> <li><a href="../castle/castle_fire.php" title="THE FIRE" target="_parent">THE FIRE</a></li> <li><a href="../castle/castle_architecture.php" title="ARCHITECTURE &amp; LANDSCAPE" target="_parent">ARCHITECTURE &amp; LANDSCAPE</a></li> <li><a href="../castle/castle_local.php" title="LOCAL HISTORY &amp; LINKS" target="_parent">LOCAL HISTORY &amp; LINKS</a></li> </ul> </li> <li><a href="../castle/castle_tours.php" title="CASTLE TOURS" target="_parent">TOURS</a> <ul> <li><a href="../castle/castle_tours.php" title="SEASONAL TOURS" target="_parent">SEASONAL TOURS</a></li> <li><a href="../castle/castle_private_tours.php" title="HISTORICAL TOUR" target="_parent">OFF SEASON PRIVATE TOURS</a></li> <li><a href="../castle/castle_courtyard_cafe.php" title="COURTYARD CAFE" target="_parent">COURTYARD CAFE</a></li> </ul> </li> <li><a href="../castle/castle_news.php" title="NEWS &amp; BLOG" target="_parent">NEWS &amp; BLOG</a> <ul> <li><a href="../castle/castle_news.php" title="NEWS UPDATES" target="_parent">NEWS UPDATES</a></li> <li><a href="https://www.slanecastle.ie/blog/index.php" title="LORD HENRY'S BLOG" target="_parent" class="current">LORD HENRY'S BLOG</a></li> </ul> </li> <li><a href="../castle/castle_press.php" title="PRESS" target="_parent">PRESS</a> <ul> <li><a href="../castle/castle_press.php" title="PRESS" target="_parent">PRESS</a></li> <li><a href="../castle/castle_concert_gallery.php" title="GALLERY" target="_parent">GALLERY</a></li> </ul> </li> <li><a href="../castle/castle_contact.php" title="CONTACT &amp; LOCATION" target="_parent">CONTACT</a></li> <li><a href="../castle/whiskey_holdingpage.php" title="IRISH WHISKEY" target="_parent">IRISH WHISKEY</a></li> </ul> <script src="https://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.core.js" type="text/javascript"></script> <script type="text/javascript" src="js/scripts.js"></script> </div> <!--end of navigationbar--> </div><!--end of top banner--> <!--header image--> <img src="../castle/images/castle_header_blog.jpg" width="940" height="181" border="0px" alt="Blog header" /> <!--end of header image--> <!--columnwrapper--> <div class="columnwrapper" id="columnwrapper"> <!--body copy column 2--> <div class="column4" id="column1_stockists"> <img src="../castle/images/castle_line_main.png" alt="left line" width="540" height="7" border="0" /> <h1>Lord Henry's Blog</h1> <img src="../castle/images/castle_line_main2.png" alt="left line" width="540" height="7" border="0" style="margin-bottom:10px;"/> <!--start of blog entry--> <!-- this is an example blog homepage showing a simple call to perch_blog_recent_posts() Posts are displayed using the templates stored in perch/apps/perch_blog/templates/blog you can edit these as you wish, making sure that the paths used in these templates are correct for your installation. --> <?php perch_blog_recent_posts(5); ?> <p><a href="archive.php">More posts</a></p> </div> <!--end of body copy column 2--> <!--body copy column 3--> <div class="column5" id="column2_stockists"> <img src="../castle/images/castle_line_main.png" alt="left line" width="200" height="7" border="0" /> <h1>Blog Archive</h1> <img src="../castle/images/castle_line_main2.png" alt="left line" width="200" height="7" border="0" style="margin-bottom:10px;"/> <!-- The following functions are different ways to display archives. You can use any or all of these. All of these functions can take a parameter of a template to overwrite the default template, for example: perch_blog_categories('my_template.html'); --> <!-- By category listing --> <?php perch_blog_categories(); ?> <!-- By tag --> <?php perch_blog_tags(); ?> <!-- By year --> <?php perch_blog_date_archive_years(); ?> <!-- By year and then month - can take parameters for two templates. The first displays the years and the second the months see the default templates for examples --> <?php perch_blog_date_archive_months(); ?> </div> <!--end of body copy column 3--> </div> <!--end of columnwrapper--> </div> <!--end of 940wide--> <!--footerwrapper--> <div class="footerwrapper" id="footerwrapper"> <!--footer--> <div class="footer" id="footer"> <p><img src="../castle/images/whiskey_footer_line.png" width="780" height="7" alt="Line" style="margin-bottom:10px;"/></p> <table width="780" height="162" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="235" height="162" align="left" valign="top"> <h4 align="left">Follow us on facebook!</h4> <iframe src="https://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fhome.php%23%21%2Fofficialslanecastle&amp;width=235&amp;colorscheme=light&amp;show_faces=false&amp;border_color=%23000&amp;stream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:235px; height:62px;" allowTransparency="true"></iframe> </td> <td width="161" align="left" valign="top"> <h4 align="left">Follow us on Twitter!</h4> <p><a href="https://twitter.com/slanecastle" class="twitter-follow-button" data-show-count="false">Follow @slanecastle</a> <script src="https://platform.twitter.com/widgets.js" type="text/javascript"></script></p> </td> <td width="384" align="right" valign="top"> <p>Web design by <a href="https://www.bammedia.ie" target="_blank">BAMMEDIA.ie</a></p><p> All rights reserevd. ©Slane Castle 2011.</p> <p><a href="../castle/whiskey_home.php" target="_blank">Visit Slane Whiskey Site</a> | <a href="../castle/sitemap.html">Sitemap</a> | <a href="../castle/castle_contact.php">Contact</a></p></td> </tr> </table> </div> <!--end of footer--> </div> <!--end of footerwrapper--> </body> </html>
Cormac Kerrigan

Cormac Kerrigan 0 points

  • 4 years ago

I am reviewing this page > https://docs.grabaperch.com/addons/blog/updating/ which I assume applies to my case as our blog is 3.7.6.

Please see our current post.html code below.

<div class="hentry">
    <h5><a href="post.php?s=<perch:blog id="postSlug" />" rel="bookmark" class="entry-title"><perch:blog id="postTitle" /></a></h5>
    <h2 class="entry-published date"><perch:blog id="postDateTime" format="%d %B %Y" /></h2>
    <perch:if exists="image">
        <div><img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Post image" />" alt="<perch:blog id="postTitle" />" /></div>
    </perch:if>
    <div class="description entry-content">
        <perch:blog id="postDescHTML" encode="false" />
    </div>
</div>

<perch:blog id="excerpt" type="textarea" label="Excerpt" editor="markitup" textile="true" order="1" suppress="true" />
<perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />
Rachel Andrew

Rachel Andrew 394 points
Perch Support

You need to upgrade blog too. An ancient copy of blog is not going to work with a new copy of Perch.

Hi Rachel, thanks for coming back to me. So from reading your documentation, I need to edit the above post.html file to something like below: I'm a little unclear does editor="markitup" & textile="true" need to be replaced with markdown="true". Or do I leave these as they and just add in markdown="true"?

<div class="hentry">
    <h5><a href="post.php?s=<perch:blog id="postSlug" />" rel="bookmark" class="entry-title"><perch:blog id="postTitle" /></a></h5>
    <h2 class="entry-published date"><perch:blog id="postDateTime" format="%d %B %Y" /></h2>
    <perch:if exists="image">
        <div><img src="<perch:blog id="image" type="image" width="320" height="240" crop="true" label="Post image" />" alt="<perch:blog id="postTitle" />" /></div>
    </perch:if>
    <div class="description entry-content">
        <perch:blog id="postDescHTML"  type="textarea" label="Post" order="2" encode="false" />
    </div>
</div>

<perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="1" suppress="true" />
<perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />
Drew McLellan

Drew McLellan 2638 points
Perch Support

Only add markdown="true" if you're using Markdown. If you're using Textile then you need textile="true".

Great guys, thanks for your help. Got everything back running. (just needed to re-familiarise myself with Perch) :-)