Skip to content

Instantly share code, notes, and snippets.

@ximus
Created November 15, 2014 20:46
Show Gist options
  • Save ximus/4e05075c9ed4574669b9 to your computer and use it in GitHub Desktop.
Save ximus/4e05075c9ed4574669b9 to your computer and use it in GitHub Desktop.
Fix for alysum minic promo slider: Data too long for column 'effect' at row 1
Fresh install of prestashop 1.6.0.9 and Alysum theme 3.1.
Error: `Data too long for column 'effect' at row 1`
Failing sql query:
```
INSERT INTO `ps_minic_options` (
`id_shop`, `effect`
) VALUES (
1,
"random,simpleFade, curtainTopLeft, curtainTopRight, curtainBottomLeft, curtainBottomRight, curtainSliceLeft, curtainSliceRight, blindCurtainTopLeft, blindCurtainTopRight, blindCurtainBottomLeft, blindCurtainBottomRight, blindCurtainSliceBottom, blindCurtainSliceTop, stampede, mosaic, mosaicReverse, mosaicRandom, mosaicSpiral, mosaicSpiralReverse, topLeftBottomRight, bottomRightTopLeft, bottomLeftTopRight, bottomLeftTopRight");
```
Problem is `effect` column is too narrow, see here:
```
irb(main):001:0> "random,simpleFade, curtainTopLeft, curtainTopRight, curtainBottomLeft, curtainBottomRight, curtainSliceLeft, curtainSliceRight, blindCurtainTopLeft, blindCurtainTopRight, blindCurtainBottomLeft, blindCurtainBottomRight, blindCurtainSliceBottom, blindCurtainSliceTop, stampede, mosaic, mosaicReverse, mosaicRandom, mosaicSpiral, mosaicSpiralReverse, topLeftBottomRight, bottomRightTopLeft, bottomLeftTopRight, bottomLeftTopRight".size
=> 427
```
Fix is to update pk_promominicslider.php line 54, change effect from varchar 300 to something larger than 427, say 600.
```
...
CREATE TABLE `'._DB_PREFIX_.'minic_options` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`id_shop` int(10) unsigned NOT NULL,
`effect` VARCHAR(600),
...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment