ctsmedia/docker-contao

demo site needs update to 4.6

Opened this issue · 2 comments

bwl21 commented

I recreate the ticket here from contao/core#8902 as it is a dockerization issue.

Affected version(s)

4.6.5 running in a docker container from https://github.com/ctsmedia/docker-contao

Description

Internal Server Error
What's the matter?
An exception occurred while executing 'INSERT INTO tl_content (`type`, `headline`, `floating`, `sortOrder`, `perRow`, `playerAspect`, `sliderStartSlide`, `com_order`, `com_template`, `pid`, `sorting`, `ptable`, `tstamp`) VALUES ('text', 'a:2:{s:5:\"value\";s:0:\"\";s:4:\"unit\";s:2:\"h2\";}', 'above', 'ascending', 4, 'none', 0, 'ascending', 'com_default', 98, 128, 'tl_article', 0)': SQLSTATE[42S22]: Column not found: 1054 Unknown column 'playerAspect' in 'field list'

How to reproduce

I am not sure if i is a matter of the dockerization or of contao.
@ctsmedia @DanielSchwiperich could you have a look in to this?

Solution approach

as @gmpf replield:

It's a docker-contao issue. There is no SQL file for Contao 4.6: https://github.com/ctsmedia/docker-contao/tree/d1624e1b56ed1de88cec0deef878359771e0604e/demo
If you install a version above 4.5, the install script uses the 4.5 data:

if ($comparableContaoVersion >= 450) {
$versionToUseForDemoData = "4.5";
}

The field playerAspect that the error refers to was added in 4.6, so it's absent in the docker-contao demo:
contao/contao@8fe474f

I don't know much about Docker, but I suppose if you just want to be able to work with the installation for now, you can simply go to contao/install so that you can have the field added to the DB. If you want it to be there out of the box, a new SQL dump will have to be added to docker-contao.

It's a docker-contao issue. There is no SQL file for Contao 4.6: https://github.com/ctsmedia/docker-contao/tree/d1624e1b56ed1de88cec0deef878359771e0604e/demo
If you install a version above 4.5, the install script uses the 4.5 data:

if ($comparableContaoVersion >= 450) {
$versionToUseForDemoData = "4.5";
}

The field playerAspect that the error refers to was added in 4.6, so it's absent in the docker-contao demo:
contao/contao@8fe474f

I don't know much about Docker, but I suppose if you just want to be able to work with the installation for now, you can simply go to contao/install so that you can have the field added to the DB. If you want it to be there out of the box, a new SQL dump will have to be added to docker-contao.

bwl21 commented

tbh: I wonder why it installs 4.6 a docker file says it is 4.4

# Set it to a fix version number if you want to run a specific version
ARG CONTAO_VERSION=~4.4

Hi Bernhard,
it's because of the ~
See https://getcomposer.org/doc/articles/versions.md#stability-constraints

You've built a local docker contao container right?
You can always overwrite the version you want to use. Either just edit the Dockerfile Version or add a build argument. Like for using the latest LTS:
docker build -t ctsmedia/contao:latest --build-arg CONTAO_VERSION=4.4.* .

I'll have a look to and see If I can update the demo data for 4.6