Forum

Thread tagged as: Question, Blog

Categories

Hello,

I am new to this all. I have freshly installed everything. I am following the video tutorials of how to set-up a blog. Everything works except the categories menu. Been through the forums and now I am here.

In the CMS itself categories is listed as a 'title' but with no options. I have created 2 but no where to be found. ?

<?php include('../perch/runtime.php');?>
<!doctype html>
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
<!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
<!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="" lang="de">
<!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
 <link rel="shortcut icon" type="image/png" href="favicon.png">
<title>hello</title>
<meta name="keywords" content="" />
<meta name="description" content=""/>
<link href="css/boilerplate.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
    <link href="style.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="navi/responsive-nav.css">
<link rel="stylesheet" href="navi/navi.css">


</head>
<body>
<div class="gridContainer clearfix">
  <div id="main">

    <div id="logo"><p class="life">A Blog.&nbsp; Julia and Tony<h1>The Melvin's</h1><p>

    </div>
<div id="left">
<?php perch_blog_recent_posts(10); ?>
</div>
      <div id="right"><h2>Archive</h2>
<h3>Categories</h3>

<?php perch_blog_categories(); ?>

</div>

    <div id="footer">This is the content for Layout Div Tag "footer"</div>
  </div></div>
  <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
    <script src="js/respond.min.js"></script>
 <script src="js/blocs.min.js"></script>

</body>
</html>

Perch: 3.1.1, PHP: 7.2.6, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO
Server OS: Linux, fpm-fcgi
Installed apps: content (3.1.1), assets (3.1.1), categories (3.1.1), perch_blog (5.6.1)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog', ); ?>
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/vhosts/the-melvins.com/httpdocs/perch
PERCH_CORE: /var/www/vhosts/the-melvins.com/httpdocs/perch/core
PERCH_RESFILEPATH: /var/www/vhosts/the-melvins.com/httpdocs/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 20M, Max POST 20M, Memory: 512M, Total max file upload: 20M
F1: 3b606135b33e6a102526838f4152a807
Resource folder writeable: Yes
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
REQUEST_URI: /perch/core/settings/diagnostics/
DOCUMENT_ROOT: /var/www/vhosts/the-melvins.com/httpdocs
HTTP_HOST: www.the-melvins.com
Tony Melvin

Tony Melvin 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you have a category set named Blog?

Hello Drew.

I do.

Under Organise - Categories- Blog

Set template is Category Category template is Category

Is this correct?

I thank-you

Figured out the debug:

SELECT u.*, r.* FROM perch3_users u, perch3_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=2 AND u.userHash='1dc7fda7a278e77a985d419ce63b2151' LIMIT 1
UPDATE perch3_users SET userHash='9c2242a6854c494c5b133382c730199b' WHERE userID='2'
[30] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=2 OR userID=0 ORDER BY userID ASC
[7] SELECT itemValue FROM perch3_menu_items WHERE itemType='app'
[0] SELECT COUNT(*) FROM perch3_blog_comments WHERE commentStatus='PENDING'
[1] SELECT * FROM perch3_blogs ORDER BY blogTitle ASC
[1] SELECT * FROM perch3_blogs ORDER BY blogTitle ASC LIMIT 1
[nil] SELECT * FROM perch3_categories c, perch3_category_sets s WHERE c.setID=s.setID AND s.setSlug='blog' ORDER BY catTreePosition ASC
[1] SELECT * FROM perch3_blog_sections WHERE blogID=1 ORDER BY sectionTitle ASC
[3] SELECT SQL_CALC_FOUND_ROWS DISTINCT * FROM perch3_blog_posts WHERE blogID=1 ORDER BY postDateTime DESC LIMIT 0, 15
[1] SELECT FOUND_ROWS() AS count
[1] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
[2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
[1] SELECT itemTitle FROM perch3_menu_items WHERE itemType='app' AND itemValue='perch_blog' LIMIT 1
[1] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
[2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC

Usable?. Thank-you

Drew McLellan

Drew McLellan 2638 points
Perch Support

Ok, so what problem are you seeing? I'm not sure what we're trying to solve.

No categories are appearing on my site. Maybe I am using the backend wrong ?

I got the the blog app. Sets - I have a Blog set and Blog category. (I also added other categories) I go to Editing ‘Blog’ Category Set. I Set template to category I set Category template to category

In the Blog app I can do all the editing- Title, Post, Excerpt, Date, Image upload, etc. but Categories displays as a title with no options at all.

Should I not see Blog then ?

If am administrating this wrong please send me in the right direction.

I think-you

Drew I have checked my code and understand sets now in the backend.

In the perch backend when I create a category it / they are not listed as an option in the admin mask.

I have been through the forums again. My config is set and was from the beginning.

<?php $apps_list = array( 'content',  'categories',  'perch_blog',  );

Spinning my tires here. Thanks for your time.

Drew McLellan

Drew McLellan 2638 points
Perch Support

In the perch backend when I create a category it / they are not listed as an option in the admin mask.

I'm not sure what you mean by this. What's the admin mask? Could you give an example?

Sorry, I mean the admin backend area. When I login to perch and I want to publish a new entry on the blog. Categories is there under Date as a title but there are no options offered. Just white space before Status. Would like to send a screen if that would help.

Thank-you

Drew McLellan

Drew McLellan 2638 points
Perch Support

The debug you posted above is staying that there are no categories in the set called Blog.

Drew I have created categories in the perch admin back-end when I login. Do I need to define them in my php code direct ? Sorry I am a beginner at this.

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, you just need to add them in the Categories section of Perch in a category set named Blog. It's created for you when you install the Blog app.

Hi Drew,

Ok, I have been doing this all along. I am on a trip for the next 2 months and the blog will have to have no categories until then. I think I will start from scratch in September when I am back. Thanks for your help.