Page 1 of 1
[Solved (workaround)] CGFeedback stops ? page_name issue
Posted: Thu Jul 25, 2013 3:11 am
by Andrew Prior
I have CMS Made Simple™ 1.11.6 “Merchena” and CGFeedback 1.5.12 on LAMP.
My code is:
Code: Select all
{CGFeedback key2=$page_name action='summary' sortorder="ASC"}
{CGFeedback key2=$page_name}
which until now has worked perfectly to display the comments on a page, and to allow the addition of more comments.
For some reason, published comments are now not being displayed. I see that key 2 is no longer being inserted into the database as the page_name but as the page number. If I use phpMyadmin to change the number back to the page_name, everything works.
Can anyone suggest what the problem might be... or even how to fix it?
Re: CGFeedback stops displaying; something about page_name
Posted: Thu Jul 25, 2013 11:21 am
by uniqu3
Look where {$page_name} variable comes from, obviously this changed it's behavior.
Re: CGFeedback stops displaying; something about page_name
Posted: Thu Jul 25, 2013 11:47 am
by Andrew Prior
Well yes. But it comes from the module itself!
Re: CGFeedback stops displaying; something about page_name
Posted: Thu Jul 25, 2013 12:45 pm
by Jo Morg
Andrew Prior wrote:Well yes. But it comes from the module itself!
Well I just re-read CGFeedback's help and see no mention to
$page_name nor anything like it. AFAIK $page_name is not initialized nor used by the core.
My suggestion is that,
if $page_name = to the alias of the page, replace $page_name by $page_alias. that should work, on a page by page basis.
HTH.
Re: CGFeedback stops displaying; something about page_name
Posted: Fri Jul 26, 2013 12:46 pm
by Andrew Prior
You are correct Jo! But changing to $page_alias makes no difference. CGfeedback insists on writing the id no, not the page alias or page name. So I have taken the slow but sure method of manually updating the tables in mysql and then my templates, to take the default option. I did reinstall the module first, but to no avail. Sort of solved

Re: [Solved (workaround)] CGFeedback stops ? page_name issue
Posted: Fri Jul 26, 2013 1:18 pm
by Jo Morg
Andrew Prior wrote:But changing to $page_alias makes no difference. CGfeedback insists on writing the id no, not the page alias or page name.
Ok from what I could figure out from the help, it seems that for the simple purpose of having a page by page comment system you shouldn't need even that...
This should suffice:
Code: Select all
{CGFeedback action='summary' sortorder="ASC"}
{CGFeedback}
At least according yo this:
Help wrote:
- - (optional) key1="" - First key in the triplet of keys that make up a unique identifier for a comment list. If this parameter is not specified, then it is assumed that you are referring to a content page
- - (optional) key2="" - Second key in the triplet of keys that make up a unique identifier for a comment list. If this parameter is not specified, the current page id will be used.
- - (optional) key3="" - Third key in the triplet of keys that make up a unique identifier for a comment list. This parameter is entirely optional for normal use, but may be required in extenuating circumstances when two keys are not enough information to make the comment list unique.