Forum

Thread tagged as: Error, Installation, Blog

Blog is not working

I copied the files and everything as I should've done following the video, but when I click on Apps/Blog in perch I get these errors:

Warning: include(../../inc/api.php) [function.include]: failed to open stream: No such file or directory in /var/sites/d/dev.site.co.uk/public_html/admin/addons/apps/perch_blog/index.php on line 3

Warning: include(../../inc/api.php) [function.include]: failed to open stream: No such file or directory in /var/sites/d/dev.site.co.uk/public_html/admin/addons/apps/perch_blog/index.php on line 3

Warning: include() [function.include]: Failed opening '../../inc/api.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/sites/d/dev.site.co.uk/public_html/admin/addons/apps/perch_blog/index.php on line 3

Fatal error: Class 'PerchAPI' not found in /var/sites/d/dev.site.co.uk/public_html/admin/addons/apps/perch_blog/index.php on line 5

I've gone to that path and it's supposed to be ../../core/inc/api.php but when I modified to this one it still didn't work, it fixed the templat meaning that in Apps/Blog it shows the menu and no errors, but the blog part is blank.

Satpal Juttla

Satpal Juttla 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which version of Blog and which version of Perch are you using?

Latest versions for both of them

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok. Can you try reuploading your files?

I did that twice now, same errors with the file paths

Drew McLellan

Drew McLellan 2638 points
Perch Support

Can you show be your diagnostics report?

As I've seen now in the diagnostics report perch version is 2.6.3 not the latest one as I thought so that's what is probably causing the errors. How do I proceed now ? should I update (it will mess with my content?) ? or there is a blog app version that's compatible with this version of perch ?

PERCH INFORMATION

Perch: 2.6.3
Production mode: Production (100)
Installed apps: content (2.6.3), assets (2.6.3), categories (2.6.3), perch_blog (2.9), perch_forms (1.7)
DB driver: PDO
DB tables: perch2_blog_categories, perch2_blog_posts, perch2_blog_posts_to_categories, perch2_blog_posts_to_tags, perch2_blog_tags, perch2_categories, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_content_resources, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_log, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users
Users: 1
App runtimes:
<?php
    $apps_list = array(
        'content', 
        'categories',
        'perch_blog',
        'perch_forms',
    );
Editor plug-ins: markitup, ckeditor
H1: 761595fe15ea2bf591483791f32d58d4
L1: c17dd6e39770e1e7d989167ccf7e18aa
headerColour: #ffffff
content_singlePageEdit: 1
helpURL:
siteURL: /
hideBranding: 0
content_collapseList: 1
lang: en-gb
update_2.6.3: done
latest_version: 2.5.3
on_sale_version: 2.6.6
update_2.4.6: done
PERCH_DEVELOPMENT: 10
PERCH_STAGING: 50
PERCH_PRODUCTION: 100
PERCH_DB_USERNAME: ladiespa_main
PERCH_DB_SERVER: 10.168.1.43
PERCH_DB_DATABASE: ladiespa_main
PERCH_DB_PREFIX: perch2_
PERCH_TZ: UTC
PERCH_EMAIL_FROM: dm@site.com
PERCH_EMAIL_FROM_NAME: Dragos 
PERCH_LOGINPATH: /admin
PERCH_PATH: /var/sites/d/dev.site.co.uk/public_html/admin
PERCH_CORE: /var/sites/d/dev.site.co.uk/public_html/admin/core
PERCH_RESFILEPATH: /var/sites/d/dev.site.co.uk/public_html/admin/resources
PERCH_RESPATH: /admin/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_DEBUG:
PERCH_PREVIEW_ARG: preview
PERCH_TEMPLATE_PATH: /var/sites/d/dev.site.co.uk/public_html/admin/templates
PERCH_DEFAULT_DOC: index.php
PERCH_DEFAULT_EXT: .php
PERCH_PRODUCTION_MODE: 100
PERCH_RWD:
PERCH_HTML_ENTITIES:
PERCH_SSL:
PERCH_AUTH_PLUGIN:
PERCH_DB_CHARSET: utf8
PERCH_DB_PORT:
PERCH_DB_SOCKET:

If you need hosting setting as well let me know, thank a lot for helping.

Satpal, updating perch is pretty simple. after making a backup of your database, replace perch/core with same folders from current version. then when you login to perch it will run the update script.

Robert

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Where did you download Blog 2.9 from? You need to download the latest version of Blog which is 4.5.2.

Also please update Perch to 2.6.6 - that should be straightforward.

Thank you so much for your help, I updated the perch and installed the latest version of the blog. There seems to be a problem with the links on the perch homepage because they redirected somehow to the Archive page (https://grabaperch.com/add-ons/archive/apps). Anyway I got it installed and working but now I have a new problem regarding the posts on blog, whenever I try to add a new post I get this error "Sorry, that post could not be updated." even though I don't try to update any post, just to add a new post.

Also the Categories are not present in the menu in Perch admin for some reason, only Add/Edit, Comments, Authors, Sections.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Categories are in the App menu at the top.

Ok, it is there in the menu, but it's not like in the video where it's supposed to be between Add/Edit and Comments (https://imgur.com/8fLff13). Anyway I've made a category from the menu there and tried to add a new post, I still get that error no matter what... "Sorry, that post could not be updated."

Drew McLellan

Drew McLellan 2638 points
Perch Support

The video is from a slightly older version.

Did you fully remove the old version of blog, or are you still running the Perch 1 blog database tables?

I fully removed all the files from the old one, which tables do I need to remove from the old one ?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Any tables with blog in the name.

Yes, perfect, now it works like it should work, thanks a lot guys, I really appreciate your help, have a nice day!