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

Change config boolean examples #918

Closed
davidhietpas opened this issue Jul 26, 2017 · 3 comments · Fixed by #1750
Closed

Change config boolean examples #918

davidhietpas opened this issue Jul 26, 2017 · 3 comments · Fixed by #1750

Comments

@davidhietpas
Copy link

Pretty minor but threw me for a loop. At least in version 2.1, I kept getting DB connection errors.

The config.rb example shows:
#AppConfig[:allow_unsupported_database] = false
#AppConfig[:allow_non_utf8_mysql_database] = false

The example output from the error log files suggest you change it to this:
AppConfig[:allow_unsupported_database] = "true"
AppConfig[:allow_non_utf8_mysql_database] = "true"

I thought it was odd that it switched from bool to string so I tried first the bool approach
AppConfig[:allow_unsupported_database] = true
AppConfig[:allow_non_utf8_mysql_database] = true

and the bool approach ended up not working. I did what the log suggested and switched it to a string and it worked.

I'd recommend making a change to the config.rb examples to use the correct syntax.

@lmcglohon lmcglohon added the documentation The issue or pull request specifically and primarily deals with documentation label Feb 28, 2018
@lmcglohon
Copy link
Contributor

Closed because moved to tech-docs repo: archivesspace/tech-docs#15

@lmcglohon
Copy link
Contributor

After discussion with the technical documentation team, we decided to move this issue back to the main repo.

@lmcglohon lmcglohon reopened this Apr 4, 2018
@lmcglohon
Copy link
Contributor

lmcglohon commented Aug 26, 2019

I believe the issue is in the code for AppConfig[:allow_non_utf8_mysql_database]. The code is checking to see if the value is equal to a string here:

if !@opts[:skip_utf8_check] && pool.database_type == :mysql && AppConfig[:allow_non_utf8_mysql_database] != "true"

The example in the same file shows it as a string as well:
AppConfig[:allow_non_utf8_mysql_database] = "true"
.

I believe the appropriate fix is to change the two lines in backend/app/model/db.rb to use and set the value of AppConfig[:allow_non_utf8_mysql_database] as a boolean and leave the config_defaults.rb file as is. This will make is more consistent with the other true/false options in the cofiguration file.

@lmcglohon lmcglohon added good first issue and removed documentation The issue or pull request specifically and primarily deals with documentation labels Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants