WebsiteBaker Community Forum

WebsiteBaker Support (2.11.x) => General Help & Support => Topic started by: Gast on February 22, 2018, 03:38:01 PM

Title: $wb->preprocess() / notice in error-log
Post by: Gast on February 22, 2018, 03:38:01 PM
preprocess was also a old deprecated function to replace wblinks in the content with a "real" link and is since any years a empty function without a job - is only designed to catch possible errors. This function is empty since WB-Revision  1292 from 2010/02/19.

a typical call is this piece of code somewhere in the file (mostly: view.php or older droplets like shorturl, sectionpicker e.g.)
Code: [Select]
$wb->preprocess($content);
a typical error message:
if the problem is somewhere in a droplet-code, you have to know, what droplet you call in your index.php or in one of the on this frontend-page used modules
Quote
2018-02-21T13:31:36+00:00 [E_USER_DEPRECATED] /framework/class.frontend.php:[328] from /modules/droplets/droplets.php(34) : eval()'d code:[5] frontend->preprocess "invalid method call: frontend::preprocess"
the red marked code show's the line in the used droplet

the same message from a example addon:
Quote
2018-02-22T14:30:49+00:00 [E_USER_DEPRECATED] \framework\class.frontend.php:[328] from \modules\myaddon\view.php:[27] frontend->preprocess "invalid method call: frontend::preprocess""

the red marked text show's here the name of the addon, the name of the file and the line of this problem

Solution:
Simple remove this line with the preprocess-call or comment it out