Problems inserting into database after server upgraded PHP and SQL - .htaccess

If I don't explain this issue properly, please say and I'll edit it to suit.
I have a program called 'LiveAgent' which relies heavily on SQL insertion and retrieval - which was working untl my server upgraded the PHP from 7.0 to 7.2, and the SQL from 10.1 to 10.2.17_MariaDB. I've been told the .htaccess needs changing so the software can communicate with the server. I'm very confused. The software shows all entries until the 22nd, when the server was upgraded (UK2). Since then you can't submit anything into it.
The htaccess file is below. As is the code for adding an 'appointment'.
HTACCESS
# Mod Rewrite
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
#Fix Rewrite
Options -Multiviews
#http://forum.codecall.net/topic/74170-clean-urls-with-php/
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
# Remove browser bugs (only needed for really old browsers)
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 2 days"
</IfModule>
## EXPIRES CACHING
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
<IfModule mime_module>
AddType application/x-httpd-ea-php70 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
AJAX:
if($ajax['1'] == 'add_new_appointment'){
include 'files/add_new_appointment.php';
}
ADD NEW APPOINTMENT
<form action="" method="post" class="form-horizontal" >
<div class="modal-body">
<?php // ------------- ERROR -----------------
foreach ($notification_msg as &$notification) { ?>
<div class="alert <?php echo $notification['type'] ?>"><button type="button" class="close" data-dismiss="alert">×</button><strong><?php echo $notification['h4'] ?> </strong> <?php echo $notification['msg'] ?></div>
<?php } // ------------- ERROR ----------------- ?>
<input type="hidden" name="session_id" value="<?php echo $ajax['0'] ?>">
<input type="hidden" name="create_appointment" value="true">
<div class="form-group">
<label class="col-sm-3 control-label">Find Customer *</label>
<div class="col-sm-9">
<select name="customer" id="customer-single" style="width:100%" required>
<option value="">Select a customer</option>
<?php foreach(customer_array($ajax['0']) as $customer){ ?>
<option value="<?php echo $customer['id'] ?>"><?php echo $customer['business_name'] ?> - <?php echo $customer['first_name'] ?> <?php echo $customer['last_name'] ?></option>
<?php } ?>
</select>
If your customer is not listed you can add them here.
</div>
</div>
<hr>
<div class="form-group">
<label class="col-sm-2 control-label">Category *</label>
<div class="col-sm-10">
<select name="category" id="category-single" style="width:100%" required>
<option value="">Select a category</option>
<?php foreach(category_array($ajax['0']) as $category){ ?>
<option value="<?php echo $category['id'] ?>"><?php echo $category['name'] ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Date *</label>
<div class="col-sm-4">
<input class="form-control datepicker" type="text" name="date" required>
</div>
<div class="col-sm-1">
<label class="control-label">Time *</label>
</div>
<div class="col-sm-2">
<input class="form-control timepicker" type="text" name="start_time" required>
</div>
<div class="col-sm-1">
<label class="control-label">To *</label>
</div>
<div class="col-sm-2">
<input class="form-control timepicker" type="text" name="end_time" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Booked By *</label>
<div class="col-sm-9">
<select name="booked_by" id="agent-single" style="width:100%" required>
<?php foreach (agent_array($ajax['0']) as $agent){ ?>
<option <?php if($agent['id'] == get_agent_from_session($ajax['0'], 'id')){echo 'selected';} ?> value="<?php echo $agent['id'] ?>"><?php echo $agent['first_name'] ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Booked for *</label>
<div class="col-sm-9">
<select name="booked_for[]" id="agent-multi" multiple="multiple" style="width:100%" required>
<?php foreach (agent_array($ajax['0']) as $agent){ ?>
<option value="<?php echo $agent['id'] ?>"><?php echo $agent['first_name'] ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Notes</label>
<div class="col-sm-10">
<textarea class="form-control" name="notes"> </textarea>
</div>
</div>
</div>
<div class="modal-footer">
Close
<button type="submit" class="btn btn-success">Save</button>
</div>
</form>
DATABASE CONNECTION
// arrays
$notification_msg = array();
$bank_holidays = array();
// connect to db
try {
$dbh = new PDO("mysql:host=$dbhostname;dbname=db", $dbusername, $dbpassword);
/*** echo a message saying we have connected ***/
//$notification_msg[] = array(type=>'alert-success', h4=>'Success', msg=>'Connected to database');
}
catch(PDOException $e)
{
$notification_msg[] = array(type=>'alert-success', h4=>'', msg=>$e->getMessage());
}
PHP/SQL Code:
if($_POST['create_appointment']){
$customer_id = htmlspecialchars($_POST['customer'], ENT_QUOTES);
$category_id = htmlspecialchars($_POST['category'], ENT_QUOTES);
$date = htmlspecialchars($_POST['date'], ENT_QUOTES);
$start_time = htmlspecialchars($_POST['start_time'], ENT_QUOTES);
$end_time = htmlspecialchars($_POST['end_time'], ENT_QUOTES);
$booked_by = htmlspecialchars($_POST['booked_by'], ENT_QUOTES);
$booked_for = post_array_to_explode($_POST['booked_for']);
$notes = htmlspecialchars($_POST['notes'], ENT_QUOTES);
$session_id = htmlspecialchars($_POST['session_id'], ENT_QUOTES);
$time = date("Y-m-d H:i:s");
$agent_id = get_agent_from_session($session_id, 'id');
$start_date = $date.' '.$start_time;
$end_date = $date.' '.$end_time;
$start_date = format_datetime_mysql($start_date);
$end_date = format_datetime_mysql($end_date);
$insert = $dbh->exec("INSERT INTO calendar(start_date, end_date, notes, category_id, customer_id, added_by, booked_by, booked_for, date_added) VALUES ('$start_date', '$end_date', '$notes', '$category_id', '$customer_id', '$agent_id', '$booked_by', '$booked_for', '$time')");
if($insert){
$notification_msg[] = array(type=>'alert-success', h4=>'Success!', msg=>'Appointment Created');
push_browser_notify('New appointment booked', format_date($start_date).' - '.get_customer_json('business_name', $customer_id).' ('.get_customer_json('first_name', $customer_id).' '.get_customer_json('last_name', $customer_id).') ', '');
header('Location: ' . $_SERVER['HTTP_REFERER']);
}else{
$notification_msg[] = array(type=>'alert-warning', h4=>'Warning!', msg=>'Appointment NOT Created');
}
}

Related

How do I rewrite string query url when a form is submitted using .htacess

I have a form like this that after submitting url is like localhost/Direct-Link/product-details?details-id=173
I want it to be like: localhost/Direct-Link/product/173
<form action="product" method="get">
<input type="hidden" name="detail-id" id="detail-id" value="<?php echo $row['product_id']; ?>">
<a onclick="javascript:this.parentNode.submit();">
<img src="<?php echo $string_to_array[0]; ?>" alt="<?php echo $string_to_array[0]; ?>">
<div class="card-title mt-2">
<p id="big"><strong>
<?php echo $row['product_title']; ?>
</strong></p>
<p id="big"><b>
<?php echo 'Ksh. ' . $row['product_price']; ?>
</b></p>
<p>
<?php echo $row['product_keywords']; ?>
</p>
<?php if (!empty($row['stock_needed'])) { ?>
<p class='w-100 m-0 p-0'>
<?php echo 'Stock needed. ' . $row['stock_available']; ?>
</p>
<?php
} ?>
<p><i class="fa-solid fa-location-dot"></i>
<?php echo 'Location: ' . $row['specific_location']; ?>
</p>
</div>
</a>
</form>
I had tried RewriteRule ^product/([0-9]+)$ product-details?detail-id=$1 but never worked. Most people on the internet are showing this when they are using links with query url in their href like this example '<a href="category.php?category-id=' . $category_value . ''

getVar() from selected option input codeigniter 4

I have view
<!-- input-text -->
<div class="form-group">
<?php $name = 'name';
$placeholder = 'Nama Lengkap';
$value = old($name); ?>
<label for="<?= $name; ?>"><?= $placeholder; ?></label>
<input type="text" class="form-control <?= ($validation->hasError($name)) ? "is-invalid" : ''; ?>" id="<?= $name; ?>" name="<?= $name; ?>" placeholder="<?= $placeholder; ?>" value="<?= $value ?>">
<div class="invalid-feedback">
<?= $validation->getError($name); ?>
</div>
</div>
<!-- input-select -->
<div class="form-group">
<?php $name = 'gender';
$placeholder = 'Jenis Kelamin';
$value = old($name); ?>
<label for="<?= $name; ?>"><?= $placeholder; ?></label>
<select name="<?= $name; ?>" class="selectpicker form-control" data-live-search="true" id="<?= $name; ?>">
<option value="0">Laki-laki</option>
<option value="1">Perempuan</option>
</select>
</div>
and controller
public function create(){
dd($this->request->getVar());}
it show only name, but gender doesn't. How to show the value of selected option in CodeIgniter 4?
when you try to catch your post in controller u should type the name variable of the input
public function create(){
dd($this->request->getVar('gender'));
}
Use form helper, try it:
<div class="form-group">
<label for="name">Nama Lengkap</label>
<?php echo form_input('name', set_value('name'), 'class="form-control" placeholder="Nama Lengkap"'); ?>
<?php if(!empty($errors)){ ?>
<em class="text-danger"><?php echo $errors->getError('name') ?></em>
<?php } ?>
</div>
<div class="form-group">
<label for="gender">Jenis Kelamin</label>
<?php echo form_dropdown('gender', ['0' => 'Laki-laki', '1' => 'Perempuan'], [], 'class="form-control"'); ?>
</div>
Hope it helpful, cheers...

After removing index.php from ci, code is not working properly

I have created a simple login form in ci and with wamp. I removed index.php from URL by writing this code in .htaccess:-
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
I have also enabled rewrite_module in apache.
From URL, index.php was successfully removed and view(login page) was also loaded in the browser. But when I am clicking on the submit button, it is not redirecting to another page, nither to view nor to the controller.
View code: -
<form method = "post" action = "<?php echo site_url(); ?>Home/xyz">
<div class = "row" align ="center">
<?php if($error=$this->session->flashdata('Login_failed')) { ?>
<div class="alert alert-danger">
<?php echo $error; ?>
</div>
<?php } ?>
<?php if($error=$this->session->flashdata('already_existing')) { ?>
<div class="alert alert-danger">
<?php echo $error; ?>
</div>
<?php } ?>
<?php if($error=$this->session->flashdata('logged_out')) { ?>
<div class="alert alert-info">
<?php echo $error; ?>
</div>
<?php } ?>
<div class="col-md-3">
<label for = "emailid"><em>EMAIL_ID</em></label>
<input type = "email" name = "eid" class = "form-control" placeholder = "Enter Email id" value = "<?php if(($this->input->post('submit'))&&($this->input->post('eid'))){echo $this->input->post('eid'); } ?>" required = "required"><br>
</div>
<div class="col-md-3">
<label for = "password"><em>Password</em></label>
<input type = "password" name = "pass" class = "form-control" placeholder = "Enter password" required="required"><br>
</div>
<div class = "col-md-3">
<label for = "password"></label>
<input type="submit" class = "btn btn-primary" name = "submit" value = "Sign_in"><br>
</div>
</div>
</form>
Controller Code: -
class Home extends CI_Controller{
function __construct() {
parent::__construct();
$this->load->model('Test');
$this->load->library('session');
}
public function index(){
$this->load->view('login');
}
public function logout()
{
$this->Test->updation1();
$this->session->unset_userdata('usr_sess');
$this->session->sess_destroy();
}
public function xyz(){
if($this->input->post('submit')){
$uid = $this->input->post('eid');
$pass = $this->input->post('pass');
$login_id = $this->Test->login($uid,$pass);
$sess_ary = array('lgid' => $login_id['id'] );
$this->session->set_userdata('usr_sess',$sess_ary);
if($login_id)
{ if($login_id['toggle']==0)
{
$this->Test->updation();
return $this->load->view('logout');
}
else{
$this->logout();
$this->session->set_flashdata('already_existing','This account is already logged
in');
return $this->load->view('login');
}
}
else
{
$this->session->set_flashdata('Login_failed','Invalid Username/Password');
return $this->load->view('login');
}
}
else if($this->input->post('logout'))
{ if($this->session->has_userdata['usr_sess']['lgid']){
$this->logout();
$this->session->set_flashdata('Logged_out','Logged out successfully');
return $this->load->view('login');}
else{
return $this->load->view('login');
}
}
}
Before removing index.php from URL, code was working fine, but now only the first view(login page) is loaded and after clicking the submit button, it is redirecting to the same view, i.e. login page.
Please help me

htaccess FilterProvider giving error 500

I'm using Apache/2.4.4 (Unix) PHP/5.5.3 OpenSSL/1.0.1e mod_perl/2.0.8-dev Perl/v5.16.3, and i get an Error 500 when i try opening this page in my browser
/xamppfiles/htdocs/wm/frontend/www/ Below if my error log.
[Tue Mar 18 17:03:51.923726 2014] [core:alert] [pid 933] [client ::1:51765] /Applications/XAMPP/xamppfiles/htdocs/wm/frontend/www/.htaccess: FilterProvider takes three arguments, filter-name provider-name match-expression
here is my htaccess file
# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------
<IfModule mod_deflate.c>
# Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
</IfModule>
</IfModule>
# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
<IfModule !mod_filter.c>
# Legacy versions of Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
</IfModule>
</IfModule>
i tried this, but no luck either
<IfVersion >= 2.4.4>
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
</IfVersion>
<IfVersion <= 2.4.4>
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/html'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/css'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/plain'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/x-component'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/javascript'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/json'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xhtml+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/rss+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/atom+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/vnd.ms-fontobject'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/svg+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/x-icon'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/x-font-ttf'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'font/opentype'"
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
</IfVersion>
Your logic is flawed. You have the %{Content_Type} syntax being used for the older version, and both IfVersion conditionals will match version 2.4.4 because you have "or equal to" on both conditionals.
This should work:
<IfVersion < 2.4.4>
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/css
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/plain
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $text/x-component
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/javascript
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/json
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/xhtml+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/rss+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/atom+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/vnd.ms-fontobject
FilterProvider COMPRESS DEFLATE resp=Content-Type $image/svg+xml
FilterProvider COMPRESS DEFLATE resp=Content-Type $application/x-font-ttf
FilterProvider COMPRESS DEFLATE resp=Content-Type $font/opentype
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
</IfVersion>
<IfVersion >= 2.4.4>
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/html'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/css'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/plain'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/x-component'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/javascript'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/json'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xhtml+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/rss+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/atom+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/vnd.ms-fontobject'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/svg+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/x-icon'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/x-font-ttf'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'font/opentype'"
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
</IfModule>
</IfVersion>

Opencart pagination links on search results just reload first page when clicked, and adds "#" to the URL String

When I submit search results on my site it loads accurate results with the correct number of products displayed... When I go down to the pagination links at the bottom they show the correct links when hovered over them... However when I click on them it just reloads the page I'm already at AND it adds # to the end of the URL string.... The code appears to be correct, my initial feeling is that this maybe because of the SEO URLS I have enabled in opencart, and the HTACCESS edits I have made....
Here is an example: http://www.justicejewelers.com/index.php?route=product/search&filter_name=gold
HTACCESS:
RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
Search.php:
$pagination = new Pagination();
$pagination->total = $product_total;
$pagination->page = $page;
$pagination->limit = $limit;
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('product/search', $url . '&page={page}');
Search.TPL:
<?php echo $header; ?>
<?php echo $content_top; ?>
<div class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<?php echo $breadcrumb['separator']; ?>
<a href="<?php echo $breadcrumb['href']; ?>">
<?php echo $breadcrumb['text']; ?>
</a>
<?php } ?>
</div>
<header class="heading">
<h1><?php echo $heading_title; ?></h1>
<div id="notification"></div>
</header>
<?php
if ($column_left || $column_right) { $main = "span9"; }
else { $main = "span12"; }
?>
<div class="row-fluid">
<?php echo $column_left; ?>
<section id="maincontent" class="<?php echo $main; ?> search listing" role="main">
<div class="mainborder">
<?php if ($column_left) { ?>
<div id="toggle_sidebar"></div>
<?php } ?>
<div class="search-criteria">
<div class="contentset center">
<h4 class="inner">
<span><?php echo $text_critea; ?></span>
</h4>
</div>
<div class="controls">
<input type="search" name="filter_name" id="filter_name" value="<?php echo $filter_name; ?>" class="search-box span6" placeholder="Search" />
</div>
<select name="filter_category_id" class="filter-category span4">
<option value="0"><?php echo $text_category; ?></option>
<?php foreach ($categories as $category_1) { ?>
<?php if ($category_1['category_id'] == $filter_category_id) { ?>
<option value="<?php echo $category_1['category_id']; ?>" selected="selected"><?php echo $category_1['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $category_1['category_id']; ?>"><?php echo $category_1['name']; ?></option>
<?php } ?>
<?php foreach ($category_1['children'] as $category_2) { ?>
<?php if ($category_2['category_id'] == $filter_category_id) { ?>
<option value="<?php echo $category_2['category_id']; ?>" selected="selected"> - <?php echo $category_2['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $category_2['category_id']; ?>"> - <?php echo $category_2['name']; ?></option>
<?php } ?>
<?php foreach ($category_2['children'] as $category_3) { ?>
<?php if ($category_3['category_id'] == $filter_category_id) { ?>
<option value="<?php echo $category_3['category_id']; ?>" selected="selected"> - <?php echo $category_3['name']; ?></option>
<?php } else { ?>
<option value="<?php echo $category_3['category_id']; ?>"> - <?php echo $category_3['name']; ?></option>
<?php } ?>
<?php } ?>
<?php } ?>
<?php } ?>
</select>
<div class="controls">
<label class="checkbox inline">
<?php if ($filter_sub_category) { ?>
<input type="checkbox" name="filter_sub_category" value="1" id="sub_category" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="filter_sub_category" value="1" id="sub_category" />
<?php } ?>
<?php echo $text_sub_category; ?>
</label>
<label class="checkbox inline">
<?php if ($filter_description) { ?>
<input type="checkbox" name="filter_description" value="1" id="description" checked="checked" />
<?php } else { ?>
<input type="checkbox" name="filter_description" value="1" id="description" />
<?php } ?>
<?php echo $entry_description; ?>
</label>
</div>
<div class="buttons">
<input type="button" value="<?php echo $button_search; ?>" id="button-search" class="btn btn-inverse" />
</div>
</div>
<div class="contentset center">
<h4 class="inner">
<span><?php echo $text_search; ?></span>
</h4>
</div>
<!-- Products
============================== -->
<?php if ($products) { ?>
<!-- Grid/Lis view, filters
============================== -->
<div class="product-filter">
<div class="btn-group display" data-toggle="buttons-radio">
<button id="grid" class="btn btn-mini" title="<?php echo $text_grid; ?>" onclick="display('grid');"><i class="icon-th"></i></button>
<button id="list" class="btn btn-mini" title="<?php echo $text_list; ?>" onclick="display('list');"><i class="icon-list"></i></button>
</div>
<span class="product-compare"><?php echo $text_compare; ?></span>
<div class="list-options">
<div class="sort">
<?php echo $text_sort; ?>
<select onchange="location = this.value;">
<?php foreach ($sorts as $sorts) { ?>
<?php if ($sorts['value'] == $sort . '-' . $order) { ?>
<option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
<?php } else { ?>
<option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
<?php } ?>
<?php } ?>
</select>
</div>
<div class="limit">
<?php echo $text_limit; ?>
<select onchange="location = this.value;">
<?php foreach ($limits as $limits) { ?>
<?php if ($limits['value'] == $limit) { ?>
<option value="<?php echo $limits['href']; ?>" selected="selected">
<?php echo $limits['text']; ?>
</option>
<?php } else { ?>
<option value="<?php echo $limits['href']; ?>">
<?php echo $limits['text']; ?>
</option>
<?php } ?>
<?php } ?>
</select>
</div>
</div>
</div>
<!-- Product list (Default to Grid)
============================== -->
<div class="product-grid row-fluid">
<?php
$counter=0;
foreach ($products as $product) {
if ($counter == 0 ) $xclass = 'alpha';
else if (($counter+12) % 12 == 0 ) $xclass = 'alpha4 alpha3';
else if (($counter+4) % 4 == 0 ) $xclass = 'alpha4';
else if (($counter+3) % 3 == 0 ) $xclass = 'alpha3';
else $xclass = '';
if (($counter+2) % 2 == 0 ) $xclass .= ' odd';
?>
<div class="grid-box <?php echo $xclass; ?>">
<div class="inner">
<?php if ($product['price'] && $product['special']) { ?>
<span class="onsale">
<?php $this->language->load('module/sellegance');
echo $this->language->get('text_onsale'); ?>
</span>
<?php } ?>
<?php if ($product['thumb']) { ?>
<div class="image">
<img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" />
</div>
<?php } ?>
<div class="name">
<?php echo $product['name']; ?>
</div>
<?php if ($product['rating']) { ?>
<div class="rating">
<img src="catalog/view/theme/sellegance/images/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" />
</div>
<?php } ?>
<div class="description"><?php echo $product['description']; ?></div>
<?php if ($product['price']) { ?>
<div class="price">
<?php if (!$product['special']) { ?>
<?php echo $product['price']; ?>
<?php } else { ?>
<span class="price-old"><?php echo $product['price']; ?></span>
<span class="price-new"><?php echo $product['special']; ?></span>
<?php } ?>
<?php if ($product['tax']) { ?>
<br />
<span class="price-tax"><?php echo $text_tax; ?> <?php echo $product['tax']; ?></span>
<?php } ?>
</div>
<?php } ?>
<div class="actions">
<div class="cart">
<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="btn btn-cart btn-small" />
</div>
<div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><?php echo $button_wishlist; ?></a></div>
<div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><?php echo $button_compare; ?></a></div>
</div>
</div>
</div>
<?php $counter++; } ?>
</div> <!-- .produc-grid -->
<div class="paginate"><?php echo $pagination; ?></div>
<?php } else { ?>
<div class="content empty white">
<div class="alert warning"><?php echo $text_empty; ?><a class="close" data-dismiss="alert" href="#">×</a></div>
</div>
<?php } ?>
</div>
</section><!-- #maincontent -->
<?php echo $column_right; ?>
</div> <!-- .row -->
<?php echo $content_bottom; ?>
<script type="text/javascript">
jQuery('#maincontent input[name=\'filter_name\']').keydown(function(e) {
if (e.keyCode == 13) {
jQuery('.button-search').trigger('click');
}
});
jQuery('#button-search').bind('click', function() {
url = 'index.php?route=product/search';
var filter_name = jQuery('#maincontent input[name=\'filter_name\']').attr('value');
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
var filter_category_id = jQuery('#maincontent select[name=\'filter_category_id\']').attr('value');
if (filter_category_id > 0) {
url += '&filter_category_id=' + encodeURIComponent(filter_category_id);
}
var filter_sub_category = jQuery('#maincontent input[name=\'filter_sub_category\']:checked').attr('value');
if (filter_sub_category) {
url += '&filter_sub_category=true';
}
var filter_description = jQuery('#maincontent input[name=\'filter_description\']:checked').attr('value');
if (filter_description) {
url += '&filter_description=true';
}
location = url;
});
</script>
The true question is why would this script in search:
<script type="text/javascript">
jQuery('#maincontent input[name=\'filter_name\']').keydown(function(e) {
if (e.keyCode == 13) {
jQuery('.button-search').trigger('click');
}
});
jQuery('#button-search').bind('click', function() {
url = 'index.php?route=product/search';
var filter_name = jQuery('#maincontent input[name=\'filter_name\']').attr('value');
if (filter_name) {
url += '&filter_name=' + encodeURIComponent(filter_name);
}
var filter_category_id = jQuery('#maincontent select[name=\'filter_category_id\']').attr('value');
if (filter_category_id > 0) {
url += '&filter_category_id=' + encodeURIComponent(filter_category_id);
}
var filter_sub_category = jQuery('#maincontent input[name=\'filter_sub_category\']:checked').attr('value');
if (filter_sub_category) {
url += '&filter_sub_category=true';
}
var filter_description = jQuery('#maincontent input[name=\'filter_description\']:checked').attr('value');
if (filter_description) {
url += '&filter_description=true';
}
location = url;
});
</script>
BE effected by bannerpack, and not work without it?
Here is the code for Banner Pack:
(function($){var NivoSlider=function(element,options){var settings=$.extend({},$.fn.nivoSlider.defaults,options);var vars={currentSlide:0,currentImage:'',totalSlides:0,randAnim:'',running:false,paused:false,stop:false};var slider=$(element);slider.data('nivo:vars',vars);slider.css('position','relative');slider.addClass('nivoSlider');var kids=slider.children();kids.each(function(){var child=$(this);var link='';if(!child.is('img')){if(child.is('a')){child.addClass('nivo-imageLink');link=child;}
child=child.find('img:first');}
var childWidth=child.width();if(childWidth==0)childWidth=child.attr('width');var childHeight=child.height();if(childHeight==0)childHeight=child.attr('height');if(childWidth>slider.width()){slider.width(childWidth);}
if(childHeight>slider.height()){slider.height(childHeight);}
if(link!=''){link.css('display','none');}
child.css('display','none');vars.totalSlides++;});if(settings.startSlide>0){if(settings.startSlide>=vars.totalSlides)settings.startSlide=vars.totalSlides-1;vars.currentSlide=settings.startSlide;}
if($(kids[vars.currentSlide]).is('img')){vars.currentImage=$(kids[vars.currentSlide]);}else{vars.currentImage=$(kids[vars.currentSlide]).find('img:first');}
if($(kids[vars.currentSlide]).is('a')){$(kids[vars.currentSlide]).css('display','block');}
slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');slider.append($('<div class="nivo-caption"><p></p></div>').css({display:'none',opacity:settings.captionOpacity}));var processCaption=function(settings){var nivoCaption=$('.nivo-caption',slider);if(vars.currentImage.attr('title')!=''&&vars.currentImage.attr('title')!=undefined){var title=vars.currentImage.attr('title');if(title.substr(0,1)=='#')title=$(title).html();if(nivoCaption.css('display')=='block'){nivoCaption.find('p').fadeOut(settings.animSpeed,function(){$(this).html(title);$(this).fadeIn(settings.animSpeed);});}else{nivoCaption.find('p').html(title);}
nivoCaption.fadeIn(settings.animSpeed);}else{nivoCaption.fadeOut(settings.animSpeed);}}
processCaption(settings);var timer=0;if(!settings.manualAdvance&&kids.length>1){timer=setInterval(function(){nivoRun(slider,kids,settings,false);},settings.pauseTime);}
if(settings.directionNav){slider.append('<div class="ban_direction"><a class="nivo-prevNav">'+settings.prevText+'</a><a class="nivo-nextNav">'+settings.nextText+'</a></div>');if(settings.directionNavHide){$('.ban_direction',slider).hide();slider.hover(function(){$('.ban_direction',slider).show();},function(){$('.ban_direction',slider).hide();});}
$('a.nivo-prevNav',slider).live('click',function(){if(vars.running)return false;clearInterval(timer);timer='';vars.currentSlide-=2;nivoRun(slider,kids,settings,'prev');});$('a.nivo-nextNav',slider).live('click',function(){if(vars.running)return false;clearInterval(timer);timer='';nivoRun(slider,kids,settings,'next');});}
if(settings.controlNav){var nivoControl=$('<div class="banner_control"></div>');slider.append(nivoControl);for(var i=0;i<kids.length;i++){if(settings.controlNavThumbs){var child=kids.eq(i);if(!child.is('img')){child=child.find('img:first');}
if(settings.controlNavThumbsFromRel){nivoControl.append('<a class="ban_control" rel="'+i+'"><img src="'+child.attr('rel')+'" alt="" /></a>');}else{nivoControl.append('<a class="ban_control" rel="'+i+'"><img src="'+child.attr('src').replace(settings.controlNavThumbsSearch,settings.controlNavThumbsReplace)+'" alt="" /></a>');}}else{nivoControl.append('<a class="ban_control" rel="'+i+'">'+(i+1)+'</a>');}}
$('.banner_control a:eq('+vars.currentSlide+')',slider).addClass('active');$('.banner_control a',slider).live('click',function(){if(vars.running)return false;if($(this).hasClass('active'))return false;clearInterval(timer);timer='';slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');vars.currentSlide=$(this).attr('rel')-1;nivoRun(slider,kids,settings,'control');});}
if(settings.keyboardNav){$(window).keypress(function(event){if(event.keyCode=='37'){if(vars.running)return false;clearInterval(timer);timer='';vars.currentSlide-=2;nivoRun(slider,kids,settings,'prev');}
if(event.keyCode=='39'){if(vars.running)return false;clearInterval(timer);timer='';nivoRun(slider,kids,settings,'next');}});}
if(settings.pauseOnHover){slider.hover(function(){vars.paused=true;clearInterval(timer);timer='';},function(){vars.paused=false;if(timer==''&&!settings.manualAdvance){timer=setInterval(function(){nivoRun(slider,kids,settings,false);},settings.pauseTime);}});}
slider.bind('nivo:animFinished',function(){vars.running=false;$(kids).each(function(){if($(this).is('a')){$(this).css('display','none');}});if($(kids[vars.currentSlide]).is('a')){$(kids[vars.currentSlide]).css('display','block');}
if(timer==''&&!vars.paused&&!settings.manualAdvance){timer=setInterval(function(){nivoRun(slider,kids,settings,false);},settings.pauseTime);}
settings.afterChange.call(this);});var createSlices=function(slider,settings,vars){for(var i=0;i<settings.slices;i++){var sliceWidth=Math.round(slider.width()/settings.slices);if(i==settings.slices-1){slider.append($('<div class="banner-slice"></div>').css({left:(sliceWidth*i)+'px',width:(slider.width()-(sliceWidth*i))+'px',height:'0px',opacity:'0',background:'url("'+vars.currentImage.attr('src')+'") no-repeat -'+((sliceWidth+(i*sliceWidth))-sliceWidth)+'px 0%'}));}else{slider.append($('<div class="banner-slice"></div>').css({left:(sliceWidth*i)+'px',width:sliceWidth+'px',height:'0px',opacity:'0',background:'url("'+vars.currentImage.attr('src')+'") no-repeat -'+((sliceWidth+(i*sliceWidth))-sliceWidth)+'px 0%'}));}}}
var createBoxes=function(slider,settings,vars){var boxWidth=Math.round(slider.width()/settings.boxCols);var boxHeight=Math.round(slider.height()/settings.boxRows);for(var rows=0;rows<settings.boxRows;rows++){for(var cols=0;cols<settings.boxCols;cols++){if(cols==settings.boxCols-1){slider.append($('<div class="bannar-box"></div>').css({opacity:0,left:(boxWidth*cols)+'px',top:(boxHeight*rows)+'px',width:(slider.width()-(boxWidth*cols))+'px',height:boxHeight+'px',background:'url("'+vars.currentImage.attr('src')+'") no-repeat -'+((boxWidth+(cols*boxWidth))-boxWidth)+'px -'+((boxHeight+(rows*boxHeight))-boxHeight)+'px'}));}else{slider.append($('<div class="bannar-box"></div>').css({opacity:0,left:(boxWidth*cols)+'px',top:(boxHeight*rows)+'px',width:boxWidth+'px',height:boxHeight+'px',background:'url("'+vars.currentImage.attr('src')+'") no-repeat -'+((boxWidth+(cols*boxWidth))-boxWidth)+'px -'+((boxHeight+(rows*boxHeight))-boxHeight)+'px'}));}}}}
var nivoRun=function(slider,kids,settings,nudge){var vars=slider.data('nivo:vars');if(vars&&(vars.currentSlide==vars.totalSlides-1)){settings.lastSlide.call(this);}
if((!vars||vars.stop)&&!nudge)return false;settings.beforeChange.call(this);if(!nudge){slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');}else{if(nudge=='prev'){slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');}
if(nudge=='next'){slider.css('background','url("'+vars.currentImage.attr('src')+'") no-repeat');}}
vars.currentSlide++;if(vars.currentSlide==vars.totalSlides){vars.currentSlide=0;settings.slideshowEnd.call(this);}
if(vars.currentSlide<0)vars.currentSlide=(vars.totalSlides-1);if($(kids[vars.currentSlide]).is('img')){vars.currentImage=$(kids[vars.currentSlide]);}else{vars.currentImage=$(kids[vars.currentSlide]).find('img:first');}
if(settings.controlNav){$('.banner_control a',slider).removeClass('active');$('.banner_control a:eq('+vars.currentSlide+')',slider).addClass('active');}
processCaption(settings);$('.banner-slice',slider).remove();$('.bannar-box',slider).remove();if(settings.effect=='random'){var anims=new Array('fade');vars.randAnim=anims[Math.floor(Math.random()*(anims.length+1))];if(vars.randAnim==undefined)vars.randAnim='fade';}
if(settings.effect.indexOf(',')!=-1){var anims=settings.effect.split(',');vars.randAnim=anims[Math.floor(Math.random()*(anims.length))];if(vars.randAnim==undefined)vars.randAnim='fade';}
vars.running=true;if(settings.effect=='sliceDown'||settings.effect=='sliceDownRight'||vars.randAnim=='sliceDownRight'||settings.effect=='sliceDownLeft'||vars.randAnim=='sliceDownLeft'){createSlices(slider,settings,vars);var timeBuff=0;var i=0;var slices=$('.banner-slice',slider);if(settings.effect=='sliceDownLeft'||vars.randAnim=='sliceDownLeft')slices=$('.banner-slice',slider)._reverse();slices.each(function(){var slice=$(this);slice.css({'top':'0px'});if(i==settings.slices-1){setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed);},(100+timeBuff));}
timeBuff+=50;i++;});}
else if(settings.effect=='sliceUp'||settings.effect=='sliceUpRight'||vars.randAnim=='sliceUpRight'||settings.effect=='sliceUpLeft'||vars.randAnim=='sliceUpLeft'){createSlices(slider,settings,vars);var timeBuff=0;var i=0;var slices=$('.banner-slice',slider);if(settings.effect=='sliceUpLeft'||vars.randAnim=='sliceUpLeft')slices=$('.banner-slice',slider)._reverse();slices.each(function(){var slice=$(this);slice.css({'bottom':'0px'});if(i==settings.slices-1){setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed);},(100+timeBuff));}
timeBuff+=50;i++;});}
else if(settings.effect=='sliceUpDown'||settings.effect=='sliceUpDownRight'||vars.randAnim=='sliceUpDown'||settings.effect=='sliceUpDownLeft'||vars.randAnim=='sliceUpDownLeft'){createSlices(slider,settings,vars);var timeBuff=0;var i=0;var v=0;var slices=$('.banner-slice',slider);if(settings.effect=='sliceUpDownLeft'||vars.randAnim=='sliceUpDownLeft')slices=$('.banner-slice',slider)._reverse();slices.each(function(){var slice=$(this);if(i==0){slice.css('top','0px');i++;}else{slice.css('bottom','0px');i=0;}
if(v==settings.slices-1){setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({height:'100%',opacity:'1.0'},settings.animSpeed);},(100+timeBuff));}
timeBuff+=50;v++;});}
else if(settings.effect=='fold'||vars.randAnim=='fold'){createSlices(slider,settings,vars);var timeBuff=0;var i=0;$('.banner-slice',slider).each(function(){var slice=$(this);var origWidth=slice.width();slice.css({top:'0px',height:'100%',width:'0px'});if(i==settings.slices-1){setTimeout(function(){slice.animate({width:origWidth,opacity:'1.0'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){slice.animate({width:origWidth,opacity:'1.0'},settings.animSpeed);},(100+timeBuff));}
timeBuff+=50;i++;});}
else if(settings.effect=='fade'||vars.randAnim=='fade'){createSlices(slider,settings,vars);var firstSlice=$('.banner-slice:first',slider);firstSlice.css({'height':'100%','width':slider.width()+'px'});firstSlice.animate({opacity:'1.0'},(settings.animSpeed*2),'',function(){slider.trigger('nivo:animFinished');});}
else if(settings.effect=='slideInRight'||vars.randAnim=='slideInRight'){createSlices(slider,settings,vars);var firstSlice=$('.banner-slice:first',slider);firstSlice.css({'height':'100%','width':'0px','opacity':'1'});firstSlice.animate({width:slider.width()+'px'},(settings.animSpeed*2),'',function(){slider.trigger('nivo:animFinished');});}
else if(settings.effect=='slideInLeft'||vars.randAnim=='slideInLeft'){createSlices(slider,settings,vars);var firstSlice=$('.banner-slice:first',slider);firstSlice.css({'height':'100%','width':'0px','opacity':'1','left':'','right':'0px'});firstSlice.animate({width:slider.width()+'px'},(settings.animSpeed*2),'',function(){firstSlice.css({'left':'0px','right':''});slider.trigger('nivo:animFinished');});}
else if(settings.effect=='boxRandom'||vars.randAnim=='boxRandom'){createBoxes(slider,settings,vars);var totalBoxes=settings.boxCols*settings.boxRows;var i=0;var timeBuff=0;var boxes=shuffle($('.bannar-box',slider));boxes.each(function(){var box=$(this);if(i==totalBoxes-1){setTimeout(function(){box.animate({opacity:'1'},settings.animSpeed,'',function(){slider.trigger('nivo:animFinished');});},(100+timeBuff));}else{setTimeout(function(){box.animate({opacity:'1'},settings.animSpeed);},(100+timeBuff));}
timeBuff+=20;i++;});}
else if(settings.effect=='boxRain'||vars.randAnim=='boxRain'||settings.effect=='boxRainReverse'||vars.randAnim=='boxRainReverse'||settings.effect=='boxRainGrow'||vars.randAnim=='boxRainGrow'||settings.effect=='boxRainGrowReverse'||vars.randAnim=='boxRainGrowReverse'){createBoxes(slider,settings,vars);var totalBoxes=settings.boxCols*settings.boxRows;var i=0;var timeBuff=0;var rowIndex=0;var colIndex=0;var box2Darr=new Array();box2Darr[rowIndex]=new Array();var boxes=$('.bannar-box',slider);if(settings.effect=='boxRainReverse'||vars.randAnim=='boxRainReverse'||settings.effect=='boxRainGrowReverse'||vars.randAnim=='boxRainGrowReverse'){boxes=$('.bannar-box',slider)._reverse();}
boxes.each(function(){box2Darr[rowIndex][colIndex]=$(this);colIndex++;if(colIndex==settings.boxCols){rowIndex++;colIndex=0;box2Darr[rowIndex]=new Array();}});for(var cols=0;cols<(settings.boxCols*2);cols++){var prevCol=cols;for(var rows=0;rows<settings.boxRows;rows++){if(prevCol>=0&&prevCol<settings.boxCols){(function(row,col,time,i,totalBoxes){var box=$(box2Darr[row][col]);var w=box.width();var h=box.height();if(settings.effect=='boxRainGrow'||vars.randAnim=='boxRainGrow'||settings.effect=='boxRainGrowReverse'||vars.randAnim=='boxRainGrowReverse'){box.width(0).height(0);}
if(i==totalBoxes-1){setTimeout(function(){box.animate({opacity:'1',width:w,height:h},settings.animSpeed/1.3,'',function(){slider.trigger('nivo:animFinished');});},(100+time));}else{setTimeout(function(){box.animate({opacity:'1',width:w,height:h},settings.animSpeed/1.3);},(100+time));}})(rows,prevCol,timeBuff,i,totalBoxes);i++;}
prevCol--;}
timeBuff+=100;}}}
var shuffle=function(arr){for(var j,x,i=arr.length;i;j=parseInt(Math.random()*i),x=arr[--i],arr[i]=arr[j],arr[j]=x);return arr;}
var trace=function(msg){if(this.console&&typeof console.log!="undefined")
console.log(msg);}
this.stop=function(){if(!$(element).data('nivo:vars').stop){$(element).data('nivo:vars').stop=true;trace('Stop Slider');}}
this.start=function(){if($(element).data('nivo:vars').stop){$(element).data('nivo:vars').stop=false;trace('Start Slider');}}
settings.afterLoad.call(this);return this;};$.fn.nivoSlider=function(options){return this.each(function(key,value){var element=$(this);if(element.data('nivoslider'))return element.data('nivoslider');var nivoslider=new NivoSlider(this,options);element.data('nivoslider',nivoslider);});};$.fn.nivoSlider.defaults={effect:'random',slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:5000,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,controlNavThumbsSearch:'.jpg',controlNavThumbsReplace:'_thumb.jpg',keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:0.8,prevText:'Prev',nextText:'Next',beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};$.fn._reverse = []._reverse||[].reverse;})(jQuery); jQuery.noConflict();
The problem is definitely a JavaScript problem. The URLs are alright thus there has to be some JavaScript messing up. Because there are tons of JavaScript files and libraries added to Your site/theme I was unable to identify the real problem, but if You turn off the javascript within Your browser and try to click on the pagination links You will see the pagination is working correctly.
I would suggest disabling one JavaScript include after another and refreshing the page (just by commenting out the lines within Your footer, header, or appropriate controllers) and checking the pagination. Finally You should be able to identify the one that causes the problem and we could then lead You to the happy ending.

Resources