mybb / mybb2

The repository for the MyBB 2 forum software. Not to be used on live boards.
https://www.mybb.com
BSD 3-Clause "New" or "Revised" License
111 stars 45 forks source link

Settings service provider preventing Auto installer from being possible #267

Open 036 opened 7 years ago

036 commented 7 years ago

When trying to access routes without the migration being run MyBB2 throws a query exception:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mybb2.settings' doesn't exist (SQL: selectsettings.id,settings.name,settings.package,setting_values.value,setting_values.user_idfromsettingsleft joinsetting_valuesonsetting_values.setting_id=settings.idwhereuser_idis null)

This is due to the settings service provider loading and attempting to grab data from the database which then throws an error because the migration hasn't run yet. This prevents an auto-installer being created/working.

euantorano commented 7 years ago

As discussed on Discord, I'm probably going to fix this by lazy loading settings when a setting is first accessed rather than at app boot time.

On 18 Nov 2016, at 13:12, Paradigm notifications@github.com wrote:

When trying to access routes without the migration being run MyBB2 throws a query exception:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mybb2.settings' doesn't exist (SQL: selectsettings.id,settings.name,settings.package,setting_values.value,setting_values.user_idfromsettingsleft joinsetting_valuesonsetting_values.setting_id=settings.idwhereuser_idis null)

This is due to the settings service provider loading and attempting to grab data from the database which then throws an error because the migration hasn't run yet. This prevents an auto-installer being created/working.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.