• Resolved jerrystewart99

    (@jerrystewart99)


    Hi,
    Thanks for the plugin which I find very useful.
    I notice that the plugin seems to be causing a lot of errors to appear in the debug.log file which is making it very difficult to debug my own code and is making the debug.log file rather large.

    The errors are always identical and are here:

    [16-Apr-2022 01:52:58 UTC]  .../builder/class-et-builder-element.php:851  ET_Builder_Element::__construct():
    You're Doing It Wrong! Module setting definition for before_icon has a deprecated value: 'et_pb_get_font_icon_list' for parameter 'renderer'. Use 'select_icon' instead.

    Do you have any ideas or a fix for this?

    Thanks. Jerry

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jerrystewart99

    (@jerrystewart99)

    update: I’ve done a bit of digging and I believe I have a fix which may be useful to others.

    file: wp-content\plugins\breadcrumbs-divi-module\includes\modules\DiviBreadcrumbs\DiviBreadcrumbs.php

    Be careful of the exact filename and path because there are 2 files with the same name in different paths.

    line 43 AND line 62: replace
    'renderer' => 'et_pb_get_font_icon_list',
    with
    'renderer' => 'select_icon',

    The module appears to work fine and the icon selectors in the Divi builder still appear to work.. and YAY, no more deprecation errors in my log file.

    caveat emptor:
    – Please note that I haven’t done a full QA process on this fix.
    – If you modify code then your changes will be overwritten if the plugin is updated

    Hi Jerry,

    Thanks for this, I was seeing the exact same error. It seems to have fixed it. Using PHP8, WP5.9.3 with Divi 4.17.3. I think I indirectly caused this by switching to PHP8 from 7.4!

    I’m now seeing this one, are you getting it also?

    [07-May-2022 00:07:04 UTC] PHP Deprecated:  Required parameter $render_slug follows optional parameter $content in /home/xxxxxx.com/public_html/wp-content/plugins/breadcrumbs-divi-module/includes/modules/DiviBreadcrumbs/DiviBreadcrumbs.php on line 109
    

    Many thanks!

    Okay, figured this one out. It looks like the Plugin isn’t yet compatible with the changes in PHP8 and 8.1.

    In line 109 of the same file that Jerry mentioned above (again be careful to use the correct one):

    wp-content\plugins\breadcrumbs-divi-module\includes\modules\DiviBreadcrumbs\DiviBreadcrumbs.php

    Find line 109 change it from:

    public function render( $attrs, $content = null, $render_slug ) {

    change it to read:

    public function render( $attrs, $content, $render_slug ) {

    (It will of course be overwritten with the next plugin update, but hopefully the update will include a permanent fix.)

    The issue as I understand it is that the $content string is optional with a value of null which is okay but it comes before the $render_slug which is a required value.

    If you just swapped them around so that the required string comes first, I think it would break because the constructor isn’t configured in that order. So removing the =null fixes it.

    He hopes!

    Plugin Author learnhowwp.com

    (@themeythemes)

    @jerrystewart99 this has been fixed in the new update.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Errors in debug.log file’ is closed to new replies.