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

After update from version 1.7.2 to 1.8.2 get error 500 #5056

Closed
arttu-uusikyyny opened this issue Apr 29, 2021 · 8 comments
Closed

After update from version 1.7.2 to 1.8.2 get error 500 #5056

arttu-uusikyyny opened this issue Apr 29, 2021 · 8 comments

Comments

@arttu-uusikyyny
Copy link

Get 2 errors after updating newest version

Error from dashboard

{
"url": "/dashboard/dashboard/stream",
"status": 500,
"response": "

Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Setting unknown property: humhub\modules\file\models\File::hash_sha1' \n\nin /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Component.php:210\n\nStack trace:\n#0 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(324): yii\base\Component->__set('hash_sha1', '1289b1fc1ac5e37...')\n#1 /home/un9c19iayq1o/public_html...",
"textStatus": "error",
"xhr": {
"readyState": 4,
"responseText": "
Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Setting unknown property: humhub\modules\file\models\File::hash_sha1' \n\nin /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Component.php:210\n\nStack trace:\n#0 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(324): yii\base\Component->__set('hash_sha1', '1289b1fc1ac5e37...')\n#1 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/models/File.php(166): yii\db\BaseActiveRecord->__set('hash_sha1', '1289b1fc1ac5e37...')\n#2 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/models/File.php(148): humhub\modules\file\models\File->saveHash()\n#3 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/models/File.php(134): humhub\modules\file\models\File->getHash(8)\n#4 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/converter/BaseConverter.php(93): humhub\modules\file\models\File->getUrl(Array)\n#5 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/converter/PreviewImage.php(71): humhub\modules\file\converter\BaseConverter->getUrl()\n#6 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/converter/PreviewImage.php(176): humhub\modules\file\converter\PreviewImage->render()\n#7 /home/un9c19iayq1o/public_html/intra/protected/modules/gallery/widgets/views/wallEntryMedia.php(21): humhub\modules\file\converter\PreviewImage->renderGalleryLink(Array)\n#8 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(348): require('/home/un9c19iay...')\n#9 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/home/un9c19iay...', Array)\n#10 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/home/un9c19iay...', Array, Object(humhub\modules\gallery\widgets\WallEntryMedia))\n#11 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Widget.php(237): yii\base\View->render('wallEntryMedia', Array, Object(humhub\modules\gallery\widgets\WallEntryMedia))\n#12 /home/un9c19iayq1o/public_html/intra/protected/modules/gallery/widgets/WallEntryMedia.php(63): yii\base\Widget->render('wallEntryMedia', Array)\n#13 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/content/widgets/stream/WallStreamEntryWidget.php(186): humhub\modules\gallery\widgets\WallEntryMedia->renderContent()\n#14 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/content/widgets/stream/StreamEntryWidget.php(131): humhub\modules\content\widgets\stream\WallStreamEntryWidget->renderBody()\n#15 /home/un9c19iayq1o/public_html/intra/protected/humhub/components/Widget.php(63): humhub\modules\content\widgets\stream\StreamEntryWidget->run()\n#16 [internal function]: humhub\components\Widget::widget(Array)\n#17 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/content/widgets/stream/StreamEntryWidget.php(91): call_user_func('humhub\\modules\\...', Array)\n#18 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/stream/actions/StreamEntryResponse.php(80): humhub\modules\content\widgets\stream\StreamEntryWidget::renderStreamEntry(Object(humhub\modules\gallery\models\Media), Object(humhub\modules\content\widgets\stream\WallStreamEntryOptions), Array)\n#19 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/stream/actions/Stream.php(415): humhub\modules\stream\actions\StreamEntryResponse::getAsArray(Object(humhub\modules\content\models\Content), Object(humhub\modules\content\widgets\stream\WallStreamEntryOptions))\n#20 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/stream/actions/Stream.php(370): humhub\modules\stream\actions\Stream->getStreamEntryResult(Object(humhub\modules\content\models\Content), Object(humhub\modules\content\widgets\stream\WallStreamEntryOptions))\n#21 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/stream/actions/Stream.php(349): humhub\modules\stream\actions\Stream->addResponseEntries(Array, Object(humhub\modules\stream\actions\StreamResponse))\n#22 [internal function]: humhub\modules\stream\actions\Stream->run()\n#23 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array)\n#24 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\Action->runWithParams(Array)\n#25 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('stream', Array)\n#26 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction('dashboard/dashb...', Array)\n#27 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest(Object(humhub\components\Request))\n#28 /home/un9c19iayq1o/public_html/intra/index.php(25): yii\base\Application->run()\n#29 {main}
",
"status": 500,
"statusText": "error"
},
"dataType": "html",
"html": "
Exception (Unknown Property) 'yii\base\UnknownPropertyException' with message 'Setting unknown property: humhub\modules\file\models\File::hash_sha1' \n\nin /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Component.php:210\n\nStack trace:\n#0 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(324): yii\base\Component->__set('hash_sha1', '1289b1fc1ac5e37...')\n#1 /home/un9c19iayq1o/public_html...",
"error": {},
"errorThrown": "",
"validationError": false
}

And error from spaces

yii\base\UnknownPropertyException: Setting unknown property: humhub\modules\file\models\File::hash_sha1 in /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Component.php:210
Stack trace:
#0 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/BaseActiveRecord.php(324): yii\base\Component->__set('hash_sha1', 'aa1d7406f48cd6e...')
#1 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/models/File.php(166): yii\db\BaseActiveRecord->__set('hash_sha1', 'aa1d7406f48cd6e...')
#2 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/models/File.php(148): humhub\modules\file\models\File->saveHash()
#3 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/models/File.php(134): humhub\modules\file\models\File->getHash(8)
#4 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/file/handler/DownloadFileHandler.php(48): humhub\modules\file\models\File->getUrl(Array, false)
#5 /home/un9c19iayq1o/public_html/intra/protected/modules/gallery/models/Media.php(128): humhub\modules\file\handler\DownloadFileHandler::getUrl(Object(humhub\modules\file\models\File), false)
#6 /home/un9c19iayq1o/public_html/intra/protected/modules/gallery/widgets/views/gallerySnippet.php(35): humhub\modules\gallery\models\Media->getFileUrl()
#7 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(348): require('/home/un9c19iay...')
#8 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/home/un9c19iay...', Array)
#9 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/home/un9c19iay...', Array, Object(humhub\modules\gallery\widgets\GallerySnippet))
#10 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Widget.php(237): yii\base\View->render('gallerySnippet', Array, Object(humhub\modules\gallery\widgets\GallerySnippet))
#11 /home/un9c19iayq1o/public_html/intra/protected/modules/gallery/widgets/GallerySnippet.php(62): yii\base\Widget->render('gallerySnippet', Array)
#12 /home/un9c19iayq1o/public_html/intra/protected/humhub/components/Widget.php(63): humhub\modules\gallery\widgets\GallerySnippet->run()
#13 /home/un9c19iayq1o/public_html/intra/protected/humhub/widgets/BaseStack.php(88): humhub\components\Widget::widget(Array)
#14 /home/un9c19iayq1o/public_html/intra/protected/humhub/components/Widget.php(63): humhub\widgets\BaseStack->run()
#15 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/space/views/space/home.php(46): humhub\components\Widget::widget(Array)
#16 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(348): require('/home/un9c19iay...')
#17 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/home/un9c19iay...', Array)
#18 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/View.php(156): yii\base\View->renderFile('/home/un9c19iay...', Array, Object(humhub\modules\space\controllers\SpaceController))
#19 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Controller.php(410): yii\base\View->render('home', Array, Object(humhub\modules\space\controllers\SpaceController))
#20 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/space/controllers/SpaceController.php(107): yii\base\Controller->render('home', Array)
#21 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/space/controllers/SpaceController.php(89): humhub\modules\space\controllers\SpaceController->actionHome()
#22 [internal function]: humhub\modules\space\controllers\SpaceController->actionIndex()
#23 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#24 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#25 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('', Array)
#26 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction('space/space', Array)
#27 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest(Object(humhub\components\Request))
#28 /home/un9c19iayq1o/public_html/intra/index.php(25): yii\base\Application->run()
#29 {main}

Q A
HumHub version 1.8.2
PHP version 7.4
Operating system

Note: Also provide the full error stacks from Administration --> Information --> Logging and errors from your browser console if possible.
Note: Please use the community site for any questions on customizing HumHub.

@luke-
Copy link
Contributor

luke- commented Apr 29, 2021

How did you perform the update? Did you encounter any errors during the update?

Please check the requirements at: Adminsitration -> Information and the database status under: Administration -> Information -> Database.

@arttu-uusikyyny
Copy link
Author

arttu-uusikyyny commented Apr 29, 2021

I updated it manually and then restore .htaccess /config /modules and /uploads then i runned php yii migrate/up --includeModuleMigrations=1 and php yii search/rebuild

Administration -> Information -> Database

    Yii Migration Tool (based on Yii v2.0.40)

Total 8 new migrations to be applied:
m201130_073907_default_permissions
m201130_073908_disable_legacy_richtextparser
m201217_071828_fix_oembed_setting
m201228_064513_default_group
m210111_105355_hash
m210203_122333_profilePermissions
m210204_054203_fix_settings_unique_index
m210310_103412_fix_hash

*** applying m201130_073907_default_permissions
> alter column contentcontainer_class in table contentcontainer_default_permission to char(60) NOT NULL ... done (time: 0.002s)
> add primary key contentcontainer_default_permission_pk on contentcontainer_default_permission (permission_id,group_id,module_id,contentcontainer_class) ...Exception: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
The SQL being executed was: ALTER TABLE contentcontainer_default_permission ADD CONSTRAINT contentcontainer_default_permission_pk PRIMARY KEY (permission_id, group_id, module_id, contentcontainer_class) (/home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/Schema.php:678)
#0 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/Command.php(1304): yii\db\Schema->convertException(Object(PDOException), 'ALTER TABLE co...') #1 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/Command.php(1099): yii\db\Command->internalExecute('ALTER TABLE co...')
#2 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/Migration.php(437): yii\db\Command->execute()
#3 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/content/migrations/m201130_073907_default_permissions.php(38): yii\db\Migration->addPrimaryKey('contentcontaine...', 'contentcontaine...', Array)
#4 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/db/Migration.php(114): m201130_073907_default_permissions->safeUp()
#5 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(744): yii\db\Migration->up()
#6 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(202): yii\console\controllers\BaseMigrateController->migrateUp('m201130_073907_...')
#7 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#8 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#10 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller->runAction('up', Array)
#11 /home/un9c19iayq1o/public_html/intra/protected/humhub/commands/MigrateController.php(184): yii\console\Controller->runAction('up')
#12 /home/un9c19iayq1o/public_html/intra/protected/humhub/modules/admin/controllers/InformationController.php(95): humhub\commands\MigrateController::webMigrateAll()
#13 [internal function]: humhub\modules\admin\controllers\InformationController->actionDatabase()
#14 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#15 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#16 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('database', Array)
#17 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction('admin/informati...', Array)
#18 /home/un9c19iayq1o/public_html/intra/protected/vendor/yiisoft/yii2/base/Application.php(392): yii\web\Application->handleRequest(Object(humhub\components\Request))
#19 /home/un9c19iayq1o/public_html/intra/index.php(25): yii\base\Application->run()
#20 {main}
*** failed to apply m201130_073907_default_permissions (time: 0.017s)

0 from 8 migrations were applied.

Migration failed. The rest of the migrations are canceled.

I think that my problems goes to same category of this error:

#4946

@luke-
Copy link
Contributor

luke- commented Apr 29, 2021

@arttu-uusikyyny Can you fix it with the information of the other issue?

@arttu-uusikyyny
Copy link
Author

arttu-uusikyyny commented Apr 30, 2021

I can’t figure out what i need to change. The problem seems to be in key length because maximum length is 1000 and i get error 1071 Is there workaround to generate below 1000 length?

@luke-
Copy link
Contributor

luke- commented May 1, 2021

@arttu-uusikyyny Can you please post a screenshot of Administration -> Infromation -> Prerequsites?

@arttu-uusikyyny
Copy link
Author

image

@luke-
Copy link
Contributor

luke- commented May 1, 2021

As you can see there are several problems here, for one the MySQL server version is too old, we recommend InnoDB table engines and there are different table collations.

@arttu-uusikyyny
Copy link
Author

Okey newer MySQL version is problematic because some bigger shared hosting providers provide only version 5.6.

benedetto referenced this issue in Uberspace/lab Jun 4, 2021
updated guide to match currently supported versions.
@luke- luke- closed this as completed Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants