News:

Wondering if this will always be free?  See why free is better.

Main Menu

Light Portal

Started by Bugo, March 25, 2020, 07:36:36 AM

Previous topic - Next topic

Darknico

Thanks @Bugo, updated with no problem ;)

QuoteNow, after updating, all plugins are automatically disabled so that administrators can manually update and re-enable the necessary ones.

Ok, I need to write the installed plugins because I will never remember them all xD
Italian SMF - Supporto Italiano per la board SMF - Ci trovate tutti li!! :)


Bugo

As a life hack: I just set the filter to "Active only" and took a screenshot before updating :)

Darknico

Hi @Bugo
I have problem after install the version: 2.9.4.
PHP: 8.3.8
MySQL: 5.7.28

White page and I see problem with Optimus RC2.

Uninstall all, uninstall Optimus and reinstall 2.9.4 and Optimus RC2
Now work but have a issue with not admin user:

QuoteFatal error: Uncaught Error: Call to undefined method Closure::get() in /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Enums/Permission.php:81 Stack trace: #0 /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Enums/Permission.php(69): Bugo\LightPortal\Enums\Permission::getBoardModerators() #1 /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Enums/Permission.php(56): Bugo\LightPortal\Enums\Permission::isModerator() #2 /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Articles/PageArticle.php(62): Bugo\LightPortal\Enums\Permission::all() #3 /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Actions/FrontPage.php(113): Bugo\LightPortal\Articles\PageArticle->init() #4 /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Actions/FrontPage.php(82): Bugo\LightPortal\Actions\FrontPage->prepare() #5 /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Hooks/DefaultAction.php(36): Bugo\LightPortal\Actions\FrontPage->show() #6 /home/mhd-01/www.site.ex/htdocs/forum/index.php(195): Bugo\LightPortal\Hooks\DefaultAction->__invoke() #7 {main} thrown in /home/mhd-01/www.site.ex/htdocs/forum/Sources/LightPortal/Enums/Permission.php on line 81

Only for me, I commented some parts of this method and I await your response :)

    private static function getBoardModerators(): array
    {
        $cache = app(CacheInterface::class);

        //if (($moderators = $cache->get('board_moderators')) === null) {
            $result = Db::$db->query('', /** @lang text */ '
                SELECT id_member
                FROM {db_prefix}moderators',
            );

            $items = Db::$db->fetch_all($result);

            Db::$db->free_result($result);

            $moderators = array_column($items, 'id_member');

            //$cache->put('board_moderators', $moderators);
        //}

        return $moderators;
    }

EDIT:

If I go in Optimus settings:

QuoteFatal error: Uncaught Error: Call to undefined method Bugo\Compat\User::mustHavePermission() in /home/mhd-01/www.site.ex/htdocs/forum/Sources/Optimus/Handlers/SettingHandler.php:101 Stack trace: #0 /home/mhd-01/www.site.ex/htdocs/forum/Sources/Admin.php(499): Bugo\Optimus\Handlers\SettingHandler->actions() #1 /home/mhd-01/www.site.ex/htdocs/forum/index.php(195): AdminMain() #2 {main} thrown in /home/mhd-01/www.site.ex/htdocs/forum/Sources/Optimus/Handlers/SettingHandler.php on line 101

Italian SMF - Supporto Italiano per la board SMF - Ci trovate tutti li!! :)


Bugo

Try to install Optimus 3.0 RC3

And add fix in Permission.php:

$cache = app(CacheInterface::class)();

Darknico

Ups! I don't see RC3 :)
Ok, after RC3 upgrade and code fix, work correctly, thanks!
Italian SMF - Supporto Italiano per la board SMF - Ci trovate tutti li!! :)


samozin

how to add posts in personal blog ?
i activated the blog plugin


cuongvttt

Hello Bugo,

I got this error while upgrading Light Portal from v2.7 to v2.9.4. Could you please help me out?

Fatal error: Uncaught TypeError: Bugo\LightPortal\Utils\Language::getNameFromLocale(): Argument #1 ($locale) must be of type string, null given, called in /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Plugins/LangHandler.php on line 32 and defined in /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Utils/Language.php:36 Stack trace: #0 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Plugins/LangHandler.php(32): Bugo\LightPortal\Utils\Language::getNameFromLocale() #1 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Plugins/PluginHandler.php(113): Bugo\LightPortal\Plugins\LangHandler->handle() #2 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Plugins/PluginHandler.php(97): Bugo\LightPortal\Plugins\PluginHandler->handlePlugin() #3 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Plugins/PluginHandler.php(48): Bugo\LightPortal\Plugins\PluginHandler->prepareListeners() #4 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/ServiceProvider.php(176): Bugo\LightPortal\Plugins\PluginHandler->__construct() #5 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Events/EventManagerFactory.php(32): Bugo\LightPortal\ServiceProvider->Bugo\LightPortal\{closure}() #6 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Events/HasEvents.php(9): Bugo\LightPortal\Events\EventManagerFactory->__invoke() #7 /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Hooks/LoadTheme.php(49): Bugo\LightPortal\Hooks\LoadTheme->events() #8 /www/wwwroot/vietnetwork.vn/Sources/Subs.php(5795): Bugo\LightPortal\Hooks\LoadTheme->__invoke() #9 /www/wwwroot/vietnetwork.vn/Sources/Load.php(2674): call_integration_hook() #10 /www/wwwroot/vietnetwork.vn/index.php(249): loadTheme() #11 /www/wwwroot/vietnetwork.vn/index.php(196): smf_main() #12 {main} thrown in /www/wwwroot/vietnetwork.vn/Sources/LightPortal/Utils/Language.php on line 36

Bugo

Uninstall Optimus, then update LightPortal, then install Optimus v3.0 RC3

Advertisement: