codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

[derhaeuptling/contao-mobilecontent] missing 'hideOnDesktop' and 'hideOnMobile' in 'tl_content' #115

Closed skolarianer closed 6 years ago

skolarianer commented 6 years ago

Sorry for hijacking this repository for submitting an issue related to 'derhaeuptling/contao-mobilecontent', since issues are disabled there.

I’m trying to install 'derhaeuptling/contao-mobilecontent' 2.2.0 on Contao 3.5.31 but somehow 'hideOnDesktop' and 'hideOnMobile' don’t make it into 'tl_content'.

[22-Nov-2017 07:06:06 Europe/Berlin] PHP Fatal error: Uncaught exception 'Exception' with message 'Query error: Unknown column 'hideOnDesktop' in 'field list' (SELECT DISTINCT hideOnDesktop FROM tl_content WHERE pid='1426' AND (ptable='tl_article' OR ptable=''))' thrown in /var/www/clients/client1/web1/web/system/modules/core/library/Contao/Database/Statement.php on line 295
[…]
[22-Nov-2017 07:17:38] Skip non-existing runonce composer/vendor/derhaeuptling/contao-mobilecontent/system/modules/mobilecontent/config/upgrade.php

Database update:

ALTER TABLE `tl_article` ADD `hideOnDesktop` char(1) NOT NULL default '';
ALTER TABLE `tl_article` ADD `hideOnMobile` char(1) NOT NULL default '';
ALTER TABLE `tl_content` ADD `mobileImage` char(1) NOT NULL default '';
ALTER TABLE `tl_content` ADD `mobileImageSrc` binary(16) NULL;
ALTER TABLE `tl_content` ADD `mobileImageCustomSize` char(1) NOT NULL default '';
ALTER TABLE `tl_content` ADD `mobileImageSize` varchar(64) NOT NULL default '';
ALTER TABLE `tl_module` ADD `hideOnDesktop` char(1) NOT NULL default '';
ALTER TABLE `tl_module` ADD `hideOnMobile` char(1) NOT NULL default '';
ALTER TABLE `tl_page` ADD `enableMobileDns` char(1) NOT NULL default '';
ALTER TABLE `tl_page` ADD `mobileDns` varchar(255) NOT NULL default '';
ALTER TABLE `tl_page` ADD `mobileDnsAutoRedirect` char(1) NOT NULL default '';
ALTER TABLE `tl_page` ADD `mobileDnsBreakpointDetection` char(1) NOT NULL default '';
ALTER TABLE `tl_page` ADD `mobileDnsBreakpoint` varchar(4) NOT NULL default '';
ALTER TABLE `tl_calendar_events` ADD `mobileImage` char(1) NOT NULL default '';
ALTER TABLE `tl_calendar_events` ADD `mobileImageSrc` binary(16) NULL;
ALTER TABLE `tl_calendar_events` ADD `mobileImageCustomSize` char(1) NOT NULL default '';
ALTER TABLE `tl_calendar_events` ADD `mobileImageSize` varchar(64) NOT NULL default '';
ALTER TABLE `tl_faq` ADD `mobileImage` char(1) NOT NULL default '';
ALTER TABLE `tl_faq` ADD `mobileImageSrc` binary(16) NULL;
ALTER TABLE `tl_faq` ADD `mobileImageCustomSize` char(1) NOT NULL default '';
ALTER TABLE `tl_faq` ADD `mobileImageSize` varchar(64) NOT NULL default '';
ALTER TABLE `tl_news` ADD `mobileImage` char(1) NOT NULL default '';
ALTER TABLE `tl_news` ADD `mobileImageSrc` binary(16) NULL;
ALTER TABLE `tl_news` ADD `mobileImageCustomSize` char(1) NOT NULL default '';
ALTER TABLE `tl_news` ADD `mobileImageSize` varchar(64) NOT NULL default '';

Even though 'hideOnDesktop' and 'hideOnMobile' are declared in the DCA:

$GLOBALS['TL_DCA']['tl_content']['fields']['hideOnDesktop'] = &$GLOBALS['TL_DCA']['tl_article']['fields']['hideOnDesktop'];
$GLOBALS['TL_DCA']['tl_content']['fields']['hideOnMobile'] = &$GLOBALS['TL_DCA']['tl_article']['fields']['hideOnMobile'];
qzminski commented 6 years ago

If the issues are not available in a particular repository please contact the repository owner instead of creating issues in the other, irrelevant repos. https://github.com/derhaeuptling

skolarianer commented 6 years ago

Sorry for bothering. Just read issue https://github.com/codefog/contao-haste/issues/109