contao/core

Internal server error when inserting an element

bwl21 opened this issue · 1 comments

bwl21 commented

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?

gmpf commented

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:
https://github.com/ctsmedia/docker-contao/blob/d1624e1b56ed1de88cec0deef878359771e0604e/script/install-demo.php#L16-L18

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.