Author Topic: Search function does not work in WB-Version 2.12.1  (Read 325 times)

Offline henri

  • Posts: 134
Search function does not work in WB-Version 2.12.1
« on: January 11, 2019, 10:54:42 PM »
WebsiteBaker Version: 2.12.1 -r188
PHP-Version: 7.2.13

If I type in a search query at Website Default Template v1.0.9, a blank page will appear.
The same happens with other templates with a search function.

In wb admin in search settings are the settings.
visibility: everyone
template: default settings
if I want to select a different template then there is only one template that I can select. And that is template Web site baker Default Template v1.0.9 there is nothing else.

Offline jacobi22

  • Posts: 5836
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Search function does not work in WB-Version 2.12.1
« Reply #1 on: January 12, 2019, 12:11:03 AM »
Quote
If I type in a search query at Website Default Template v1.0.9, a blank page will appear.
The same happens with other templates with a search function.

it works for me,  you must have content stored in the database and not (for example in wysiwyg) the return from a droplet. other modules needs a special search.php in this module folder, to bring results from this module (for example: foldergallery etc). not every module is prepared for the search


Quote
if I want to select a different template then there is only one template that I can select. And that is template Web site baker Default Template v1.0.9 there is nothing else.

the selectbox in wb-options -> Search -> Template show's the installed and registered frontend templates, doesn't matter, if you use this templates in the project or not (means: its not required, to use one of the installed templates on a single page)
please go to  addons -> advanced -> select templates and click on the reload button
then try again to select  a template in wb-options -> Search -> Template

more details about this:
in the most older templates the definition of $template_function is missing
Code: [Select]
$template_function      = 'template';and because of this, the script in wb-settings to read the template list, doesn't found all installed templates. if you reload the templates, the script add this field in the database automatically

or take a look at first into the database table "addons". sort this table by type and look there to type = templates. now check for every row the content in the field "function" - maybe, its empty
now, you can reload the templates like my description

check also the info.php of the installed templates for the definition of $module_function.
(see example in DefaultTemplate/info.php)
« Last Edit: January 12, 2019, 12:17:46 AM by jacobi22 »
Probleme sind da, um sie zu lösen, nicht, um nach Ausreden zu suchen.

Offline henri

  • Posts: 134
Re: Search function does not work in WB-Version 2.12.1
« Reply #2 on: January 12, 2019, 08:53:30 AM »
Hi jacobi22,

I added in template Aeromsting in info.php $ template_function = 'template';
I go to addons -> advanced -> select templates and click on the reload button.
I have several modules with text in them such as topics, faq, Download Gallery etc.

Everything remains the same as in my previous message.

Offline dbs

  • Betatester
  • **
  • Posts: 7903
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Search function does not work in WB-Version 2.12.1
« Reply #3 on: January 12, 2019, 10:26:36 AM »
Hi, in your WB root is a folder "search" and 5 files beginning with search inside?
The X button in top menu shows errors?
« Last Edit: January 12, 2019, 10:38:01 AM by dbs »

Offline jacobi22

  • Posts: 5836
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Search function does not work in WB-Version 2.12.1
« Reply #4 on: January 12, 2019, 11:11:35 AM »
we need some more details...........

but step by step
additional to my last post in the top: the missing $template_function -parameter in info.php of the template set also a error message in the error.log, if error reporting is set to Production or Development
Example for this Message:
Quote
Sat, 12 Jan 2019 09:54:43 +0000 [E_USER_NOTICE] \admin\templates\install.php:[168] from \admin\templates\install.php:[168] trigger_error "Missing Template-Parameter [$template_function] in aeromsting/info.php!"

but a missing Parameter $template_function has nothing to do with the search, only with the Template-Selectbox in WB-settings.

if you start a search, the system looks to the installed modules and call there every!! search.php. If one of them has an error, the script stop's with a empty page like this screenshot here



if i now switch off my error reporting, i get no information about a problem and i hope, thats, what you mean in the first posting with
Quote
a blank page will appear.

P.S.: the error from the screenshot was not logged in my wb-intern error.log, only in the server errror-log
Probleme sind da, um sie zu lösen, nicht, um nach Ausreden zu suchen.

Offline henri

  • Posts: 134
Re: Search function does not work in WB-Version 2.12.1
« Reply #5 on: January 12, 2019, 12:03:43 PM »
Hi jacobi22,

I have enabled PHP error level: Production in admin. This is off by default.

Page of template Aeromsting I have refreshed in browser and in wb error log the following error message is displayed:

"created: [Sat, 12 Jan 2019 10:50:09 +0000]
Sat, 12 Jan 2019 10:50:24 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess"
Sat, 12 Jan 2019 10:50:25 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess""

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4344
  • Gender: Male
    • Webdesign und Entwicklung WebsiteBaker
Re: Search function does not work in WB-Version 2.12.1
« Reply #6 on: January 12, 2019, 12:07:09 PM »
Kommentiere im entsprechenden Droplet die Zeile 34  mit frontend->preprocess aus, dann ist der errorlog Entrag Geschichte

In the corresponding droplet, comment out the line 34 with frontend->preprocess, then the errorlog stay clean.

Dietmar
Immer nur von der Zukunft reden, die Gegenwart vergessen und auf die Vergangenheit schimpfen
Neues Unwort: Schnappatmung

Offline henri

  • Posts: 134
Re: Search function does not work in WB-Version 2.12.1
« Reply #7 on: January 12, 2019, 12:23:03 PM »
Hi jacobi22 and Dietmar,

I have renewed page of template Aeromsting in browser.
Typed in search window and press enter.
Get blank page.
In wb error log there was an error message about module download gallery 3
Have removed module download gallery 3.
Now the search function works in template Aeromsting.

But now there is wb error log:

"created: [Sat, 12 Jan 2019 11:04:32 +0000]
Sat, 12 Jan 2019 11:04:50 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[73] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated"
Sat, 12 Jan 2019 11:04:50 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[74] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated"
Sat, 12 Jan 2019 11:04:50 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess"
Sat, 12 Jan 2019 11:04:51 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess""

Still can not select another template for search



Offline jacobi22

  • Posts: 5836
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Search function does not work in WB-Version 2.12.1
« Reply #8 on: January 12, 2019, 12:54:15 PM »
is it possible, to post the file "search.php"  (or the complete module) "imagegallery" here as ZIP-File - otherwhise pls send me a email with this

to the other messages with the preprocess . see posting from dietmar
to found the correct droplet without a lot of work, go to the frontend, open the start page, then check the WB-error.log (X-Button in WB-Backend), delete here all errors, reload the frontend and check the error again? Do you have now the error with preprocess?
check at first your Template - index.php - do you use there a Droplet (for example [[shorturl]]) ?
If YES, check all used Droplet in this index.php - do you found there a line with preprocess
here an example from the Short-url-Droplet (all versions)
Code: [Select]
$wb->preprocess( $wb_page_data);  Delete the line(s) like this or deactivate it with a double slash in the front of this line



If you dont have a droplet call in your index.php from the frontend template, check the section on the first page. is there a Droplet call? maybe inside of a wysiwyg-section?

check after every step the error.log and delete possible other messages. maybe, it needs a while, but if you go step by step, you found it  ;-)

Alternative solution: give me access as WB-Super-admin and for FTP and i fix the problem
Probleme sind da, um sie zu lösen, nicht, um nach Ausreden zu suchen.

Offline henri

  • Posts: 134
Re: Search function does not work in WB-Version 2.12.1
« Reply #9 on: January 12, 2019, 01:03:00 PM »
Hi jacobi22 and Dietmar,

Another image gallery gives an error message as shown in my previous message.
In Modify Page I have set Search function to Off.
After typing search in Aeromsting I get only the following error message in wb error log:

"created: [Sat, 12 Jan 2019 11:45:46 +0000]
Sat, 12 Jan 2019 11:45:59 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess"
Sat, 12 Jan 2019 11:46:00 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess""

Still can not select another template for search

Offline henri

  • Posts: 134
Re: Search function does not work in WB-Version 2.12.1
« Reply #10 on: January 12, 2019, 01:14:51 PM »
Hi jacobi22 and Dietmar,

I also installed modules Colorbox, Miniallery, Foldergallery and Responsive Gallery (rFG). In Modify Page, the search function for these modules is turned on

No error message concerns these modules in wb error log.

Offline jacobi22

  • Posts: 5836
  • Gender: Male
  • Support also via PM or EMail
    • Jacobi22
Re: Search function does not work in WB-Version 2.12.1
« Reply #11 on: January 12, 2019, 02:17:15 PM »
for the image gallery

use the latest version of the module from here -> https://addon.WebsiteBaker.org/pages/en/browse-add-ons.php?id=087522B

if there come's a problem in the module install (Module is already installed), unzip the package directly to the folder modules/imagegallery and overwrite everything!!  (important)
maybe, it's needed to reload the addons in Addons-> Advanced
that solve the problem in the search and the error is gone

colorbox is not a module with a own search.php, the same for minigallery
Foldergallery has (normalize) also no search.php - but maybe one of the older versions use there a search. I use for the FG also a picture search and maybe, there was sometime a post with a search.php for this here

rFG - i dont know - i've never use this module, make's no sense for me, if i have a modern foldergallery
but to try your search, rename the file search.php to something else (likesearch_test.php etc) in rFG, so it make's no trouble
the script start only file with exact this name "search.php" - no others

follw all the step's from our last posting's, then try again and report

After this steps:

it's important to know: do you have a blank page or a page with no search results?
a blank page is in the most cases really blank, no content, maybe, the script show something like a background or parts from the page structure, but not everything, if you see your footer in the correct view, the page is loaded completly

a page with no search results show's a message like this here in the screenshot

Probleme sind da, um sie zu lösen, nicht, um nach Ausreden zu suchen.

Offline henri

  • Posts: 134
Re: Search function does not work in WB-Version 2.12.1
« Reply #12 on: January 12, 2019, 03:08:47 PM »
Hi jacobi22,

Removed in admin module Another image gallery v2.3
Installed module Another image gallery 2.4

Reload modules and templates.
Error log emptied.

Type your search in Website Baker Default Template v1.0.9
Search results are well shown in website

Error message in wb error log:

"created: [Sat, 12 Jan 2019 13:30:17 +0000]
Sat, 12 Jan 2019 13:30:47 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[73] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated"
Sat, 12 Jan 2019 13:30:47 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[74] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated""


"created: [Sat, 12 Jan 2019 13:42:04 +0000]
Sat, 12 Jan 2019 13:42:42 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[73] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated"
Sat, 12 Jan 2019 13:42:42 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[74] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated""

-------------------------------------------------

Hi jacobi22,

Aeromsting set as default template.
Reload modules and templates.
Error log empty.

Type in Aeromsting
Search results are well shown in website

Error message in wb error log:

"created: [Sat, 12 Jan 2019 13:47:03 +0000]
Sat, 12 Jan 2019 13:47:22 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[73] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated"
Sat, 12 Jan 2019 13:47:22 +0000 [E_DEPRECATED] /modules/imagegallery/search.php:[74] from /framework/frontend.functions.php:[240] require "Function create_function() is deprecated"
Sat, 12 Jan 2019 13:47:22 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess"
Sat, 12 Jan 2019 13:47:23 +0000 [E_USER_DEPRECATED] /framework/class.frontend.php:[335] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess""


Still can not select another template for search results

 

postern-length