BookStackApp / BookStack

A platform to create documentation/wiki content built with PHP & Laravel
https://www.bookstackapp.com/
MIT License
15.17k stars 1.9k forks source link

Problems with the update #4650

Closed Michael071170 closed 10 months ago

Michael071170 commented 11 months ago

Attempted Debugging

Searched GitHub Issues

Describe the Scenario

During the update (git pull origin release) i get the following errors:

error: Your local changes to the following files would be overwritten by merge: app/Activity/Models/Comment.php lang/cs/activities.php lang/cs/common.php lang/cs/errors.php lang/cs/preferences.php lang/cs/settings.php lang/de_informal/entities.php lang/de_informal/notifications.php lang/de_informal/passwords.php lang/de_informal/preferences.php lang/et/activities.php lang/et/common.php lang/et/entities.php lang/et/errors.php lang/et/notifications.php lang/et/preferences.php lang/et/settings.php lang/fr/preferences.php lang/hr/activities.php lang/hr/common.php lang/hr/entities.php lang/hr/errors.php lang/hr/notifications.php lang/hr/preferences.php lang/hr/settings.php lang/nb/errors.php lang/nl/activities.php lang/nl/entities.php lang/nl/errors.php lang/nl/preferences.php lang/uk/activities.php public/dist/app.js readme.md resources/js/components/page-comments.js resources/js/wysiwyg/filters.js version Please commit your changes or stash them before you merge.

Because this a production system i need support to update to the new version.

Exact BookStack Version

v23.08.03

Log Content

No response

Hosting Environment

Ubuntu 22.04 PHP 8.1.2 Apache 2.4.52

ssddanbrown commented 11 months ago

Hi @Michael071170, Can you confirm the output of running these two commands in order, from your BookStack directory:

git config core.fileMode false
git status

Also, have you intentionally made any changes to core app files? (Attempted any changes or modifications?)

Michael071170 commented 11 months ago

Hi Dan,

here ist he output:

On branch release

Your branch is behind 'origin/release' by 135 commits, and can be fast-forwarded.

(use "git pull" to update your local branch)

Changes not staged for commit:

(use "git add ..." to update what will be committed)

(use "git restore ..." to discard changes in working directory)

    modified:   app/Activity/Models/Comment.php

    modified:   lang/cs/activities.php

    modified:   lang/cs/common.php

    modified:   lang/cs/errors.php

    modified:   lang/cs/preferences.php

    modified:   lang/cs/settings.php

    modified:   lang/de_informal/entities.php

    modified:   lang/de_informal/notifications.php

    modified:   lang/de_informal/passwords.php

    modified:   lang/de_informal/preferences.php

    modified:   lang/et/activities.php

    modified:   lang/et/common.php

    modified:   lang/et/entities.php

    modified:   lang/et/errors.php

    modified:   lang/et/notifications.php

    modified:   lang/et/preferences.php

    modified:   lang/et/settings.php

    modified:   lang/fr/preferences.php

    modified:   lang/hr/activities.php

    modified:   lang/hr/common.php

    modified:   lang/hr/entities.php

    modified:   lang/hr/errors.php

    modified:   lang/hr/notifications.php

    modified:   lang/hr/preferences.php

    modified:   lang/hr/settings.php

    modified:   lang/nb/errors.php

    modified:   lang/nl/activities.php

    modified:   lang/nl/entities.php

    modified:   lang/nl/errors.php

    modified:   lang/nl/preferences.php

    modified:   lang/uk/activities.php

    modified:   public/dist/app.js

    modified:   readme.md

    modified:   resources/js/components/page-comments.js

    modified:   resources/js/wysiwyg/filters.js

    modified:   version

Untracked files:

(use "git add ..." to include in what will be committed)

    .env.bak

no changes added to commit (use "git add" and/or "git commit -a")

Von: Dan Brown @.> Gesendet: Montag, 6. November 2023 03:41 An: BookStackApp/BookStack @.> Cc: Michael071170 @.>; Mention @.> Betreff: Re: [BookStackApp/BookStack] Problems with the update (Issue #4650)

Hi @Michael071170 https://github.com/Michael071170 , Can you confirm the output of running these two commands in order, from your BookStack directory:

git config core.fileMode false git status

Also, have you intentionally made any changes to core app files? (Attempted any changes or modifications?)

— Reply to this email directly, view it on GitHub https://github.com/BookStackApp/BookStack/issues/4650#issuecomment-1793997439 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFPIPKBHAI6XMBIP44W6ILYDBE2RAVCNFSM6AAAAAA66SNP5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTHE4TONBTHE . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ANFPIPOXLQZNB5AICHCCRTDYDBE2RA5CNFSM6AAAAAA66SNP5KWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTK5Y5H6.gif Message ID: @. @.> >

Michael071170 commented 11 months ago

Hi Dan,

i didn’t make any changes to core app files.

Von: Dan Brown @.> Gesendet: Montag, 6. November 2023 03:41 An: BookStackApp/BookStack @.> Cc: Michael071170 @.>; Mention @.> Betreff: Re: [BookStackApp/BookStack] Problems with the update (Issue #4650)

Hi @Michael071170 https://github.com/Michael071170 , Can you confirm the output of running these two commands in order, from your BookStack directory:

git config core.fileMode false git status

Also, have you intentionally made any changes to core app files? (Attempted any changes or modifications?)

— Reply to this email directly, view it on GitHub https://github.com/BookStackApp/BookStack/issues/4650#issuecomment-1793997439 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFPIPKBHAI6XMBIP44W6ILYDBE2RAVCNFSM6AAAAAA66SNP5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJTHE4TONBTHE . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ANFPIPOXLQZNB5AICHCCRTDYDBE2RA5CNFSM6AAAAAA66SNP5KWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTK5Y5H6.gif Message ID: @. @.> >

ssddanbrown commented 11 months ago

Okay. Right now things are in quite a messy state since an update has been attempted with changed files (might have just been permission changes).

Before anything, make sure you backup your whole BookStack directory to a different system. The following can be destructive.

Once you have a backup, you can try the following commands from your BookStack install directory. These will reset all files to their original state, and remove any unexpected files.

git reset --hard
git clean -f

After running those, running git status should not list any files. If it does, stop and report back the output here. Otherwise, you can re-attempt the upgrade commands, one at a time.

Michael071170 commented 11 months ago

Hi Dan,

it seemed to work. Bookstack shows now version 23.10.2.

Here ist part of he output oft he console.

564 files changed, 14200 insertions(+), 5498 deletions(-)

rename app/{Notifications/ConfirmEmail.php => Access/Notifications/ConfirmEmailNotification.php} (82%)

rename app/{Notifications/ResetPassword.php => Access/Notifications/ResetPasswordNotification.php} (81%)

create mode 100644 app/Access/Notifications/UserInviteNotification.php

rename app/{Notifications => App}/MailNotification.php (80%)

create mode 100644 app/App/PwaManifestBuilder.php

create mode 100644 app/Console/Commands/HandlesSingleUser.php

create mode 100644 app/Console/Commands/RefreshAvatarCommand.php

create mode 100644 app/Entities/Tools/MixedEntityRequestHelper.php

create mode 100644 app/Exceptions/ThemeException.php

create mode 100644 app/Http/HttpClientHistory.php

create mode 100644 app/Http/HttpRequestService.php

rename app/Http/Middleware/{PreventAuthenticatedResponseCaching.php => PreventResponseCaching.php} (59%)

delete mode 100644 app/Notifications/UserInvite.php

rename app/{Notifications/TestEmail.php => Settings/TestEmailNotification.php} (78%)

delete mode 100644 app/Translation/LanguageManager.php

create mode 100644 app/Translation/LocaleDefinition.php

create mode 100644 app/Translation/LocaleManager.php

delete mode 100644 app/Uploads/HttpFetcher.php

create mode 100644 app/Uploads/ImageResizer.php

create mode 100644 app/Uploads/ImageStorage.php

create mode 100644 app/Uploads/ImageStorageDisk.php

create mode 100644 app/Users/Controllers/UserAccountController.php

create mode 100644 app/Util/OutOfMemoryHandler.php

create mode 100644 app/Util/SvgIcon.php

create mode 100644 dev/docs/php-testing.md

create mode 100644 lang/fi/activities.php

create mode 100644 lang/fi/auth.php

create mode 100644 lang/fi/common.php

create mode 100644 lang/fi/components.php

create mode 100644 lang/fi/editor.php

create mode 100644 lang/fi/entities.php

create mode 100644 lang/fi/errors.php

create mode 100644 lang/fi/notifications.php

create mode 100644 lang/fi/pagination.php

create mode 100644 lang/fi/passwords.php

create mode 100644 lang/fi/preferences.php

create mode 100644 lang/fi/settings.php

create mode 100644 lang/fi/validation.php

create mode 100644 lang/nn/activities.php

create mode 100644 lang/nn/auth.php

create mode 100644 lang/nn/common.php

create mode 100644 lang/nn/components.php

create mode 100644 lang/nn/editor.php

create mode 100644 lang/nn/entities.php

create mode 100644 lang/nn/errors.php

create mode 100644 lang/nn/notifications.php

create mode 100644 lang/nn/pagination.php

create mode 100644 lang/nn/passwords.php

create mode 100644 lang/nn/preferences.php

create mode 100644 lang/nn/settings.php

create mode 100644 lang/nn/validation.php

create mode 100644 lang/sq/activities.php

create mode 100644 lang/sq/auth.php

create mode 100644 lang/sq/common.php

create mode 100644 lang/sq/components.php

create mode 100644 lang/sq/editor.php

create mode 100644 lang/sq/entities.php

create mode 100644 lang/sq/errors.php

create mode 100644 lang/sq/notifications.php

create mode 100644 lang/sq/pagination.php

create mode 100644 lang/sq/passwords.php

create mode 100644 lang/sq/preferences.php

create mode 100644 lang/sq/settings.php

create mode 100644 lang/sq/validation.php

delete mode 100644 public/dist/print-styles.css

create mode 100644 resources/icons/notifications.svg

create mode 100644 resources/icons/security.svg

rename resources/sass/{print-styles.scss => _print.scss} (85%)

delete mode 100644 resources/views/common/header.blade.php

rename resources/views/{common => layouts/parts}/custom-head.blade.php (100%)

rename resources/views/{common => layouts/parts}/custom-styles.blade.php (100%)

rename resources/views/{common => layouts/parts}/footer.blade.php (89%)

create mode 100644 resources/views/layouts/parts/header-links-start.blade.php

create mode 100644 resources/views/layouts/parts/header-links.blade.php

create mode 100644 resources/views/layouts/parts/header-logo.blade.php

create mode 100644 resources/views/layouts/parts/header-search.blade.php

create mode 100644 resources/views/layouts/parts/header-user-menu.blade.php

create mode 100644 resources/views/layouts/parts/header.blade.php

rename resources/views/{common => layouts/parts}/notifications.blade.php (100%)

rename resources/views/{common => layouts/parts}/skip-to-content.blade.php (100%)

create mode 100644 resources/views/users/account/auth.blade.php

create mode 100644 resources/views/users/account/delete.blade.php

create mode 100644 resources/views/users/account/layout.blade.php

create mode 100644 resources/views/users/account/notifications.blade.php

rename resources/views/users/{preferences => account}/parts/shortcut-control.blade.php (100%)

create mode 100644 resources/views/users/account/profile.blade.php

create mode 100644 resources/views/users/account/shortcuts.blade.php

delete mode 100644 resources/views/users/preferences/index.blade.php

delete mode 100644 resources/views/users/preferences/notifications.blade.php

delete mode 100644 resources/views/users/preferences/shortcuts.blade.php

create mode 100644 tests/Commands/RefreshAvatarCommandTest.php

create mode 100644 tests/PwaManifestTest.php

create mode 100644 tests/User/UserMyAccountTest.php

@.***:/var/www/bookstack$ composer install --no-dev

@php -r "!file_exists('bootstrap/cache/services.php') || @unlink('bootstrap/cache/services.php');"

Installing dependencies from lock file

Verifying lock file contents can be installed on current platform.

Package operations: 0 installs, 35 updates, 1 removal

Generating optimized autoload files

Illuminate\Foundation\ComposerScripts::postAutoloadDump

@php artisan package:discover --ansi

INFO Discovering packages.

barryvdh/laravel-dompdf ............................................... DONE

barryvdh/laravel-snappy ............................................... DONE

intervention/image .................................................... DONE

laravel/socialite ..................................................... DONE

laravel/tinker ........................................................ DONE

nesbot/carbon ......................................................... DONE

nunomaduro/termwind ................................................... DONE

socialiteproviders/manager ............................................ DONE

62 packages you are using are looking for funding.

Use the composer fund command to find out more!

@php artisan cache:clear

ERROR Failed to clear cache. Make sure you have the appropriate permissions.

@php artisan view:clear

INFO Compiled views cleared successfully.

@.***:/var/www/bookstack$ php artisan migrate

                       APPLICATION IN PRODUCTION.

Do you really wish to run this command? (yes/no) [no]

❯ yes

INFO Nothing to migrate.

@.***:/var/www/bookstack$ php artisan cache:clear

ERROR Failed to clear cache. Make sure you have the appropriate permissions.

@.***:/var/www/bookstack$ sudo php artisan cache:clear

[sudo] password for hla:

INFO Application cache cleared successfully.

@.***:/var/www/bookstack$ sudo php artisan config:clear

INFO Configuration cache cleared successfully.

@.***:/var/www/bookstack$ sudo php artisan view:clear

INFO Compiled views cleared successfully.

Von: Dan Brown @.> Gesendet: Mittwoch, 8. November 2023 01:48 An: BookStackApp/BookStack @.> Cc: Michael071170 @.>; Mention @.> Betreff: Re: [BookStackApp/BookStack] Problems with the update (Issue #4650)

Okay. Right now things are in quite a messy state since an update has been attempted with changed files (might have just been permission changes).

Before anything, make sure you backup your whole BookStack directory to a different system. The following can be destructive.

Once you have a backup, you can try the following commands from your BookStack install directory. These will reset all files to their original state, and remove any unexpected files.

git reset --hard git clean -f

After running those, running git status should not list any files. If it does, stop and report back the output here. Otherwise, you can re-attempt the upgrade commands, one at a time.

— Reply to this email directly, view it on GitHub https://github.com/BookStackApp/BookStack/issues/4650#issuecomment-1800802788 , or unsubscribe https://github.com/notifications/unsubscribe-auth/ANFPIPPUZIYMGNZ7UMP55HLYDLJEFAVCNFSM6AAAAAA66SNP5KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBQHAYDENZYHA . You are receiving this because you were mentioned. https://github.com/notifications/beacon/ANFPIPO7CWATG2Z66IU7LCTYDLJEFA5CNFSM6AAAAAA66SNP5KWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTLKYI6I.gif Message ID: @. @.> >

ssddanbrown commented 10 months ago

Good to hear that appeared to work! Will therefore close this off.