Jump to content

Knowledgebase Search Problem


007basaran

Recommended Posts

10 minutes ago, 007basaran said:

Fixed

that's not a fix - it's a temporary patch around a likely issue with your Friendly URLs redirection... unless resolved, you're going to have to update the templates after each WHMCS upgrade.

I don't know which version you're using, but the search works fine on v7.2.3 and there's nothing in the v7.3 changelog about this.

Link to comment
Share on other sites

Hello,

I'm using the friendly url and .php extension remove in htaccess file rewriting.

I Have a little error index.php rewriting to index and not showing index this error line :

 Sorry, but the page you are looking for could not be found.
 

Rewrite rules : 

 

# PHP Requestlerin .php uzantısını sil ve .php'yi klasor gibi çalıştır.
RewriteCond %{THE_REQUEST} ^GET\s.+\.php [NC]
RewriteRule ^(.+)\.php$ /$1 [NE,R=301,L,NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
RewriteCond %{REQUEST_FILENAME}.php -f

 

### BEGIN - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ###
<IfModule mod_rewrite.c>
RewriteEngine on

# RewriteBase is set to "/" so rules do not need updating if the
# installation directory is relocated.  It is imperative that
# there is also a RewriteCond rule later that can effectively get
# the actual value by comparison against the request URI.

# If there are _any_ other RewriteBase directives in this file,
# the last entry will take precedence!
RewriteBase /

# Redirect directories to an address with slash
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$  $1/ [R]

# Send all remaining (routable paths) through index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Determine and use the actual base
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
RewriteRule ^.*$ %2index.php [QSA,L]
</IfModule>
### END - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ###
 

 
 
 
Link to comment
Share on other sites

I have two options now.

1. When I use Whmcs's default index.php file, the index.php page is having problems in index navigation.

2. Whmcs's index.php file is created using index.php as if creating a page but this time the tag sections like knowledgebase and anouncements do not work.
 

Link to comment
Share on other sites

17 minutes ago, 007basaran said:

If you direct index.php file as an index, this is the problem.

then i'm tempted to say don't do it, or exclude index.php from this redirection. :)

frankly, even if you could find a solution, there's nothing to say that the next WHMCS release wouldn't break it.

Link to comment
Share on other sites

There is a solution, but the knowledgebase and announcements do not work when I apply the solution.

The problem is solved in the sample solution, but the knowledgebase is not working.

Knowledgebase, Announcements, Downloads

These pages are not independent of whmcs trying to pull from the index.php file. If they are independent, there will be no problem.

I have to solve this problem absolutely.

Sample Solution Fixed index.php file : 

<?php
 
 define("CLIENTAREA",true);
 //define("FORCESSL",true); // Uncomment to force the page to use https://
 
 require("init.php");
 
 $ca = new WHMCS_ClientArea();
 
  $ca->setPageTitle("AnaSayfa");
  $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname'));
  $ca->addToBreadCrumb('index.php','Anasayfa');
 
 $ca->initPage();
 

 //  $ca->requireLogin(); // Uncomment this line to require a login to access this page
 
 # To assign variables to the template system use the following syntax.
 # These can then be referenced using {$variablename} in the template.

 $ca->assign('pagelayout', nonwhmcs);
 $ca->assign('pagetype', planpage);
 
 # Check login status
 if ($ca->isLoggedIn()) {
 
   # User is logged in - put any code you like here
 
   # Here's an example to get the currently logged in clients first name
 
   $result = mysql_query("SELECT firstname FROM tblclients WHERE id=".$ca->getUserID());
   $data = mysql_fetch_array($result);
   $clientname = $data[0];
 
   $ca->assign('clientname', $clientname);
 
 } else {
 
   # User is not logged in
 
 }

 # Define the template filename to be used without the .tpl extension
 
 $ca->setTemplate('homepage');
 
 $ca->output();
 
 ?>

Problem index php : 

<?php //00ee8
// *************************************************************************
// *                                                                       *
// * WHMCS - The Complete Client Management, Billing & Support Solution    *
// * Copyright (c) WHMCS Ltd. All Rights Reserved,                         *
// * Version: 7.2.3 (7.2.3-release.1)                                      *
// * BuildId: adf8f28.237                                                  *
// * Build Date: 17 Jul 2017                                               *
// *                                                                       *
// *************************************************************************
// *                                                                       *
// * Email: info@whmcs.com                                                 *
// * Website: http://www.whmcs.com                                         *
// *                                                                       *
// *************************************************************************
// *                                                                       *
// * This software is furnished under a license and may be used and copied *
// * only  in  accordance  with  the  terms  of such  license and with the *
// * inclusion of the above copyright notice.  This software  or any other *
// * copies thereof may not be provided or otherwise made available to any *
// * other person.  No title to and  ownership of the  software is  hereby *
// * transferred.                                                          *
// *                                                                       *
// * You may not reverse  engineer, decompile, defeat  license  encryption *
// * mechanisms, or  disassemble this software product or software product *
// * license.  WHMCompleteSolution may terminate this license if you don't *
// * comply with any of the terms and conditions set forth in our end user *
// * license agreement (EULA).  In such event,  licensee  agrees to return *
// * licensor  or destroy  all copies of software  upon termination of the *
// * license.                                                              *
// *                                                                       *
// * Please see the EULA file for the full End User License Agreement.     *
// *                                                                       *
// *************************************************************************
if(!extension_loaded('ionCube Loader')){$__oc=strtolower(substr(php_uname(),0,3));$__ln='ioncube_loader_'.$__oc.'_'.substr(phpversion(),0,3).(($__oc=='win')?'.dll':'.so');if(function_exists('dl')){@dl($__ln);}if(function_exists('_il_exec')){return _il_exec();}$__ln='/ioncube/'.$__ln;$__oid=$__id=realpath(ini_get('extension_dir'));$__here=dirname(__FILE__);if(strlen($__id)>1&&$__id[1]==':'){$__id=str_replace('\\','/',substr($__id,2));$__here=str_replace('\\','/',substr($__here,2));}$__rd=str_repeat('/..',substr_count($__id,'/')).$__here.'/';$__i=strlen($__rd);while($__i--){if($__rd[$__i]=='/'){$__lp=substr($__rd,0,$__i).$__ln;if(file_exists($__oid.$__lp)){$__ln=$__lp;break;}}}if(function_exists('dl')){@dl($__ln);}}else{die('The file '.__FILE__." is corrupted.\n");}if(function_exists('_il_exec')){return _il_exec();}echo("Site error: the ".(php_sapi_name()=='cli'?'ionCube':'<a href="http://www.ioncube.com">ionCube</a>')." PHP Loader needs to be installed. This is a widely used PHP extension for running ionCube protected PHP code, website security and malware blocking.\n\nPlease visit ".(php_sapi_name()=='cli'?'get-loader.ioncube.com':'<a href="http://get-loader.ioncube.com">get-loader.ioncube.com</a>')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jNvGT/N3q+yU++q6bR9KxqU3Pxgwbw5Qg6
gouIUN1OGI92dqpMXdr84+elx0EXpDwXl1bM8zhzYLBB+2yp61GwlKveblmRG3bMtHoFxU8SwbSl
Vo//+cEApwXicZVJZ5zXN1xQmDMsvOh7aOZdA2tDWRiDvYrmhz51DlmeLKLQqsPIp0XnaAhkQzf0
gWfG3clUvQ/FtFOWnKqfqqSPoJT3PnzeJBprBQCWBM3QuS/f0P1KMuH9/YDkb8YgslkSGsEQzZwU
U2h6jhW+/ZE2l8xyrrDRN64dFxHEUsqBJ0+2GAQeZjKzwS+HkrHv58wCla9p0oSCUtzuO3g+qaks
0yYU2oD0JZgigNtmkCMItsWYot7WT17UQZWp4acEpxq9Ykw7LZwR3dNm/lt+qsNONnlTzSzN7MK0
duR56L5H/4+ZARB3d9KG5gUHFuM3+G7ShE/+hiH64ZDQO0v6kvAXTw/4hzLRZeACC0P0PDv/Ozcd
xCEcem==

 

Link to comment
Share on other sites

4 minutes ago, 007basaran said:

There is a solution, but the knowledgebase and announcements do not work when I apply the solution.

then it's not a solution. :)

5 minutes ago, 007basaran said:

I have to solve this problem absolutely.

have you tried a ticket to support? they'll know what's inside index.php that may be causing your problem.

Link to comment
Share on other sites

How to fix this issue ?? :o 

I fix this issue :D

WHMCS For seo .htaccess file : 

# PHP Requestlerin .php uzantısını sil ve .php'yi klasor gibi çalıştır.
 RewriteCond %{THE_REQUEST} ^GET\s.+\.php [NC]
 RewriteRule ^(.+)\.php$ /$1 [NE,R=301,L,NC]
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{DOCUMENT_ROOT}/$1.php -f
 RewriteRule ^(.*?)/?$ $1.php [L]

### BEGIN - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ###
<IfModule mod_rewrite.c>
RewriteEngine on

# RewriteBase is set to "/" so rules do not need updating if the
# installation directory is relocated.  It is imperative that
# there is also a RewriteCond rule later that can effectively get
# the actual value by comparison against the request URI.
# 
# If there are _any_ other RewriteBase directives in this file,
# the last entry will take precedence!
RewriteBase /

# Redirect directories to an address with slash
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$  $1/ [R]

# Send all remaining (routable paths) through index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Determine and use the actual base
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
RewriteRule ^.*$ %2index-system.php [QSA,L]
</IfModule>
### END - WHMCS managed rules - DO NOT EDIT BETWEEN WHMCS MARKERS ###

Our whmcs system index.php file rename to index-system.php 

And create new index.php 

<?php
 
 define("CLIENTAREA",true);
 //define("FORCESSL",true); // Uncomment to force the page to use https://
 
 require("init.php");
 
 $ca = new WHMCS_ClientArea();
 
  $ca->setPageTitle("AnaSayfa");
  $ca->addToBreadCrumb('index.php',$whmcs->get_lang('globalsystemname'));
  $ca->addToBreadCrumb('index.php','Anasayfa');
 
 $ca->initPage();
 

 //  $ca->requireLogin(); // Uncomment this line to require a login to access this page
 
 # To assign variables to the template system use the following syntax.
 # These can then be referenced using {$variablename} in the template.

 $ca->assign('pagelayout', nonwhmcs);
 $ca->assign('pagetype', planpage);
 
 # Check login status
 if ($ca->isLoggedIn()) {
 
   # User is logged in - put any code you like here
 
   # Here's an example to get the currently logged in clients first name
 
   $result = mysql_query("SELECT firstname FROM tblclients WHERE id=".$ca->getUserID());
   $data = mysql_fetch_array($result);
   $clientname = $data[0];
 
   $ca->assign('clientname', $clientname);
 
 } else {
 
   # User is not logged in
 
 }

 # Define the template filename to be used without the .tpl extension
 
 $ca->setTemplate('homepage');
 
 $ca->output();
 
 ?>

Everything work no problem :D 

So after the update, the index.php file will change after the update, so it may be corrupted.

Disable updates :D 

Link to comment
Share on other sites

4 hours ago, 007basaran said:

I fix this issue

not really - you moved the goalposts and simplified index.php.... that's fine and it will work (up to a point)... until you need to use the features of index.php that are no longer there in your above file... remember that index.php is a lot more than the example file taken from the dev docs - it must be about 150 lines long.. but if this is only a dev, then it wouldn't really matter... however, if it were a real live site, then this is not a real solution. 49oa9Ad.gif

Link to comment
Share on other sites

  • WHMCS Developer

The index.php file in the client area actually controls all the new routing in WHMCS 7.3

If you are having an issue with the stock file, open a ticket. Adding a custom index.php file will not work and may explain why you are having an issue with your KB search.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated