Forum
Recent post function not displaying any content
Hi,
I've recently started working with perch and I'm currently building a website for a client with it. My dilemma is that while I was trying to set up the blog functionality on the website I wasn't able to display any of the blog posts through the perch_blog_recent_posts() function.
If I try to access the individual blog posts they display and populate all the content correctly in the right elements but it seems that the problem only exists while trying to display all the recent posts.
Has anyone else had this problem and if so, how were you able to solve it?
The development is being done locally through XAMP and I was also wondering whether that might have any effect?
Here's my debug log form the SELECT u.*, r.* FROM perch3_users u, perch3_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='99889a69c2eee4c738988ba7a8b6864a' LIMIT 1 UPDATE perch3_users SET userHash='351e656db73781809d376637bb34b397' WHERE userID='1' [13] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC [7] SELECT itemValue FROM perch3_menu_items WHERE itemType='app' [nil] SELECT *, REPLACE(pagePath, '/index.php', '') as sortPath FROM perch3_pages WHERE pageNew=1 ORDER BY LENGTH(sortPath)-LENGTH(REPLACE(sortPath, '/', '')) ASC [1] SELECT p.*, (SELECT COUNT() FROM perch3_pages WHERE pageParentID=p.pageID) AS subpages FROM perch3_pages p WHERE p.pageParentID IN (0) ORDER BY p.pageTreePosition ASC [2] SELECT * FROM perch3_content_regions ORDER BY regionOrder ASC [nil] SELECT * FROM perch3_content_regions WHERE regionPage='' ORDER BY regionKey ASC [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='content' 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 File: \core\apps\content\modes\list.post.php [2] SELECT DISTINCT regionTemplate FROM perch3_content_regions ORDER BY regionTemplate ASC
Hello Johan,
Could you share your code with us?
By the way, this looks like the debug log from the control panel. Can you share the debug message from the page you're having issues on?
I use XAMPP too. It shouldn't be the problem.
Hey Hussein,
Thanks for taking the time to answer my question.
Here's the debug from my blog page
Here's my code
Remove the second argument from your function call:
If you're interested in what the second argument does, you can check the function's documentation.