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

Error during Dokuwiki Upgrade #596

Closed
Miro-Collas opened this issue Jun 1, 2023 · 11 comments
Closed

Error during Dokuwiki Upgrade #596

Miro-Collas opened this issue Jun 1, 2023 · 11 comments
Labels
Milestone

Comments

@Miro-Collas
Copy link

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

  1. Update all extensions and templates
  2. 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]

@Miro-Collas Miro-Collas added the bug label Jun 1, 2023
@Miro-Collas
Copy link
Author

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

@giterlizzi
Copy link
Owner

It seems that the DokuWiki upgrade did not complete correctly because some method is missing in the library used for logging.

@yaynstuff
Copy link

yaynstuff commented Jun 1, 2023

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?

@giterlizzi
Copy link
Owner

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)

@yaynstuff
Copy link

So what do you recommend at this point?

@yaynstuff
Copy link

Note, this is treated as an error level event and execution stops.
Screenshot_20230601_152550

@giterlizzi
Copy link
Owner

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;
    }

@yaynstuff
Copy link

[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

@yaynstuff
Copy link

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.

@Miro-Collas
Copy link
Author

Any news here? We are still pending the Doluwiki upgrade as this issue is blocking.

@Miro-Collas
Copy link
Author

Miro-Collas commented Aug 13, 2023

Work-around, for any others affected:

  1. In Dokuwiki settings, set the template to Dokuwiki
  2. run the upgrader
  3. set the template back to Bootstrap3
  4. cross fingers'n'toes that there are no other errors

This pending an actual fix, of course.

See also #597

@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
Labels
Projects
None yet
Development

No branches or pull requests

3 participants