-
Notifications
You must be signed in to change notification settings - Fork 106
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
Adding a new 'Category' field to database #365
Comments
Due to a limitation in the Fat-Free framework, the code for the most part doesn't directly use any SQL |
Thanks for the tip, I added the update to the issue_detail view to support the new field. However, now when I create the issue the database still is not updating and now the single.html view isn't rendering correctly and not displaying an error message either. Here's the commit, maybe you will know what's causing this strange behavior on the client-side? Maybe the field has to be non-null? Or maybe something else with the way the fields are being saved in the db from the controller. |
This could be a side effect of caching. Try clearing the cache from the Administration panel. If that doesn't work, check the PHP error logs, which should have more detail on what's going on. |
Okay I tried clearing cache and that didn't work, so I looked at the PHP error log and it's getting an "undefined field category" on After looking up the error online I haven't found anything. Any idea what could be causing this given the new info? Thanks again man, here's a link to my current codebase if you want to chase anything down: |
Hi phproject!
I've had some great success customizing this application so far, but I'm running into a headache with trying to add a new issue field to the database and the application as a whole.
I'm adding a new 'category_id' entry to the issue table, and a new 'issue_category' table with int IDs and category names. I have 5 categories and I'm going to add the ability to filter by those to the issue browser.
I have already changed the database.sql file to include these new changes and it works great, and have also changed the edit-form.html view to include a dropdown for selecting category, which populates from the database correctly.
The problem is that when I create the new issue or attempt to edit/update the issue, the new category does not make its way into the issue table. Also, on the single.html view when I attempt to display the category with @issue.category it comes back with a 500 field does not exist error.
Any fixes for this or help on implementing these categories would be greatly appreciated!
The text was updated successfully, but these errors were encountered: