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
Error when running /dev/build #26
Comments
SilverStripe is querying SiteConfig as part of the build process. You'll need to put the website into 'dev' mode and then rebuild your database so it doesn't check site config or use the CLI wrapper. |
But my website is already in dev mode: /AB |
Then I would try use the cli version (sake dev/build) or go into your database and drop the entire siteconfig table and rebuild from scratch. Please use the forum or IRC issue for support questions. |
I'm always on IRC :) thanks wilr! will try the cli version. abitran |
Ok.. I tried sake, without success, then I drop the SiteConfig table with the googleanalytics module installed and was impossible to recreate the SiteConfig table. Then I erased the googleanalytics folder and edit _config.php, rerun /dev/build and the SiteConfig table was created. Again I tried with the googleanalytics module, and after running /dev/build, the same error: abitran |
hi guys, why is this issue closed? Error is still there. SS 3.1.5 dev/build works fine, latest SS produces this error... |
This is closed because the module cannot do anything about it. It's a SilverStripe limitation that querying the SiteConfig / Member tables while doing migrations need to either be done in dev or cli modes. Not the modules responsibility. |
Of course, I tried it in DEV mode via URL and with sake also, but no success. |
I have had a similar issue today and in the end, i found out that i have some code that was extending the "Controller" class and in it, i have some code that was referring "SiteConfig" in the "afterInit" method . The controller class get called in the dev/build process and at that point your siteconfig dataextension tables have not been created yet. TO fix it, i simply change my code to extend "ContentController" instead of the base "Controller" and the issue was solved. |
After updating my google-analytics module with composer, I get the following error when running /dev/build:
Couldn't run query: SELECT DISTINCT "SiteConfig"."ClassName", "SiteConfig"."Created", "SiteConfig"."LastEdited", "SiteConfig"."Title", "SiteConfig"."Tagline", "SiteConfig"."Theme", "SiteConfig"."CanViewType", "SiteConfig"."CanEditType", "SiteConfig"."CanCreateTopLevelType", "SiteConfig"."Locale", "SiteConfig"."GoogleAnalyticsCode", "SiteConfig"."GoogleAnalyticsProfileId", "SiteConfig"."GoogleAnalyticsEmail", "SiteConfig"."GoogleAnalyticsPassword", "SiteConfig"."UseGoogleUniversalSnippet", "SiteConfig"."GlobalUnsubscribe", "SiteConfig"."ID", CASE WHEN "SiteConfig"."ClassName" IS NOT NULL THEN "SiteConfig"."ClassName" ELSE 'SiteConfig' END AS "RecordClassName" FROM "SiteConfig" WHERE ("SiteConfig"."Locale" = 'en_US') LIMIT 1 Unknown column 'SiteConfig.UseGoogleUniversalSnippet' in 'field list'
SS 3.1.x-dev
The text was updated successfully, but these errors were encountered: