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

Trying to view the License section results in a server error 500 #278

Closed
Tsuroerusu opened this issue Oct 10, 2014 · 8 comments
Closed

Trying to view the License section results in a server error 500 #278

Tsuroerusu opened this issue Oct 10, 2014 · 8 comments

Comments

@Tsuroerusu
Copy link

I just installed Snipe-IT v0.3.11-alpha, it seems to work fine, and I have not added or changed any of the sample data. Most of it is smooth, however when I click on Licenses on the left, I get this:

1

With debug enabled, it shows this:

2

It does basically the same when I click on the Adobe Photoshop CS6 samples with debug-disabled.

I installed using the instructions in the documentation pretty much to the point (Only variation is the location of the installation folder and so on), it is running on Debian Wheezy with a simple LAMP setup. Aside from the License section, everything seems to work.

The only thing I was slightly unsure about during the installation, when reading the docs, was whether both the local, staging and production lines in bootstrap/start.php needed to be filled in if I only wanted to run one of them. The documentation, to me, seemed to imply only production was necessary for just that. I just commented local and staging out, and the installation went fine with no issue at all. Just noting this in case this could be the issue.

@torriz
Copy link

torriz commented Oct 13, 2014

Hi, Tsuroerusu.
Try to create another user :) as one of the "test licences" is checked out to a user that doesn't exsist.
Tell me if this doesn't work.

I also got a server error 500 because of "asset_id" when adding/editing licenses.
I commented out LINE 184 (and LINE 85) of LicensesController.php (Located here: /app/controllers/admin), then it worked fine.. o_O

Regarding the installation, you don't need to use local, production and staging if u don't want to. Just fill in the hostname (of your server running the snipeit app) in the one you are going to use, ex. "production".

@Tsuroerusu
Copy link
Author

Ah, yes! I see what the problem is! :) So it was actually the example data which caused the problem. I fixed it by using phpMyAdmin, and in the table license_seats, in the column "assigned_to" there was one row where "assigned_to" was set to "3", which, as you say, is a user that does not exist. I changed it to "2" and boom, problem gone. :D

Thanks for the clarification on the local/staging/production thing, what you suggested was what I did. Glad to know that was the correct way to do it. :)

So I guess this bug report is really about the example data, and there being a problem in the data it puts into the license_seats table. :)

@snipe
Copy link
Owner

snipe commented Oct 13, 2014

@Tsuroerusu Yeah, the way it works in Laravel is via inheriting from the parent config. So if you don't want to mess with multiple environments, you could just have all of your config variables in app/config/app.php. If you did want to use multiple environments, you can use the app/local/config/app.config stuff, but you only need to include the stuff in there that is different than the app/config/app.php version. (I have all of it in the sample configs, because there are a couple different use-cases for my users.)

@snipe
Copy link
Owner

snipe commented Oct 13, 2014

Thanks for the heads up on the sample data. If you want to open a PR with a fix, that would be great. Otherwise I'll try to get it fixed this week.

@Tsuroerusu
Copy link
Author

I must confess this is my first attempt at using Github, so I am not entirely familiar with the terminology, or usage of it. I am not much of a coder either, so unfortunately I probably cannot contribute that much in terms of fixes or patches directly. However, I hope to help with testing and bug reporting. :)

As I said, the problem lies in the table "license_seats" in the column "assigned_to", one of the rows has "3" in that column, which does not exist as a user id.

Thanks for the explanation on Laravel, it was very useful. :)

@torriz
Copy link

torriz commented Oct 14, 2014

Yee! Glad I could help out, @Tsuroerusu

snipe:

  1. Regarding the sample data issue: Afaik, The fix for the sample data (included in the "Snipe-IT v0.3.11-alpha "install" ) would be to either include the user that the one adobe license is checked out to OR checkin that license, so it's not given to any user.. 🎉
  2. I would also like to add more permissions/groups for users, being able to request assets/licenses (as there is an option called "Users may request this asset" in asset-creation), could possibly open a new ticket regarding this.
  3. Do you take requests/suggestions for features for snipe-it into considuration? :)
    • When is next update/release? 👍

@madd15
Copy link
Contributor

madd15 commented Oct 14, 2014

From what I can see this error has been fixed already by pr #197

@torriz
Copy link

torriz commented Oct 16, 2014

Great! Simple fix indeed.

@snipe snipe closed this as completed Oct 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants