dokuwiki-template-bootstrap3
dokuwiki-template-bootstrap3 copied to clipboard
Error during Dokuwiki Upgrade
Description
Attempting to upgrade from "Release 2022-07-31a "Igor" to current (2023-04-04a "Jack Jackrum") throws an error - trace provided. Setting the system template to docuwiki instead of the bootstrap theme allows the upgrade to succeed with no error.
Steps to reproduce
- Update all extensions and templates
- Begin upgrade process using the DokuWiki Upgrade Plugin
Expected behavior: Successful wiki upgrade
Actual behavior: Error below
Versions
- [Bootstrap3 Template] Template v2022-07-27 (stable/20220727)
- [DokuWiki] "Release 2022-07-31a "Igor" to current (2023-04-04a "Jack Jackrum")
- [Plugins]
- [PHP] 8.1.18
- [Browser] Firefox 114.0
Screenshots or Logs
Error: Call to undefined method dokuwiki\Logger::isLogging()
/home/wikihome/public_html/inc/Debug/DebugHelper.php(26)
#0 /home/wikihome/public_html/inc/Debug/DebugHelper.php(45): dokuwiki\Debug\DebugHelper::isEnabled()
#1 /home/wikihome/public_html/inc/infoutils.php(461): dokuwiki\Debug\DebugHelper::dbgDeprecatedFunction('\\dokuwiki\\Exten...', 2)
#2 /home/wikihome/public_html/inc/deprecated.php(340): dbg_deprecated('\\dokuwiki\\Exten...')
#3 /home/wikihome/public_html/lib/tpl/bootstrap3/Template.php(2231): trigger_event('TPL_TOC_RENDER', Array, NULL, false)
#4 /home/wikihome/public_html/lib/tpl/bootstrap3/main.php(120): dokuwiki\template\bootstrap3\Template->getTOC(true)
#5 /home/wikihome/public_html/inc/actions.php(27): include('/home/fswiki/pu...')
#6 /home/wikihome/public_html/doku.php(126): act_dispatch()
#7 {main}
Sample page or snippet
[Paste your sample DokuWiki page or snippet using MarkDown code syntax]
Our sysadmin adds:
https://www.dokuwiki.org/changes#release_2022-07-31b_igor it looks like code changes in 31b
Refactored logging mechanism 3230, 3203 and logviewer
i suspect thats whats broken it
It seems that the DokuWiki upgrade did not complete correctly because some method is missing in the library used for logging.
I am not entirely convinced this is a problem with Dokuwiki itself, or there would be widespread complaints. The upgrade completes fine if we disable your template - any thoughts on that?
The template uses a DokuWiki function that is now deprecated (trigger_event
) but is used in older versions of DokuWiki. In this case, DokuWiki reports (in the log) that a deprecated function is being used and continues execution of the page. From the stack you attached the error is due to a missing dokuwiki\Logger::isLogging()
method.
https://xref.dokuwiki.org/reference/dokuwiki/nav.html?inc/Logger.php.html (line 154)
So what do you recommend at this point?
Note, this is treated as an error level event and execution stops.
You have dokuwiki\Logger->isLogging()
method in your DokuWiki instance (in DOKU_INC/Logger.php
file) ?
https://github.com/dokuwiki/dokuwiki/blob/509edb6901bb59e8f8eeffd003d34c6664b84d44/inc/Logger.php#L154
/**
* Is this logging instace actually logging?
*
* @return bool
*/
public function isLogging()
{
return $this->isLogging;
}
[yay@srv inc]# grep 'isLogging' Logger.php
protected $isLogging = true;
if (in_array($facility, $dontlog)) $this->isLogging = false;
if (!$this->isLogging) return false;
[yay@srv inc]# grep 'actually' Logger.php
[yay@srv inc]#
That public function is not present in that file but there is some mention of it if I grep for isLogging
Which makes sense because we're still on the original version:
https://github.com/dokuwiki/dokuwiki/blob/release-2022-07-31a/inc/Logger.php
It appears this is the Logger.php we have right now.
Any news here? We are still pending the Doluwiki upgrade as this issue is blocking.
Work-around, for any others affected:
- In Dokuwiki settings, set the template to Dokuwiki
- run the upgrader
- set the template back to Bootstrap3
- cross fingers'n'toes that there are no other errors
This pending an actual fix, of course.
See also https://github.com/giterlizzi/dokuwiki-template-bootstrap3/issues/597