Hello Everyone,
Never have i had an issue like this before, i am comfortable coding and i have searched and searched for this issue...
My problem:
When searching from the main search bar at the top of the page it is going to this link "https://www.hpprintandgraphics.co.uk/undefinedindex.php?route=product/search&filter_name=mug"
Notice the undefined before index?
Now i have searched for 2 days for a solution and cannot find one, if you delete the "undefined" ofcourse it works.
Any ideas?
PS THIS WAS WORKING PREVIOUS AND THERE HAS BEEN NO CHANGES AT ALL, THEN SUDDENLY IT STOPPED WORKING
are you using any kind of search modules? Also, check to ensure nothing is wrong in your common.js when triggering the search function.
Hello there,
No search modules no... cant see anything wrong in the javascript file.
Regards
Nick
No search modules no... cant see anything wrong in the javascript file.
Regards
Nick
common.js file is where it does the redirection. most likely something is wrong there, or your theme uses another js file for the job. Reset to default theme, does error persist?
When changing theme to default search works correctly.
Don't believe it is using a different javascript file though...
Don't believe it is using a different javascript file though...
Just realised in the attachment "common.js" at:
"$('.button-search').bind('click', function() {
url = $('base').attr('href') + 'indextest.php?route=product/search';"
Notice how it says indextest.php? THIS IS NOT THE CASE IN THE LIVE FILE IT IS JUST "INDEX.PHP....."
So this isnt the issue
"$('.button-search').bind('click', function() {
url = $('base').attr('href') + 'indextest.php?route=product/search';"
Notice how it says indextest.php? THIS IS NOT THE CASE IN THE LIVE FILE IT IS JUST "INDEX.PHP....."
So this isnt the issue
Check in header.tpl string (after </title> in clean v.1.6):
'undefined' - value of $('base').attr('href') if jQuery can't find tag 'base'
sorry for my bad English
Code: Select all
<base href="<?php echo $base; ?>" />
sorry for my bad English
Make sure that
inside
Code: Select all
{{ search }}
Code: Select all
<header>
{{ search }}
</header>
Last edited by straightlight on Thu Jan 30, 2020 9:06 am, edited 1 time in total.
Reason: Added code tags.
Reason: Added code tags.
Who is online
Users browsing this forum: No registered users and 67 guests