snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

500 | Server Error Saving Branding Changes

Open ghq55 opened this issue 5 years ago • 5 comments

Good Morning,

First time poster here. I answered the questions to the best of my ability. I'm sure I missed some things. apache_error-log.txt laravel-logs.txt

Please confirm you have done the following before posting your bug report:

Describe the bug A clear and concise description of what the bug is.

When I make changes in "Branding" settings and go to Save the changes I get 500 | Server Error.

To Reproduce Steps to reproduce the behavior:

  1. Go to Admin panel
  2. Click on Branding
  3. Make my changes and click Save
  4. See error

Expected behavior I should receive acknowledgement that the settings were saved and be returned to the Admin panel.

Screenshots If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • Snipe-IT Version: 5.1.5
  • OS: Windows 10 Version 21H1 for x64
  • Web Server: Wamp Server 3.2.3.3 64bit
  • PHP Version: 7.2.33

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome 91.0.4472.106
  • Version: 91.0.4472.106 (Official Build) (64-bit)

Smartphone (please complete the following information):

  • Device: iPhone 10Xr
  • OS: IOS 14.6
  • Browser: Chrome
  • Version: 91.0.4472.80

Error Messages - WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error Illuminate \ Database \ QueryException (42S22) SQLSTATE[42S22]: Column not found: 1054 Unknown column 'allow_user_skin' in 'field list' (SQL: update settings set brand = 1, allow_user_skin = ?, settings.updated_at = 2021-06-22 10:44:45 where id = 1)

  • If a stacktrace is provided in the error, include that too. C:\wamp\www\snipe-it\vendor\laravel\framework\src\Illuminate\Database\Connection.php

    • @param array $bindings

    • @param \Closure $callback

    • @return mixed *

    • @throws \Illuminate\Database\QueryException */ protected function runQueryCallback($query, $bindings, Closure $callback) { // To execute the statement, we'll simply call the callback, which will actually // run the SQL against the PDO connection. Then we can calculate the time it // took to execute and log the query SQL, bindings and time in our memory. try { $result = $callback($query, $bindings); }

      // If an exception occurs when attempting to run a query, we'll format the error // message to include the bindings with SQL, which will make this exception a // lot more helpful to the developer instead of just the database's errors. catch (Exception $e) { throw new QueryException( $query, $this->prepareBindings($bindings), $e ); }

      return $result; }

    /**

    • Log a query in the connection's query log. *

    • @param string $query

    • @param array $bindings

    • @param float|null $time

    • @return void */ public function logQuery($query, $bindings, $time = null) { $this->event(new QueryExecuted($query, $bindings, $time, $this));

      if ($this->loggingQueries) { Arguments "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'allow_user_skin' in 'field list' (SQL: update settings set brand = 1, allow_user_skin = ?, `settin ▶"

  • Any errors that appear in your browser's error console.

  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.

  • NO

  • Include any additional information you can find in storage/logs and your webserver's logs. [previous exception] [object] (PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'allow_user_skin' in 'field list' at C:\wamp\www\snipe-it\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:79) [stacktrace]

- Include the output from php -m (this should display what modules you have enabled.) Couldn't figure out where/how to run this.

Additional context

  • Is this a fresh install or an upgrade? Fresh Install
  • What OS and web server you're running Snipe-IT on
  • What method you used to install Snipe-IT (install.sh, manual installation, docker, etc)
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

Add any other context about the problem here.

Please do not post an issue without answering the related questions above. If you have opened a different issue and already answered these questions, answer them again, once for every ticket. It will be next to impossible for us to help you.

ghq55 avatar Jun 22 '21 15:06 ghq55

It looks like some of your migrations didn't run, hence the Unknown column 'allow_user_skin' error.

What happens when you run php artisan migrate?

snipe avatar Jun 24 '21 02:06 snipe

Migrate command ran successfully and I can now save Branding changes! Thank you very much!

Greg

ghq55 avatar Jun 24 '21 12:06 ghq55

I might have been a bit hasty in closing this ticket. I want to have our Logo show up on labels. I've uploaded the file, but when I go to generate labels, the logo doesn't appear. What am I missing here?

ghq55 avatar Jun 24 '21 13:06 ghq55

Try upgrading to latest - I believe that issue has been fixed.

snipe avatar Jun 28 '21 18:06 snipe

I had issues with the upgrade so I did a clean install and all is well! Thanks for your help!

ghq55 avatar Jul 01 '21 17:07 ghq55