Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Offical apps | Community apps | Demo | Docs | Install
  1. Cloudron Forum
  2. PrivateBin
  3. Template bootstrap not found after upgrade
Everything related to the PHP CVE and eMudhra Cert Please read our Security issue thread - PHP and eMudhra cert compromise.

Template bootstrap not found after upgrade

Scheduled Pinned Locked Moved PrivateBin
5 Posts 3 Posters 245 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    I
    Inli
    wrote last edited by
    #1
    PHP Fatal error:  Uncaught Exception: Template bootstrap not found in file tpl/bootstrap.php! in /app/code/lib/View.php:56\nStack trace:\n#0 /app/code/lib/Controller.php(499): PrivateBin\\View->draw()\n#1 /app/code/lib/Controller.php(180): PrivateBin\\Controller->_view()\n#2 /app/code/index.php(17): PrivateBin\\Controller->__construct()\n#3 {main}\n  thrown in /app/code/lib/View.php on line 56
    

    You need to replace “bootstrap” with “bootstrap5” in /app/data/conf.php

    sed -i 's/^\stemplate\s=.*/template = "bootstrap5"/' /app/data/conf.php

    1 Reply Last reply
    2
    • SansGuidonS
      SansGuidonS
      SansGuidon
      wrote last edited by
      #2

      I came here to see if someone faced the problem already. I'm also impacted 🙂 , thanks for reporting this, @inli

      About me / Now

      1 Reply Last reply
      1
      • SansGuidonS
        SansGuidonS
        SansGuidon
        wrote last edited by
        #3

        @girish Hi! I looked into the package source (start.sh) to confirm the root cause: the config file is only written on first install, so upgrades never migrate existing settings.

        PrivateBin renamed the bootstrap template to bootstrap5 in version 1.5, but old conf.php files keep the old value.

        Here is a two-line fix for start.sh, to add right after the initial config block:

        # Migrate template name: "bootstrap" was renamed to "bootstrap5" in PrivateBin 1.5
        if grep -q 'template = "bootstrap"$' /app/data/conf.php 2>/dev/null; then
            sed -i 's/template = "bootstrap"$/template = "bootstrap5"/' /app/data/conf.php
        fi
        

        The $ anchor ensures bootstrap5 is never double-patched.

        Happy to submit a MR if someone can grant fork access on git.cloudron.io (account: morgan) 😉

        About me / Now

        1 Reply Last reply
        0
        • girishG
          girishG
          girish
          Staff
          wrote last edited by
          #4

          @sansguidon I added you to the packaging group. I applied your fix anyways - https://git.cloudron.io/packages/privatebin-app/-/merge_requests/18

          1 Reply Last reply
          2
          • SansGuidonS
            SansGuidonS
            SansGuidon
            wrote last edited by
            #5

            Thank you @girish 💌

            About me / Now

            1 Reply Last reply
            0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Bookmarks
            • Search