Page 1 of 1

[Solved] Morelink not working in Questions module

Posted: Fri Feb 06, 2009 9:25 pm
by sailor
As this is my first post I'd like to thank all of the developers for the fantastic job they have done with this project and the modules. CMSMS is truly a pleasure to work with!

I have set up a FAQ on a site I am working on using the Questions module, I have the template finished for the summary page and it calls the module as: {cms_module module=Questions detailpage="answer" sortby="category_asc"}

I have separated the questions into categories (using expandcolapse) and used  {$entry->morelink} to link the the blank page "answer" as the answer detail page.

The problem is that both  {$entry->morelink} and  {$entry->moreurl} generate the following error on the answer page: "Insufficient parameters: qid"

I can see the qid set correctly in the link, why is this not working, I'm stumped...

Thanks in advance for any help!

EDIT: Link to site in question: http://www.windpath.com.php5-6.websitet ... oating-FAQ

Re: Morelink not working in Questions module

Posted: Sat Feb 07, 2009 10:12 pm
by sailor
Here ya go, any help is appriciated!

The error can be easily reproduced by going here and clicking the more link on any of the questions:
http://www.windpath.com.php5-6.websitet ... oating-FAQ

PHP 5 / Linux / Apache / MySQL 5

CMSMS Version: 1.5.2

Installed Modules:
Calendar 1.0
Captcha 0.3.2
CGExtensions 1.15
CGGoogleMaps 1.1
CMSMailer 1.73.14
FileManager 0.4.3
MenuManager 1.5.3
ModuleManager 1.2.1
News 2.9.2
nuSOAP 1.0.1
Printing 0.2.6
Questions 1.0.3
Search 1.5.2
ThemeManager 1.0.8
TinyMCE 2.4.11

Re: Morelink not working in Questions module

Posted: Sun Feb 08, 2009 3:57 pm
by yankee80
Hi everyone,

CMS Made Simple 1.5.2 "Caguas", php5,mysql5 + latest version of Questions

Here my module call from the template:
{cms_module module='Questions' mode='summary' nofilter='yes'}

I have almost the same problem.
When I click the more link I get:
Warning: Parameter qid is not known... dropped in /home/tmsadmin/public_html/lib/misc.functions.php on line 1347
Insufficient parameters: qid

This link shows when I hover the mouse over the more link:
http://205.234.213.28/~tmsadmin/index.p ... eturnid=51

Any suggestions?

thanks and kind regards
Eric

Re: Morelink not working in Questions module

Posted: Tue Feb 10, 2009 7:20 pm
by sailor
Hi guys,

I have been digging around in the source code looking for the problem (more links not working), in the quotes module file "function.default_summary.php" I found the following lines of code that build the more link and url (line 321-332:

Code: Select all

//     $oneentry->morelink = $this->CreateFrontendLink($id,$thereturnid,'default',
// 					    $this->Lang('prompt_more'),
// 					    $params);
//     $oneentry->moreurl = $this->CreateFrontendLink($id,$thereturnid,'default',
// 					    $this->Lang('prompt_more'),
//  					    $params,true);
    $oneentry->morelink = $this->CreateLink($id,'default',$thereturnid,
					    $this->Lang('prompt_more'),
			 		    $params);
    $oneentry->moreurl = $this->CreateLink($id,'default',$thereturnid,
					   $this->Lang('prompt_more'),
					   $params,'',true);
I was hoping that un-commenting the CreateFrontendLink and commenting out the CreateLink would fix the problem, unfortunately it did not.

Any help on this would really be appreciated as I am essentially at a dead end...

Re: Morelink not working in Questions module

Posted: Tue Feb 10, 2009 8:06 pm
by reneh
The correct solution is to add the foloowing line:

      $this->SetParameterType('qid',CLEAN_INT);

as line 211 in the file Questions.module.php

(its updated in svn and will be included automatic in the next release of Qustions)

Re: Morelink not working in Questions module

Posted: Tue Feb 10, 2009 8:22 pm
by sailor
Thanks Reneh! That did the trick  :)

Re: [Solved] Morelink not working in Questions module

Posted: Tue Feb 17, 2009 4:42 pm
by Eza
Hello,

I'm work on the web site and I have the same problem.

The folow line:
$this->SetParameterType('qid',CLEAN_INT);

Most be add in the end of
function SetParameters(){

?

Thans you,
Ludovic

Re: [Solved] Morelink not working in Questions module

Posted: Tue Feb 17, 2009 5:39 pm
by sailor
You got it! Line 211 puts it between these two:

Code: Select all

	$this->SetParameterType('quid',CLEAN_INT);
	$this->SetParameterType('qid',CLEAN_INT); /* Fix for MoreLink */
	$this->SetParameterType('no_answer_required',CLEAN_STRING);

Re: [Solved] Morelink not working in Questions module

Posted: Wed Feb 18, 2009 8:46 am
by Eza
Thanks for you help

I have add
$this->SetParameterType('no_answer_required',CLEAN_STRING);
After these line
$this->SetParameterType('quid',CLEAN_INT);
$this->SetParameterType('qid',CLEAN_INT); /* Fix for MoreLink */
But the problem doesn't resolve ...

I most modify others file?

Re: [Solved] Morelink not working in Questions module

Posted: Wed Feb 18, 2009 6:40 pm
by sailor
This line is the fix:

Code: Select all

 $this->SetParameterType('qid',CLEAN_INT); /* Fix for MoreLink */

Re: [Solved] Morelink not working in Questions module

Posted: Thu Feb 19, 2009 8:05 am
by Eza
Thanks for you help...

My problem was then I don't have the right for remplace the file ...

But now it's works Thanks you :)

Ludovic