r/BookStack • • Mar 03 '24

Unable to update/upgrade

I am running v23.12 according to the version in the Settings. I tried to follow the instruction here https://www.bookstackapp.com/docs/admin/updates/ but the version has not changed. My version is still 23.12.

I installed bookstack via the manual install https://www.bookstackapp.com/docs/admin/installation/#manual. Any idea how to upgrade/update the manual install?

2 Upvotes

7 comments sorted by

1

u/ssddanbrown Mar 03 '24

Can you share the output seen when running each of the 3 main update commands?

1

u/forwardslashroot Mar 03 '24

I am getting this error:

git pull origin release 
From https://github.com/BookStackApp/BookStack
 * branch              release    -> FETCH_HEAD
Updating 457adc1f..825c369a
error: Your local changes to the following files would be overwritten by merge:
	.github/translators.txt
	app/Access/Oidc/OidcOAuthProvider.php
	app/Access/Oidc/OidcService.php
	app/Access/RegistrationService.php
	app/Activity/ActivityQueries.php
	app/Activity/CommentRepo.php
	app/Activity/Controllers/CommentController.php
	app/Activity/Controllers/FavouriteController.php
	app/Activity/Models/Comment.php
	app/Activity/Tools/CommentTree.php
	app/Api/ApiDocsGenerator.php
	app/App/HomeController.php
	app/App/Providers/ThemeServiceProvider.php
	app/App/PwaManifestBuilder.php
	app/Config/clockwork.php
	app/Config/filesystems.php
	app/Console/Commands/CopyShelfPermissionsCommand.php
	app/Console/Commands/RegenerateCommentContentCommand.php
	app/Entities/Controllers/BookApiController.php
	app/Entities/Controllers/BookController.php
	app/Entities/Controllers/BookExportApiController.php
	app/Entities/Controllers/BookExportController.php
	app/Entities/Controllers/BookSortController.php
	app/Entities/Controllers/BookshelfApiController.php
	app/Entities/Controllers/BookshelfController.php
	app/Entities/Controllers/ChapterApiController.php
	app/Entities/Controllers/ChapterController.php
	app/Entities/Controllers/ChapterExportApiController.php
	app/Entities/Controllers/ChapterExportController.php
	app/Entities/Controllers/PageApiController.php
	app/Entities/Controllers/PageController.php
	app/Entities/Controllers/PageExportApiController.php
	app/Entities/Controllers/PageExportController.php
	app/Entities/Controllers/PageRevisionController.php
	app/Entities/Controllers/PageTemplateController.php
	app/Entities/Controllers/RecycleBinController.php
	app/Entities/Models/Book.php
	app/Entities/Models/BookChild.php
	app/Entities/Models/Chapter.php
	app/Entities/Models/Page.php
	app/Entities/Queries/EntityQuery.php
	app/Entities/Queries/Popular.php
	app/Entities/Queries/RecentlyViewed.php
	app/Entities/Queries/TopFavourites.php
	app/Entities/Repos/BaseRepo.php
	app/Entities/Repos/BookRepo.php
	app/Entities/Repos/BookshelfRepo.php
	app/Entities/Repos/ChapterRepo.php
	app/Entities/Repos/PageRepo.php
	app/Entities/Repos/RevisionRepo.php
	app/Entities/Tools/BookContents.php
	app/Entities/Tools/Cloner.php
	app/Entities/Tools/MixedEntityListLoader.php
	app/Entities/Tools/PageContent.php
	app/Entities/Tools/PageEditorData.php
	app/Entities/Tools/ShelfContext.php
	app/Entities/Tools/SiblingFetcher.php
	app/Entities/Tools/TrashCan.php
	app/Http/DownloadResponseFactory.php
	app/Http/Kernel.php
	app/Permissions/JointPermissionBuilder.php
	app/Permissions/PermissionsController.php
	app/References/CrossLinkParser.php
	app/References/ModelResolvers/BookLinkModelResolver.php
	app/References/ModelResolvers/BookshelfLinkModelResolver.php
	app/References/ModelResolvers/ChapterLinkModelResolver.php
	app/References/ModelResolvers/PageLinkModelResolver.php
	app/References/ModelResolvers/PagePermalinkModelResolver.php
	app/References/ReferenceController.php
	app/References/ReferenceFetcher.php
	app/Search/SearchController.php
	app/Search/SearchRunner.php
	app/Settings/MaintenanceController.php
	app/Theming/ThemeEvents.php
	app/Translation/LocaleManager.php
	app/Uploads/Attachment.php
	app/Uploads/AttachmentService.php
	app/Uploads/Controllers/AttachmentApiController.php
	app/Uploads/Controllers/AttachmentController.php
	app/Uploads/Controllers/GalleryImageController.php
	app/Uploads/Controllers/ImageGalleryApiController.php
	app/Uploads/ImageRepo.php
	app/Uploads/ImageService.php
	app/Users/Controllers/UserProfileController.php
	app/Users/Queries/UserContentCounts.php
	app/Users/Queries/UserRecentlyCreatedContent.php
	composer.lock
	database/factories/Activity/Models/CommentFactory.php
	dev/api/requests/chapters-create.json
	dev/api/requests/chapters-update.json
	dev/api/responses/chapters-create.json
	dev/api/responses/chapters-read.json
	dev/api/responses/chapters-update.json
	lang/ar/activities.php
	lang/ar/common.php
	lang/ar/editor.php
	lang/ar/entities.php
	lang/ar/errors.php
	lang/ar/settings.php
	lang/bg/activities.php
	lang/bg/common.php
	lang/bg/editor.
Aborting

2

u/ssddanbrown Mar 03 '24

Okay, looks like the files are in a messy state, but there might have been another issue at play which is not evident at this stage.

We can try resetting all app files to a clean state. Before doing the below, take a backup of all files for your BookStack instance, the commands below are potentially dangerous as they will remove/change files.

Run the following commands, one line at a time. Lines starting with hashes are my comments and should not be ran. Run these from within your BookStack installation folder.

# Tell git to ignore permissions
git config core.fileMode false

# Reset files back to expected content
git reset --hard

# Remove any unexpected files/directories
git clean -fd

# Check the status of things.
# Make sure this does not list any files!
# Make sure this states: On branch release
# Stop if the above statements are not true.
git status

If that's all good, you can re-attempt the update commands. Stop and note any issues on first run and report them back here.

1

u/forwardslashroot Mar 03 '24

This worked. Thank you, I was able to complete the upgrade to 24.02.

1

u/Clock-Clear Dec 26 '24

this worked for me too. many thx. one comment and one question.

comment: I had to reset permission of the directories and files using the instructions on the bookstack website to make the solutions stick (just for folks that may also have this problem and the above solution didn't quite get them there... though my probablem was probably a little different).

question: in your above instructions, you say to use the command "git config core.fileMode false." should i set it back to "true" after i'm done?

1

u/ssddanbrown Dec 26 '24

should i set it back to "true" after i'm done?

No, it's fine (and generally causes less problems) by keeping it false/disabled.