[Solved] Morelink not working in Questions module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
sailor
Forum Members
Forum Members
Posts: 26
Joined: Fri Feb 06, 2009 9:16 pm

[Solved] Morelink not working in Questions module

Post 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
Last edited by sailor on Tue Feb 10, 2009 8:22 pm, edited 1 time in total.
May the wind allways be on your back, and the sun allways on your face.
sailor
Forum Members
Forum Members
Posts: 26
Joined: Fri Feb 06, 2009 9:16 pm

Re: Morelink not working in Questions module

Post 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
Last edited by sailor on Sun Feb 08, 2009 6:44 pm, edited 1 time in total.
May the wind allways be on your back, and the sun allways on your face.
yankee80
Forum Members
Forum Members
Posts: 34
Joined: Mon Apr 10, 2006 2:45 am

Re: Morelink not working in Questions module

Post 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
sailor
Forum Members
Forum Members
Posts: 26
Joined: Fri Feb 06, 2009 9:16 pm

Re: Morelink not working in Questions module

Post 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...
May the wind allways be on your back, and the sun allways on your face.
reneh
Dev Team Member
Dev Team Member
Posts: 446
Joined: Tue Nov 28, 2006 8:39 pm
Location: Norway

Re: Morelink not working in Questions module

Post 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)
ReneH 8-)
A search will save you hours waiting for an answer! Image
sailor
Forum Members
Forum Members
Posts: 26
Joined: Fri Feb 06, 2009 9:16 pm

Re: Morelink not working in Questions module

Post by sailor »

Thanks Reneh! That did the trick  :)
May the wind allways be on your back, and the sun allways on your face.
Eza
New Member
New Member
Posts: 9
Joined: Tue Oct 21, 2008 3:19 pm

Re: [Solved] Morelink not working in Questions module

Post 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
sailor
Forum Members
Forum Members
Posts: 26
Joined: Fri Feb 06, 2009 9:16 pm

Re: [Solved] Morelink not working in Questions module

Post 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);
May the wind allways be on your back, and the sun allways on your face.
Eza
New Member
New Member
Posts: 9
Joined: Tue Oct 21, 2008 3:19 pm

Re: [Solved] Morelink not working in Questions module

Post 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?
sailor
Forum Members
Forum Members
Posts: 26
Joined: Fri Feb 06, 2009 9:16 pm

Re: [Solved] Morelink not working in Questions module

Post by sailor »

This line is the fix:

Code: Select all

 $this->SetParameterType('qid',CLEAN_INT); /* Fix for MoreLink */
May the wind allways be on your back, and the sun allways on your face.
Eza
New Member
New Member
Posts: 9
Joined: Tue Oct 21, 2008 3:19 pm

Re: [Solved] Morelink not working in Questions module

Post 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
Last edited by Eza on Thu Feb 19, 2009 8:33 am, edited 1 time in total.
Post Reply

Return to “Modules/Add-Ons”