Forum

Thread tagged as: Question, Problem, Configuration

What it means this red message on debug?

Array
(
    [type] => 8
    [message] => Use of undefined constant perch_blog - assumed 'perch_blog'
    [file] => /Applications/MAMP/htdocs/optaarquitectos.com/perch/config/apps.php
    [line] => 3
)
Drew McLellan

Drew McLellan 2638 points
Perch Support

In perch/config/apps.php you've used perch_blog instead of 'perch_blog'

Ok, changed. — Going back into the issue: something is not working with categories, it looks like my blog posts are not taking categories well, so perch_blog_post_categories is empty. How can I get categories working?

I need to solve this problem, please let me know steps to check please Drew...

Please could someone tell me a clue about why perch_blog_post_categories may not work? Looks like I am missing something

Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, I think you must be missing something. Do you see the categories query in your debug?

This is what I see Drew

Time    Δ   Debug Message - Perch 3.0.5
0.0361  0   [1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='aaa')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2017-06-07 12:46:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
0.0386  0.0025  [1] SELECT FOUND_ROWS() AS `count`
0.0409  0.0023  [25] SELECT DISTINCT settingID, settingValue FROM perch3_settings WHERE userID=0
0.0427  0.0018  [1] Using template: /templates/blog/slug2.html
0.045   0.0023  [1] SELECT * FROM perch3_blog_sections ORDER BY sectionTitle ASC
0.0458  0.0008  [1] SELECT * FROM perch3_blogs ORDER BY blogTitle ASC
0.0507  0.0049  [45] SELECT regionKey, regionHTML FROM perch3_content_regions WHERE regionPage='/proyecto.php' OR regionPage='*' ORDER BY regionPage DESC
0.0524  0.0016  [1] SELECT SQL_CALC_FOUND_ROWS DISTINCT tbl.* FROM ( SELECT idx.itemID, main.*, idx2.indexValue as sortval FROM perch3_blog_index idx JOIN perch3_blog_posts main ON idx.itemID=main.postID AND idx.itemKey='postID' JOIN perch3_blog_index idx2 ON idx.itemID=idx2.itemID AND idx.itemKey='postID' AND idx2.indexKey='_id' WHERE 1=1 AND ((idx.indexKey='postSlug' AND idx.indexValue='aaa')) AND idx.itemID=idx2.itemID AND idx.itemKey=idx2.itemKey GROUP BY idx.itemID, idx2.indexValue, postID ) as tbl WHERE (postStatus='Published' AND postDateTime<='2017-06-07 12:46:00' ) GROUP BY itemID, sortval ORDER BY sortval ASC LIMIT 0, 10
0.0549  0.0026  [1] SELECT FOUND_ROWS() AS `count`
0.0553  0.0004  [1] Using template: /templates/blog/post.html
0.0628  0.0076  [1] SELECT * FROM perch3_blog_posts WHERE postStatus='Published' AND postDateTime<='2017-06-07 12:46:00' AND postSlug='aaa'

Drew McLellan

Drew McLellan 2638 points
Perch Support

Your field has the id categorias_proyectos instead of categories.

Thanks a lot Drew... that was the solution.

Support is the main reason to repeat with Perch, for sure