symbiote / silverstripe-build

Phing build settings and tasks for the silverstripe-base project
BSD 3-Clause "New" or "Revised" License
0 stars 8 forks source link

Fix 404/500 pages generated during dev/build on Build Servers #24

Closed silbinarywolf closed 5 years ago

silbinarywolf commented 6 years ago

We should add the following to "non_interactive" so that 404/500 pages get generated properly without an error/warning occuring during dev/build on ErrorPage.php <mkdir dir="${project.basedir}/assets" />

<target name="non_interactive" if="ni_build">
    <!-- we'll make sure that there's a build.properties file, even if we're just using the default  -->
    <delete file="${project.basedir}/build/build.properties" />
    <copy tofile="${project.basedir}/build/build.properties" file="${project.basedir}/build/build.properties.sample" />
    <delete dir="assets" />
    <delete file="${project.basedir}/mysite/local.conf.php" />
    <delete file="${project.basedir}/mysite/_config/local.yml" />
    <delete file="${project.basedir}/test-assist/testing.conf.php" />
    <property name="properties_exist" value="true" override="true" />
    <property file="${project.basedir}/build/build.properties"></property>
    <mkdir dir="${project.basedir}/silverstripe-cache" />
</target>
silbinarywolf commented 6 years ago

Related: https://github.com/symbiote/silverstripe-base/issues/21

nglasl commented 6 years ago

@silbinarywolf, can you please confirm whether this affects SS3 and/or SS4?

silbinarywolf commented 6 years ago

@nglasl It definitely affects SS3. Would need some time to check if this affects SS4.

nglasl commented 5 years ago

I'll grab this one to see if I can replicate it. I know there have been a bunch of improvements in the last 6 months, so it's possible this is no longer a problem.

nglasl commented 5 years ago

I've given this one a solid test for both SS3 and SS4 (doing force deletions of the assets folder, and attempting to replicate the build server commands) and at no point do I ever get errors when the error pages are being generated. The assets folder is automatically created each time, so if there is an issue with the build servers as you mentioned, perhaps it's a permission issue when creating the assets folder.