Skip to content

[v1.19] Update for HumHub 1.19 - #320

Open
yurabakhtin wants to merge 35 commits into
masterfrom
develop
Open

[v1.19] Update for HumHub 1.19#320
yurabakhtin wants to merge 35 commits into
masterfrom
develop

Conversation

@yurabakhtin

Copy link
Copy Markdown
Contributor

@yurabakhtin
yurabakhtin requested a review from luke- May 25, 2026 07:14
@ArchBlood

Copy link
Copy Markdown

@yurabakhtin this isn't ready for v1.19

Issue 1

TypeError: array_merge(): Argument #2 must be of type array, true given in /home/USER/SITE/protected/vendor/yiisoft/yii2-bootstrap5/src/Modal.php:310 Stack trace: #0 /home/USER/SITE/protected/vendor/yiisoft/yii2-bootstrap5/src/Modal.php(310): array_merge() #1 /home/USER/SITE/protected/humhub/widgets/modal/Modal.php(123): yii\bootstrap5\Modal->initOptions() #2 /home/USER/SITE/protected/humhub/widgets/modal/Modal.php(161): humhub\widgets\modal\Modal->initOptions() #3 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/BaseObject.php(109): humhub\widgets\modal\Modal->init() #4 /home/USER/SITE/protected/humhub/widgets/modal/Modal.php(204): yii\base\BaseObject->__construct() #5 /home/USER/SITE/protected/modules/tasks/views/task/modal.php(19): humhub\widgets\modal\Modal::beginDialog() #6 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(345): require('/home/USER/...') #7 [internal function]: yii\base\View->yii\base\{closure}() #8 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(350): call_user_func_array() #9 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile() #10 /home/USER/SITE/protected/humhub/components/View.php(242): yii\base\View->renderFile() #11 /home/USER/SITE/protected/vendor/yiisoft/yii2/web/Controller.php(63): humhub\components\View->renderAjax() #12 /home/USER/SITE/protected/modules/tasks/controllers/TaskController.php(199): yii\web\Controller->renderAjax() #13 [internal function]: humhub\modules\tasks\controllers\TaskController->actionModal() #14 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/InlineAction.php(60): call_user_func_array() #15 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/Controller.php(182): yii\base\InlineAction->runWithParams() #16 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/Module.php(547): yii\base\Controller->runAction() #17 /home/USER/SITE/protected/vendor/yiisoft/yii2/web/Application.php(105): yii\base\Module->runAction() #18 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/Application.php(382): yii\web\Application->handleRequest() #19 /home/USER/SITE/protected/humhub/services/BootstrapService.php(76): yii\base\Application->run() #20 /home/USER/SITE/index.php(26): humhub\services\BootstrapService->runWeb() #21 {main}

<?php Modal::beginDialog([
'size' => Modal::SIZE_LARGE,
'closable' => true,
'closeButton' => true,
'footer' =>
ModalButton::cancel(Yii::t('TasksModule.base', 'Close')) .
($canManageEntries ? ModalButton::primary(Yii::t('TasksModule.base', 'Edit'))->load($editUrl)->loader(true) : ''),
]); ?>

Fix: Remove 'closeButton' => true, as we already have 'closable' => true,

Issue 2

Error: Call to undefined method humhub\modules\stream\actions\Stream::renderEntry() in /home/USER/SITE/protected/modules/tasks/views/task/modal_entry.php:19 Stack trace: #0 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(345): require() #1 [internal function]: yii\base\View->yii\base\{closure}() #2 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(350): call_user_func_array() #3 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile() #4 /home/USER/SITE/protected/humhub/components/View.php(242): yii\base\View->renderFile() #5 /home/USER/SITE/protected/modules/tasks/views/task/modal.php(26): humhub\components\View->renderAjax() #6 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(345): require('/home/USER/...') #7 [internal function]: yii\base\View->yii\base\{closure}() #8 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(350): call_user_func_array() #9 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile() #10 /home/USER/SITE/protected/humhub/components/View.php(242): yii\base\View->renderFile() #11 /home/USER/SITE/protected/vendor/yiisoft/yii2/web/Controller.php(63): humhub\components\View->renderAjax() #12 /home/USER/SITE/protected/modules/tasks/controllers/TaskController.php(199): yii\web\Controller->renderAjax() #13 [internal function]: humhub\modules\tasks\controllers\TaskController->actionModal() #14 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/InlineAction.php(60): call_user_func_array() #15 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/Controller.php(182): yii\base\InlineAction->runWithParams() #16 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/Module.php(547): yii\base\Controller->runAction() #17 /home/USER/SITE/protected/vendor/yiisoft/yii2/web/Application.php(105): yii\base\Module->runAction() #18 /home/USER/SITE/protected/vendor/yiisoft/yii2/base/Application.php(382): yii\web\Application->handleRequest() #19 /home/USER/SITE/protected/humhub/services/BootstrapService.php(76): yii\base\Application->run() #20 /home/USER/SITE/index.php(26): humhub\services\BootstrapService->runWeb() #21 {main}

https://github.com/humhub/tasks/blob/master/views/task/modal_entry.php
Fix: Something like the following;

<?php

/**
 * @link https://www.humhub.org/
 * @copyright Copyright (c) 2018 HumHub GmbH & Co. KG
 * @license https://www.humhub.com/licences
 */

use humhub\modules\content\widgets\stream\StreamEntryOptions;
use humhub\modules\stream\actions\StreamEntryResponse;
use humhub\modules\stream\assets\StreamAsset;

/* @var $this \humhub\components\View */
/* @var $task \humhub\modules\tasks\models\Task */
/* @var $collapse boolean */

StreamAsset::register($this);

$options = new StreamEntryOptions([
    'viewContext' => StreamEntryOptions::VIEW_CONTEXT_MODAL,
]);

$entry = StreamEntryResponse::getAsArray($task->content, $options);

?>

<div data-action-component="stream.SimpleStream">
    <?= $entry['output'] ?? '' ?>
</div>

@yurabakhtin

yurabakhtin commented Aug 21, 2026

Copy link
Copy Markdown
Contributor Author

this isn't ready for v1.19

@ArchBlood Thanks, fixed e886c10.

Update: Same fix for the Meeting module - https://github.com/humhub/meeting/pull/66/changes/d85c2fa0b1e20646ba783aced93756663aa10ede.

In both cases the modal view from Full Calendar didn't work before, i.e. the code was not called at all, after these fixes I set viewMode => FullCalendarEventIF::VIEW_MODE_MODAL so on click in Full Calendar page the modal window is opened with the rendered Task/Meeting entry content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants