Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings after upgrade to 2023-04-04a "Jack Jackrum" #597

Closed
FlyveHest opened this issue Jun 26, 2023 · 5 comments
Closed

Warnings after upgrade to 2023-04-04a "Jack Jackrum" #597

FlyveHest opened this issue Jun 26, 2023 · 5 comments

Comments

@FlyveHest
Copy link

Description

Lots of E_WARNINGS in log

Related to #596 (I got the same error during upgrade)

Looks like the template is using functionality that has been deprecated in DokuWiki.

Steps to reproduce

  1. Run DokuWiki 2023-04-04a "Jack Jackrum"
  2. Load a page
  3. Check log

Expected behavior:
Nothing out of the ordinary

Actual behavior:
Lots of these warnings in log

2023-06-26 08:51:28 E_WARNING: Undefined array key 1 .../inc/Debug/DebugHelper.php(89)
    #0 .../inc/Debug/DebugHelper.php(89): dokuwiki\ErrorHandler::errorHandler()
    #1 .../inc/Debug/PropertyDeprecationHelper.php(83): dokuwiki\Debug\DebugHelper::dbgDeprecatedProperty()
    #2 .../lib/tpl/bootstrap3/iconify.php(82): dokuwiki\Cache\Cache->__set()
    #3 {main}

2023-06-26 08:51:28 E_WARNING: Trying to access array offset on value of type null .../inc/Debug/DebugHelper.php(90)
    #0 .../inc/Debug/DebugHelper.php(90): dokuwiki\ErrorHandler::errorHandler()
    #1 .../inc/Debug/PropertyDeprecationHelper.php(83): dokuwiki\Debug\DebugHelper::dbgDeprecatedProperty()
    #2 .../lib/tpl/bootstrap3/iconify.php(82): dokuwiki\Cache\Cache->__set()
    #3 {main}

Versions

  • Bootstrap3 Template, latest version
  • 2023-04-04a "Jack Jackrum"
  • PHP8.1
@FlyveHest FlyveHest added the bug label Jun 26, 2023
@giterlizzi
Copy link
Owner

The Bootstrap3 template uses a legacy features for work in earlier versions of DokuWiki, but this error seems related to the helper debugging utility.

@ant5
Copy link

ant5 commented Jul 5, 2023

Also, all icons are disappeared.
This is related to iconify.php which response with:

Warning: Undefined array key 1 in /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php on line 52

Warning: Trying to access array offset on value of type null in /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php on line 66

Warning: Undefined array key 1 in /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php on line 89

Warning: Trying to access array offset on value of type null in /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php on line 90

Warning: Trying to access array offset on value of type null in /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php on line 90

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php:52) in /usr/local/www/dokuwiki/lib/tpl/bootstrap3/iconify.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php:52) in /usr/local/www/dokuwiki/inc/httputils.php on line 220

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php:52) in /usr/local/www/dokuwiki/inc/httputils.php on line 221

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php:52) in /usr/local/www/dokuwiki/inc/httputils.php on line 30

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/dokuwiki/inc/Debug/DebugHelper.php:52) in /usr/local/www/dokuwiki/inc/httputils.php on line 31

instead of image content.

@FlyveHest
Copy link
Author

Did a little digging, and while the entire template could probably use a once-over in regards to the big changes in DokuWiki, I found that doing the following removed the errors and warnings in my logs.

In tpl/bootstrap3/iconify.php (around line 81)

Change

$cache = new cache($cache_key, '.js');'

To

$cache = new dokuwiki\Cache\Cache($cache_key, '.js');

And change

$cache->_event = 'ICONIFY_CACHE';

to

$cache->setEvent('ICONIFY_CACHE');

In tpl/bootstrap3/Template.php:2231

Change

trigger_event('TPL_TOC_RENDER', $toc, null, false);

to

\dokuwiki\Extension\Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);

@anto54
Copy link

anto54 commented Jul 31, 2023

Did a little digging, and while the entire template could probably use a once-over in regards to the big changes in DokuWiki, I found that doing the following removed the errors and warnings in my logs.

In tpl/bootstrap3/iconify.php (around line 81)

Change

$cache = new cache($cache_key, '.js');'

To

$cache = new dokuwiki\Cache\Cache($cache_key, '.js');

And change

$cache->_event = 'ICONIFY_CACHE';

to

$cache->setEvent('ICONIFY_CACHE');

In tpl/bootstrap3/Template.php:2231

Change

trigger_event('TPL_TOC_RENDER', $toc, null, false);

to

\dokuwiki\Extension\Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);

Thank you !

@hruettimann
Copy link

Did a little digging, and while the entire template could probably use a once-over in regards to the big changes in DokuWiki, I found that doing the following removed the errors and warnings in my logs.

In tpl/bootstrap3/iconify.php (around line 81)

Change

$cache = new cache($cache_key, '.js');'

To

$cache = new dokuwiki\Cache\Cache($cache_key, '.js');

And change

$cache->_event = 'ICONIFY_CACHE';

to

$cache->setEvent('ICONIFY_CACHE');

In tpl/bootstrap3/Template.php:2231

Change

trigger_event('TPL_TOC_RENDER', $toc, null, false);

to

\dokuwiki\Extension\Event::createAndTrigger('TPL_TOC_RENDER', $toc, null, false);

Thank you! This helped. In addition to all of the changes above I had to add the following line to the iconify.php file, right after the PHP declaration at line 2.

use dokuwiki\Cache\Cache;

@giterlizzi giterlizzi added this to the v2024-Q1 milestone Feb 6, 2024
giterlizzi added a commit that referenced this issue Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants