I have ZP 1431. In search option, if I select treat spaces as AND, search results page is wrong.
Example from Zenpage theme:
6 hits for A and B
Pages (1) with nothing following
Articles (4) with nothing following
Images (1) with one displayed image.
Debug log file follows.
Update: I did discover that I forgot to check "content" as one of the search fields which did fix the blank entries returned by pages/news, but the count is still wrong.
`
{Sun, 19 Aug 2012 16:15:24 GMT} Zenphoto v1.4.3.1[10590]
Backtrace: NOTICE: Undefined index: titlelink in C:\mysites\nif\galleries\zp-core\class-search.php on line 1585
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1549])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1585
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1549])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: in C:\mysites\nif\galleries\zp-core\class-search.php on line 1585
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1549])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: titlelink in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: titlelink in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: titlelink in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: titlelink in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
{Sun, 19 Aug 2012 16:15:24 GMT}
Backtrace: NOTICE: Undefined index: in C:\mysites\nif\galleries\zp-core\class-search.php on line 1657
SearchEngine->getSearchArticles called
from SearchEngine->getArticles (class-search.php [1613])
from getNumNews (zenpage-template-functions.php [201])
from include (search.php [30])
from index.php [92]
Zenphoto version 1.4.3.1 [10590] | License | User guide | Forum | Bugtracker | Change log | Server date: 2012-08-19 12:15:28
`
Comments
Search query was two words with new search checked and all fields selected. Returns count of 5 items with 1 page (nothing listed), 3 articles, and 1 image. Following is entire log after I cleared it and then started ZP to run the search query only.
`
{Mon, 20 Aug 2012 14:51:26 GMT} Zenphoto v1.4.3.1[10673]
Backtrace: NOTICE: Undefined index: titlelink in C:\mysites\nif\galleries\zp-core\class-search.php on line 1589
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1553])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
{Mon, 20 Aug 2012 14:51:26 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1591
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1553])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
{Mon, 20 Aug 2012 14:51:26 GMT}
Backtrace: NOTICE: Undefined index: in C:\mysites\nif\galleries\zp-core\class-search.php on line 1591
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1553])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
`
change line 1588:
`while ($row = db_fetch_assoc($search_result)) {`
to:
`
debugLog("query:$search_query");
while ($row = db_fetch_assoc($search_result)) {
debugLogVar('row',$row)
`
And provide the resulting debug output.
I've included the section that I changed in case it's the wrong place:
`
} else {
$search_query = $this->searchDate($searchstring, $searchdate, 'pages', NULL, NULL);
$search_result = query($search_query);
}
if ($search_result) {
debugLog("query:$search_query");
while ($row = db_fetch_assoc($search_result)) {
debugLogVar('row',$row)
if (isset($weights)) {
$data['weight'] = $weights[$row['id']];
}
$result[] = $data;
}
}
if (isset($weights)) {
$result = sortMultiArray($result, 'weight', true);
}
`
{Tue, 21 Aug 2012 14:49:07 GMT} Zenphoto v1.4.3.1[10673]
query:SELECT @serachtarget AS name, @serachfield AS field,
id
ASobjectid
FROMzp_pages
WHERE (title
LIKE '%plant%') ORDER BYid
{Tue, 21 Aug 2012 14:49:07 GMT}
rowarray(3) {
["name"]=>
string(5) "plant"
["field"]=>
string(5) "title"
["objectid"]=>
string(1) "3"
}
{Tue, 21 Aug 2012 14:49:07 GMT}
Backtrace: NOTICE: Undefined index: titlelink in C:\mysites\nif\galleries\zp-core\class-search.php on line 1591
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1553])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
{Tue, 21 Aug 2012 14:49:07 GMT}
Backtrace: NOTICE: Undefined index: id in C:\mysites\nif\galleries\zp-core\class-search.php on line 1593
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1553])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
{Tue, 21 Aug 2012 14:49:07 GMT}
Backtrace: NOTICE: Undefined index: in C:\mysites\nif\galleries\zp-core\class-search.php on line 1593
SearchEngine->getSearchPages called
from SearchEngine->getPages (class-search.php [1553])
from getNumPages (zenpage-template-functions.php [2360])
from include (search.php [29])
from index.php [92]
`