Categories missing and new ones not displaying
Hi,
Just when I thought this was all done!
I noticed that only two of my categories are showing in the blog out of 4 and when I go to the admin to check which category fields are checked fo blog posts I no longer have the "category radio boxes" option to tick from just an empty text box. I'm guessing I've broken something although I can't think what as I've not changed anything category related.
The only thing I did earlier was to try to get blog comments to display in the opposite order and changed the post.php with the following but I can't imagine this did it??
Help much appreciated.... I'm so glad I don't do this for a living any more!! Driven me mad the past week and just want this done.... Sorry very stressed as I was hoping to go out with the wife later :-(
<?php
perch_blog_post_comments(perch_get('s'), array(
'template' => 'comment.html',
));
?>
I've just tried deleting the exisitng BLOG set and adding new categories and now when I look at the site side bar the categories are not shown at all.
I'm really confused as to what has happened here.
Cheers
Rob
Can you show me your template?
Sorry Drew, which template do you need?
Is that the post.html one?
Please bare with me - very stressed and just would like to get this resolved quickly so I can finish this job that I wish I'd never started.
Here's my post.php file with the sidebar that contains the category navigation
<div id="home_text" class="group">
and here's the post.html template
</article>
<h2 class="social-share">Share if others could benefit</h3> <!-- Buttons start here. Copy this ul to your document. --> <ul class="rrssb-buttons clearfix">
<perch:blog id="excerpt" type="textarea" label="Excerpt" markdown="true" order="3" suppress="true" size="s" /> <perch:blog id="image" type="image" width="50" height="50" crop="true" suppress="true" />
Drew,
Apologies in a BIG way, cut and paste error on my part. I think I used undo a few too many times when I made a mistake and this must have got cut.
I'll crawl back into my hole now!
Thanks for the help and quality (fast) support again.
I owe you a beer or two.
Cheers
Rob
I've just tried to add a new blog post and I'm now getting the following error:
"Sorry, that post could not be updated."
I can edit and make changes to existing posts but it appears I can't add new ones, why would this be?
I notice that on the form in between the "categories" and "tags" fields I still have this empty field, could it be this? Here's the output code from the admin the blank box seems to be the middle of the 3 "postURL"
<label class="" for="perch_categories">Categories</label> <fieldset class="checkboxes fieldtype uni-col"> </div>
<div class="field "> <label class="" for="perch_postURL"></label> <input id="perch_postURL" class="text " type="text" value="" name="perch_postURL"> </div>
<div class="field "> <label class="" for="postTags">Tags</label> <input id="postTags" class="text " type="text" value="1111" name="postTags"> <span class="hint">Separate with commas</span> </div>
Turn on debug. Submit the form. Do you get any errors?
Getting beyond me now... How do I turn on debug?
Like this: https://docs.grabaperch.com/docs/installing-perch/configuration/debug/
done it!
I get this error
0.0644 0.0015 Invalid query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'postURL' in 'field list'
Where you have
change it to
:-) Thanks, this goes to show what happens when you don't touch any of this for best part of 18 months and then come back to work on a personal project!
Just to save me being a total pain in the a**** the ONLY thing I have outstanding is to get the post comments to display latest first as opposed to latest at the bottom. How do I change this?
do I add this to my post.php
Reverse order works thanks....
You need to set
sort
as well assort-order
.Hi Drew,
The docs say:
sort The ID of the field to sort by (detault: commentDateTime)
So do I need to add anything to the code in my previous post given the default looks to be the "commentDateTime" field?
Things might have changed so happy to take advice especially this week!
Cheers
Rob
No, that's not changed, but you do need to set it if you want to use
sort-order
.Hi Drew,
The only reason I'm using sort-order is to ensure latest comments appear at the top of the list. Prior to sort-order being added the oldest appeared first.
So do I need to add like this?
Is that not working?
It's working without the 'sort' entry so wanted to be clear why I needed it in addition to the 'sort-order'...