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

Fix bug that prevents dev/build running #28

Merged
merged 1 commit into from Dec 9, 2014

Conversation

Projects
None yet
2 participants
@guttmann
Contributor

guttmann commented Dec 8, 2014

This fix allows dev/build to run on fresh installs.

To reproduce the issue: (I've been able to reproduce this morning using 3.1.8)

composer create-project silverstripe/installer .
sake dev/build flush=all
composer require silverstripe-labs/googleanalytics
sake dev/build flush=all

The second dev/build will fail with the following error:

ERROR [User Error]: 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"."GoogleAnalyticsCode", "SiteConfig"."GoogleAnalyticsProfileId", "SiteConfig"."GoogleAnalyticsEmail", "SiteConfig"."GoogleAnalyticsPassword", "SiteConfig"."UseGoogleUniversalSnippet", "SiteConfig"."ID", CASE WHEN "SiteConfig"."ClassName" IS NOT NULL THEN "SiteConfig"."ClassName" ELSE 'SiteConfig' END AS "RecordClassName"
FROM "SiteConfig"
LIMIT 1

Unknown column 'SiteConfig.GoogleAnalyticsCode' in 'field list'
IN GET /dev/build

Adding the additional instanceof check for the DevBuildController in code/GoogleLogger.php fixes this problem

@guttmann

This comment has been minimized.

Show comment
Hide comment
@guttmann

guttmann Dec 8, 2014

Contributor

Looks like I should have checked the existing pull requests first...

Contributor

guttmann commented Dec 8, 2014

Looks like I should have checked the existing pull requests first...

@wilr

This comment has been minimized.

Show comment
Hide comment
@wilr

wilr Dec 8, 2014

Member

@guttmann DevBuildController? That'll need to change the minimum framework version right? It's not a 3.1 class.

Member

wilr commented Dec 8, 2014

@guttmann DevBuildController? That'll need to change the minimum framework version right? It's not a 3.1 class.

@guttmann

This comment has been minimized.

Show comment
Hide comment
@guttmann

This comment has been minimized.

Show comment
Hide comment
@guttmann

guttmann Dec 8, 2014

Contributor

@wilr I could come up with a backwards compatible fix if that would make it easier?

Contributor

guttmann commented Dec 8, 2014

@wilr I could come up with a backwards compatible fix if that would make it easier?

@wilr

This comment has been minimized.

Show comment
Hide comment
@wilr

wilr Dec 8, 2014

Member

Can do that or make the minimum 3.1.7 when this was snuck in. Can't wait for SemVar :)

Member

wilr commented Dec 8, 2014

Can do that or make the minimum 3.1.7 when this was snuck in. Can't wait for SemVar :)

@guttmann

This comment has been minimized.

Show comment
Hide comment
@guttmann

guttmann Dec 9, 2014

Contributor

@wilr New commit is backwards compatible (tested on 3.1.5 and 3.1.8)

Contributor

guttmann commented Dec 9, 2014

@wilr New commit is backwards compatible (tested on 3.1.5 and 3.1.8)

wilr added a commit that referenced this pull request Dec 9, 2014

Merge pull request #28 from guttmann/dev-build-fix
Fix bug that prevents dev/build running

@wilr wilr merged commit f46d653 into silverstripe-archive:master Dec 9, 2014

@dhensby dhensby referenced this pull request Jan 22, 2016

Closed

do not enable on dev/build #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment