CMS MADE SIMPLE FORGE

Search module

 

[#3021] Search uses incorrect action="" path on interior pages

avatar
Created By: John Beatrice (mww)
Date Submitted: Thu Feb 12 01:28:42 -0500 2009

Assigned To:
Version: 1.5.4
CMSMS Version: None
Severity: Minor
Resolution: Fixed
State: Closed
Summary:
Search uses incorrect action="" path on interior pages
Detailed Description:
Updated to re-open bug report:
The bug appears in Versions 1.5.4  - please see:
http://forum.cmsmadesimple.org/index.php/topic,30858.msg160725.html#msg160725
thanks!

---------------------------------------

Version 1.5.2
The search module form uses the incorrect path in the action="" variable.  It is
not noticeable on home pages using index.php.  When browsing to an interior
page, the search module does not work.

Here is what I see in the HTML source of an interior page using search ver 1.5.2
- CMSMS ver 1.5.2

form id="cntnt01moduleform_1" method="get"
action="http://crossrate.com/page-alias-here"

The search module on an interior page using 1.5.1 CMSMS ver 1.4.1

form id="cntnt01moduleform_1" method="get" action="index.php"

SOLUTION:

Version of /lib/classes/module_support/modform.inc.php found in 1.5.2 which
builds the action=""

Replace line 35 of /lib/classes/module_support/modform.inc.php

$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];

Replace with this
    $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER['PHP_SELF'];

Is there any reason not to use PHP_SELF?










History

Comments
avatar
Date: 2009-02-15 11:15
Posted By: Robert Campbell (calguy1000)

Fixed in svn.... rev 5440
      
avatar
Date: 2009-06-23 09:32
Posted By: John Beatrice (mww)

Using the new {search} tag parameter search_method="post" available in CMSMS 1.6
solves the problem.
      
Updates

Updated: 2009-06-23 09:32
resolution_id: 5 => 7
severity_id: 2 => 3
state: Open => Closed

Updated: 2009-06-23 09:18
severity_id: 3 => 2

Updated: 2009-05-22 12:50
resolution_id: 8 => 5

Updated: 2009-05-22 12:50
description: Version 1.5.2 The search module form uses the incorrect path in the action="" variable. It is not noticeable on home pages using index.php. When browsing to an interior page, the search module does not work. Here is what I see in the HTML source of => Updated to re-open bug report: The bug appears in Versions 1.5.4 - please see: http://forum.cmsmadesimple.org/index.php/topic,30858.msg160725.html#msg160725 thanks! --------------------------------------- Version 1.5.2 The search module form use
version_id: -1 => 27890
resolution_id: 7 => 8
severity_id: 4 => 3

Updated: 2009-02-15 11:15
resolution_id: 11 => 7
severity_id: 1 => 4

Updated: 2009-02-13 20:06
description: Version 1.5.2 The search module form uses the incorrect path in the action="" variable. It is not noticeable on home pages using index.php. When browsing to an interior page, the search module does not work. Here is what I see in the HTML source of => Version 1.5.2 The search module form uses the incorrect path in the action="" variable. It is not noticeable on home pages using index.php. When browsing to an interior page, the search module does not work. Here is what I see in the HTML source of

Updated: 2009-02-12 02:09
description: Version 1.5.2 The search module form uses the incorrect path in the action="" variable. It is not noticeable on home pages using index.php. When browsing to an interior page, the search module does not work. Here is what I see in the HTML source of => Version 1.5.2 The search module form uses the incorrect path in the action="" variable. It is not noticeable on home pages using index.php. When browsing to an interior page, the search module does not work. Here is what I see in the HTML source of

Updated: 2009-02-12 01:30
description: Version 1.5.2 The search module form uses the incorrect path in the action="" variable. It is not noticeable on home pages using index.php. When browsing to an interior page, the search module does not work. Here is what I see in the HTML source of => Version 1.5.2 The search module form uses the incorrect path in the action="" variable. It is not noticeable on home pages using index.php. When browsing to an interior page, the search module does not work. Here is what I see in the HTML source of

Updated: 2009-02-12 01:29
version_id: 26956 => -1
resolution_id: => 11