heimrichhannot / contao-utils-bundle

This bundle offers various utility functionality for the Contao CMS.
GNU Lesser General Public License v3.0
8 stars 4 forks source link

bundle utils disrupts installation of terminal42/contao-password-validation #19

Closed zonky2 closed 4 years ago

zonky2 commented 4 years ago

bundle utils disrupts installation of terminal42/contao password validation

with require terminal42/contao-password-validation send

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'j1.pwChangePage' in 'field list'

        trace: {
          ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78 { …}
          ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:911 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:276 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/Database/Statement.php:250 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/Model.php:1088 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/Model.php:959 { …}
          ./vendor/contao/core-bundle/src/Framework/Adapter.php:47 { …}
          ./vendor/heimrichhannot/contao-utils-bundle/src/Model/ModelUtil.php:103 { …}
          ./vendor/heimrichhannot/contao-utils-bundle/src/Cache/DatabaseTreeCache.php:90 { …}
          ./vendor/heimrichhannot/contao-utils-bundle/src/Cache/DatabaseTreeCache.php:78 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/DcaLoader.php:104 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:1261 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/dca/tl_article.php:11 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/DcaLoader.php:94 { …}
          ./vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:1261 { …}
          ./vendor/contao/core-bundle/src/Framework/Adapter.php:47 { …}
          ./vendor/heimrichhannot/contao-utils-bundle/src/Dca/DcaUtil.php:943 { …}
          ./vendor/heimrichhannot/contao-utils-bundle/src/Cache/DatabaseTreeCache.php:251 { …}
          ./vendor/heimrichhannot/contao-utils-bundle/src/Cache/UtilCacheWarmer.php:132 { …}
          ./vendor/heimrichhannot/contao-utils-bundle/src/Cache/UtilCacheWarmer.php:84 { …}
          ./vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php:52 { …}
          ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php:96 { …}
          ./vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255 { …}
          ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:1005 { …}
          ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:86 { …}
          ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:255 { …}
          ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:74 { …}
          ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148 { …}
          ./vendor/contao/manager-bundle/bin/contao-console:47 { …}
        }

after

ALTER TABLE `tl_page` ADD `pwChangePage` INT(10) NOT NULL DEFAULT '0' ;
ALTER TABLE `tl_page` ADD `nc_account_disabled` INT(10) NOT NULL DEFAULT '0' ;

comes

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'type' in where clause is ambiguous

Defcon0 commented 4 years ago

Could you please provide the full sql leading to

SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'type' in where clause is ambiguous

?

Which contao version is it?

zonky2 commented 4 years ago

heimrichhannot/contao-request-bundle 1.1.0 A request class, that brings the symfony/http-foundat... heimrichhannot/contao-teaser-bundle 0.3.2 A contao teaser content element, that provides the ab... heimrichhannot/contao-utils-bundle 2.177.1 This bundle offers various utility functionality for ... heimrichhannot/contao-video-bundle 0.1.4 This bundle brings enhanced video embedding support t...

Contao 4.9

An exception occurred while executing 'SELECT tl_page.*, j1.`id` AS pwChangePage__id, j1.`pid` AS pwChangePage__pid, j1.`
  sorting` AS pwChangePage__sorting, j1.`tstamp` AS pwChangePage__tstamp, j1.`title` AS pwChangePage__title, j1.`alias` AS
  pwChangePage__alias, j1.`type` AS pwChangePage__type, j1.`pageTitle` AS pwChangePage__pageTitle, j1.`language` AS pwChang
  ePage__language, j1.`robots` AS pwChangePage__robots, j1.`description` AS pwChangePage__description, j1.`redirect` AS pwC
  hangePage__redirect, j1.`jumpTo` AS pwChangePage__jumpTo, j1.`redirectBack` AS pwChangePage__redirectBack, j1.`url` AS pw
  ChangePage__url, j1.`target` AS pwChangePage__target, j1.`dns` AS pwChangePage__dns, j1.`staticFiles` AS pwChangePage__st
  aticFiles, j1.`staticPlugins` AS pwChangePage__staticPlugins, j1.`fallback` AS pwChangePage__fallback, j1.`adminEmail` AS
   pwChangePage__adminEmail, j1.`dateFormat` AS pwChangePage__dateFormat, j1.`timeFormat` AS pwChangePage__timeFormat, j1.`
  datimFormat` AS pwChangePage__datimFormat, j1.`createSitemap` AS pwChangePage__createSitemap, j1.`sitemapName` AS pwChang
  ePage__sitemapName, j1.`useSSL` AS pwChangePage__useSSL, j1.`autoforward` AS pwChangePage__autoforward, j1.`protected` AS
   pwChangePage__protected, j1.`groups` AS pwChangePage__groups, j1.`includeLayout` AS pwChangePage__includeLayout, j1.`lay
  out` AS pwChangePage__layout, j1.`mobileLayout` AS pwChangePage__mobileLayout, j1.`includeCache` AS pwChangePage__include
  Cache, j1.`cache` AS pwChangePage__cache, j1.`clientCache` AS pwChangePage__clientCache, j1.`includeChmod` AS pwChangePag
  e__includeChmod, j1.`cuser` AS pwChangePage__cuser, j1.`cgroup` AS pwChangePage__cgroup, j1.`chmod` AS pwChangePage__chmo
  d, j1.`noSearch` AS pwChangePage__noSearch, j1.`cssClass` AS pwChangePage__cssClass, j1.`sitemap` AS pwChangePage__sitema
  p, j1.`hide` AS pwChangePage__hide, j1.`guests` AS pwChangePage__guests, j1.`tabindex` AS pwChangePage__tabindex, j1.`acc
  esskey` AS pwChangePage__accesskey, j1.`published` AS pwChangePage__published, j1.`start` AS pwChangePage__start, j1.`sto
  p` AS pwChangePage__stop, j1.`overrideNoCookieVideoUrlSettings` AS pwChangePage__overrideNoCookieVideoUrlSettings, j1.`en
  ableNoCookieVideoUrl` AS pwChangePage__enableNoCookieVideoUrl, j1.`overrideEnablePrivacyNotice` AS pwChangePage__override
  EnablePrivacyNotice, j1.`enablePrivacyNotice` AS pwChangePage__enablePrivacyNotice, j1.`videofullsizeTemplate` AS pwChang
  ePage__videofullsizeTemplate, j1.`videoprivacyTemplate` AS pwChangePage__videoprivacyTemplate, j1.`pwChangePage` AS pwCha
  ngePage__pwChangePage, j1.`nc_account_disabled` AS pwChangePage__nc_account_disabled, j1.`newsCategories_param` AS pwChan
  gePage__newsCategories_param, j1.`languageMain` AS pwChangePage__languageMain, j1.`languageRoot` AS pwChangePage__languag
  eRoot, j1.`languageQuery` AS pwChangePage__languageQuery FROM tl_page LEFT JOIN tl_page j1 ON tl_page.`pwChangePage`=j1.i
  d WHERE type = 'root' ORDER BY sorting':

  SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'type' in where clause is ambiguous
Defcon0 commented 4 years ago

Mhm, the question is where the WHERE constraint comes from. Do you have a stack trace after adding the fields to the db?

Defcon0 commented 4 years ago

In Contao 4.4 it works. Now testing 4.9

zonky2 commented 4 years ago

this is the trace after ALTER TABLE

Defcon0 commented 4 years ago

Should be fixed in 2.177.2. Could you please test if it works for you, as well now?

zonky2 commented 4 years ago

works fine - thnks for your fast response!