search result

Come here for help or to post comments on Sphider
Post Reply
chef-olaf
Posts: 17
Joined: Wed Dec 06, 2023 7:38 am

search result

Post by chef-olaf »

Hello and good morning ( in Germany )

I have a small problem again.
When I trigger a search with an empty string I get the following - correct - message
The search "" returned no results

However, if I perform a search with a search term that does not exist Example https://seo-search.eu/search.php?query= ... arch=1&s=1
I do not get a message like - The search for "testbild" returned no results -
but only a blank page. Even the footer is not displayed.

What have I done wrong?

https://seo-search.eu

Currently in database: 810 sites, 416129 links, 0 categories, 1556948 keywords and 0 images.
0 RSS feeds containing 0 items.


LG Olaf
User avatar
captquirk
Site Admin
Posts: 308
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: search result

Post by captquirk »

Holy crap!
I confirm that "testbild" gives a blank page...
But "testbald", "testbold", "testbeld", "xtestbild", and anything else I tried gives an expected "No results found". Even "tstbild" works.
It seems ONLY "testbild" fails.
Using my own installation of Sphider for my site, "testbild" not only gives "No results found", it also gives a spelling suggestion!

So right now, I am at a TOTAL loss as to what is happening! I need to think this through and try to come up with some rationale as to what is going on here.

If ANYONE has any wonky ideas, please share them! This is weird!
User avatar
captquirk
Site Admin
Posts: 308
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: search result

Post by captquirk »

Looking at the source code for the "testbild" results page, we see an abrupt end:
<BODY>
<h1>Seo Search - Search Engine for Europe and Switzerland</h1><h2><p align='center'>No advertising! No paid TOP entries!</p></h2><p><center><a href='../search.php'>
<img src='/flaggen/gb.webp' alt='in English ' title='in English' ></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/de/search.php'>
<img src='/flaggen/de.webp' alt='in deutscher Sprache' title='in deutsher Sprache'></></></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/de/search.php'>
<img src='/flaggen/at.webp' alt='in deutscher Sprache' title='in deutsher Sprache'></></></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/de/search.php'>
<img src='/flaggen/ch.webp' alt='in deutscher Sprache' title='in deutsher Sprache'></></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/nl/search.php'>
<img src=' /flaggen/nl.webp' alt='in het Nederlands' title='in het Nederlands '></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/pl/search.php'>
<img src=' /flaggen/pl.webp' alt='po polsku' title='po polsku'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/it/search.php'>
<img src=' /flaggen/it.webp' alt='en italien' title='en italien'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/fr/search.php'>
<img src=' /flaggen/fr.webp' alt='en fran&ccedil;ais' title='en fran&ccedil;ais'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/dk/search.php'>
<img src=' /flaggen/dk.webp' alt='p&aring; dansk' title='p&aring; dansk'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/fi/search.php'>
<img src=' /flaggen/fi.webp' alt='suomen kielell&auml;' title='suomen kielell&auml;'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/se/search.php'>
<img src=' /flaggen/se.webp' alt='p&aring; svenska' title='p&aring; svenska'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/es/search.php'>
<img src=' /flaggen/es.webp' alt='en espanol' title='en espanol'></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='/ro/search.php'>
<img src=' /flaggen/ro.webp' alt='in ceha' title='in ceha'></a></center></p><div class='container'>
<br>
<form action='search.php' method='get'>
<input type='text' name='query' id='keyword' size='40' value='testbild' autocomplete='off'>
<div id='sresults'></div>
<input type='submit' class='button' value='Search'><br><br><input type='hidden' name='search' value='1'>
<input type='hidden' name='s' value='1'>
</form><br>
</div>
When doing a search with expected "No results found", the code continues beyond this.

Your code has been modified beyond what Sphider ships with. This is NOT a problem! I encourage people to modify Sphider to fit their needs! However, the task of troubleshooting modified code falls on the user. Still, I am willing to help where I can.

I suggest that in your code, find the spot where things begin to go wrong and insert code to figure out what is or is not happening. The output abruptly ends. What is supposed to happen next? Why isn't the next step happening? Is a value getting lost or corrupted? Essentially, you want to try to follow the process and hopefully see what is causing it to suddenly quit.
User avatar
captquirk
Site Admin
Posts: 308
Joined: Sun Apr 09, 2017 8:49 pm
Location: Arizona, USA
Contact:

Re: search result

Post by captquirk »

In search_results.php, there is a function, about line 44:
if ($search_results['total_results']==0) {
echo "<div id ='result_report'>";
In the case of "testbild", the <div id="result_report"> is not being output. One can conclude that total_results is NOT zero! If you look at the top of the module, see "extract($search_results) to see what the value is.
This will likely take you back into searchfuncs.php. The value is generated in function getSearchResults.

If you figure out what it is about "testbild" that triggers this anomaly, please let me know!

-----
Wild thought--- is it possible that "testbild" IS in the keywords table, but does NOT have a valid keyword_id?
chef-olaf
Posts: 17
Joined: Wed Dec 06, 2023 7:38 am

Re: search result solved

Post by chef-olaf »

Hi all
Thanks for the help!

I checked the code and found no errors.

Then I ran clean tables, but the problem remained.

Then I searched the database for a testbild and found an entry.
I deleted it and now everything works as expected.

I can only give the script and support at ***** five stars - everything is fine.

Hi Olaf
Post Reply