ComboStrap / combo

Dokuwiki Combo Plugin. Making Web Publication a Breeze
https://combostrap.com
GNU General Public License v2.0
15 stars 3 forks source link

undefined function mb_substr() in DokuPath.php #23

Closed tschuettenberg closed 2 years ago

tschuettenberg commented 2 years ago

Hi, there is an issue in DokuPath.php resulting in a blank page and unusable dokuwiki.

Did a fresh install of 2020-07-29 "Hogfather" with PHP 7.4.3 and following https://combostrap.com/docs/how-to-configure-and-get-started-with-a-combostrap-website-m3i8vga8

From my log:

[Sat Jan 29 15:27:04.904342 2022] [php7:error] [pid 68063] [client 127.0.0.1:58960] PHP Fatal error:  Uncaught Error: Call to undefined function mb_substr() in /var/www/html/dokuwiki/lib/plugins/combo/ComboStrap/DokuPath.php:167
Stack trace:
  /var/www/html/dokuwiki/lib/plugins/combo/ComboStrap/DokuPath.php(226): ComboStrap\\DokuPath->__construct()
  /var/www/html/dokuwiki/lib/plugins/combo/ComboStrap/Page.php(247): ComboStrap\\DokuPath::createPagePathFromPath()
  /var/www/html/dokuwiki/lib/plugins/combo/ComboStrap/Page.php(271): ComboStrap\\Page->__construct()
  /var/www/html/dokuwiki/lib/plugins/combo/action/metalang.php(41): ComboStrap\\Page::createPageFromId()
  /var/www/html/dokuwiki/inc/Extension/EventHandler.php(81): action_plugin_combo_metalang->load_lang()
  /var/www/html/dokuwiki/inc/Extension/Event.php(72): dokuwiki\\Extension\\EventHandler->process_event()
  /var/www/html/dokuwiki/inc/Extension/Event.php(128): dokuwiki\\Extension\\Event->advise_before()
  /var/www/html/dokuwiki/inc/Extension/Event.php(195): dokuwiki\\Extension\\Event->trigger()
  /var/www/html/dokuwiki/inc/init.php(224): dokuwiki\\E in /var/www/html/dokuwiki/lib/plugins/combo/ComboStrap/DokuPath.php on line 167, referer: http://localhost/doku.php?id=start&do=admin&page=extension
gerardnico commented 2 years ago

This is because your installation does not have the mbstring extension loaded. This is mandatory for any international application (dokuwiki included)

In your php.ini, you should have at minimum this extension.

[PHP]
; for image
extension=gd2
extension=fileinfo
extension=mbstring
extension=pdo_sqlite
extension=openssl
; for locale
extension=intl
tschuettenberg commented 2 years ago

Oh yes, that's the issue. Thanks for pointing me at it!

BTW, your ComboStrap is awesome, the Docs in particular, all the best!

gerardnico commented 2 years ago

Thanks. We can always improved.

I have just updated the installation server requirment to show up the extension page prominently.