contao / news-bundle

[READ-ONLY] Contao News Bundle
GNU Lesser General Public License v3.0
9 stars 14 forks source link

Unknown method isPreviewMode #29

Closed captainKeller closed 6 years ago

captainKeller commented 6 years ago

I get this Error in Contao / news-bundle V4.4.12 and PHP 7.1.13


Unknown method isPreviewMode

  at vendor/contao/core-bundle/src/Resources/contao/library/Contao/Model.php:1025
  at Contao\Model::__callStatic('isPreviewMode', array(array()))
     (vendor/contao/news-bundle/src/Resources/contao/models/NewsModel.php:273)
  at Contao\NewsModel::countPublishedByPids(array('1'), null)
     (vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php:183)
  at Contao\ModuleNewsList->countItems(array('1'), null)
     (vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php:100)
  at Contao\ModuleNewsList->compile()
     (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:227)
  at Contao\Module->generate()
     (vendor/contao/news-bundle/src/Resources/contao/modules/ModuleNewsList.php:64)
  at Contao\ModuleNewsList->generate()
     (vendor/contao/core-bundle/src/Resources/contao/elements/ContentModule.php:69)
  at Contao\ContentModule->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:485)
  at Contao\Controller::getContentElement(object(ContentModel), 'main')
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:186)
  at Contao\ModuleArticle->compile()
     (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:227)
  at Contao\Module->generate()
     (vendor/contao/core-bundle/src/Resources/contao/modules/ModuleArticle.php:67)
  at Contao\ModuleArticle->generate(false)
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:424)
  at Contao\Controller::getArticle(object(ArticleModel), true, false, 'main')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:282)
  at Contao\Controller::getFrontendModule('0', 'main')
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:177)
  at Contao\PageRegular->prepare(object(PageModel))
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:49)
  at Contao\PageRegular->getResponse(object(PageModel), true)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:302)
  at Contao\FrontendIndex->renderPage(object(Collection))
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:77)
  at Contao\FrontendIndex->run()
     (vendor/contao/core-bundle/src/Controller/FrontendController.php:42)
  at Contao\CoreBundle\Controller\FrontendController->indexAction()
  at call_user_func_array(array(object(FrontendController), 'indexAction'), array())
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:153)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:171)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app_dev.php:64)```
fritzmg commented 6 years ago

Post the output of composer show.

captainKeller commented 6 years ago
clue/stream-filter                           v1.4.0    A simple and modern approach to stream filtering in PHP
codefog/contao-haste                         4.18.0    haste extension for Contao Open Source CMS
composer/ca-bundle                           1.1.0     Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.
contao-community-alliance/composer-plugin    3.0.8     Composer plugin that provides installers for contao-module and legacy-contao-module.
contao-components/ace                        1.2.9     ACE code editor integration for Contao Open Source CMS
contao-components/chosen                     1.1.10    Chosen integration for Contao Open Source CMS
contao-components/colorbox                   1.6.4     Colorbox integration for Contao Open Source CMS
contao-components/colorpicker                1.4.0.2   Color picker integration for Contao Open Source CMS
contao-components/compass                    0.12.2.1  Compass integration for Contao Open Source CMS
contao-components/contao                     7.1.4     Contao Open Source CMS components
contao-components/datepicker                 2.2.0.4   Date picker integration for Contao Open Source CMS
contao-components/dropzone                   4.3.0     DropZone integration for Contao Open Source CMS
contao-components/highlight                  8.9.1     Highlight.js integration for Contao Open Source CMS
contao-components/html5shiv                  3.7.3     HTML5 Shiv integration for Contao Open Source CMS
contao-components/installer                  1.2.6     Contao components installer
contao-components/jquery                     1.12.4    jQuery integration for Contao Open Source CMS
contao-components/jquery-ui                  1.12.1.1  jQuery UI integration for Contao Open Source CMS
contao-components/mediabox                   1.5.4.2   Mediabox integration for Contao Open Source CMS
contao-components/mediaelement               4.2.7     MediaElement.js integration for Contao Open Source CMS
contao-components/mootools                   1.6.0.5   MooTools integration for Contao Open Source CMS
contao-components/respimage                  1.4.2     Respimage.js integration for Contao Open Source CMS
contao-components/simplemodal                2.0.7     SimpleModal integration for Contao Open Source CMS
contao-components/swipe                      2.0.6.2   A JavaScript touch slider with dot menu
contao-components/tablesort                  3.4.9     Contao Open Source CMS tablesort
contao-components/tablesorter                2.0.5.6   jQuery tablesorter integration for Contao Open Source CMS
contao-components/tinymce4                   4.6.7.2   TinyMCE 4 integration for Contao Open Source CMS
contao/calendar-bundle                       4.4.12    Adds calendar functionality to Contao 4
contao/comments-bundle                       4.4.12    Adds comments functionality to Contao 4
contao/core-bundle                           4.4.7     Contao 4 core bundle
contao/faq-bundle                            4.4.12    Adds FAQ functionality to Contao 4
contao/image                                 0.3.5     Contao image library
contao/imagine-svg                           0.1.5     Contao Imagine SVG library
contao/installation-bundle                   4.4.12    Required to install and update Contao 4
contao/listing-bundle                        4.4.12    Allows to list arbitrary data in the Contao 4 front end
contao/manager-bundle                        4.4.12    Contao 4 manager bundle
contao/manager-plugin                        2.2.0     Contao 4 manager plugin
contao/news-bundle                           4.4.12    Adds news functionality to Contao 4
derhaeuptling/contao-mobilecontent           2.2.0     MobileContent extension for Contao Open Source CMS
doctrine/annotations                         v1.4.0    Docblock Annotations Parser
doctrine/cache                               v1.6.2    Caching library offering an object-oriented API for many cache backends
doctrine/collections                         v1.4.0    Collections Abstraction library
doctrine/common                              v2.7.3    Common Library for Doctrine projects
doctrine/dbal                                v2.5.13   Database Abstraction Layer
doctrine/doctrine-bundle                     1.8.1     Symfony DoctrineBundle
doctrine/doctrine-cache-bundle               1.3.2     Symfony Bundle for Doctrine Cache
doctrine/inflector                           v1.2.0    Common String Manipulations with regard to casing and singular/plural rules.
doctrine/lexer                               v1.0.1    Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
felixpfeiffer/subcolumns                     3.1.7     Subcolumns to seperate an article in several columns
fig/link-util                                1.0.0     Common utility implementations for HTTP links
friendsofsymfony/http-cache                  2.1.0     Tools to manage HTTP caching proxies with PHP
friendsofsymfony/http-cache-bundle           2.1.2     Set path based HTTP cache headers and send invalidation requests to your HTTP cache
guzzlehttp/guzzle                            6.3.0     Guzzle is a PHP HTTP client library
guzzlehttp/promises                          v1.3.1    Guzzle promises library
guzzlehttp/psr7                              1.4.2     PSR-7 message implementation that also provides common utility methods
imagine/imagine                              v0.6.3    Image processing for PHP 5.3
jdorn/sql-formatter                          v1.2.17   a PHP SQL highlighting library
jeremykendall/php-domain-parser              3.0.0     Public Suffix List based URL parsing implemented in PHP.
knplabs/knp-menu                             2.3.0     An object oriented menu library
knplabs/knp-menu-bundle                      v2.2.1    This bundle provides an integration of the KnpMenu library
knplabs/knp-time-bundle                      1.8.0     Knplabs time bundle makes your dates look sensible and descriptive
leafo/scssphp                                v0.6.7    scssphp is a compiler for SCSS written in PHP.
league/uri                                   4.2.2     URI manipulation library
lexik/maintenance-bundle                     v2.1.3    This bundle allows you to place your website in maintenance mode by calling two commands from your console.
madeyourday/contao-rocksolid-custom-elements v2.2.3    Create your own, nestable content elements using a modular system. End the WYSIWYG chaos with your own content elements.
madeyourday/contao-rocksolid-frontend-helper v2.0.1    Frontend Editing for Contao. Stop stumbling through the backend and edit the elements you want easily and directly.
madeyourday/contao-rocksolid-icon-picker     v2.0.2    RockSolid Icon Picker Contao Extension.
matthiasmullie/minify                        1.3.58    CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few com...
matthiasmullie/path-converter                1.1.0     Relative path converter
menatwork/contao-multicolumnwizard           3.3.15    MultiColumWizard for Contao OpenSource CMS
menatwork/semantic_html5                     2.0.1     Create html5 elements as content element
michelf/php-markdown                         1.8.0     PHP Markdown
monolog/monolog                              1.23.0    Sends your logs to files, sockets, inboxes, databases and various web services
nelmio/cors-bundle                           1.5.4     Adds CORS (Cross-Origin Resource Sharing) headers support in your Symfony2 application
nelmio/security-bundle                       2.4.0     Extra security-related features for Symfony: signed/encrypted cookies, HTTPS/SSL/HSTS handling, cookie session storage, ...
oyejorge/less.php                            v1.7.0.14 PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt)
paragonie/random_compat                      v2.0.11   PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
patchwork/utf8                               v1.3.1    Portable and performant UTF-8, Unicode and Grapheme Clusters for PHP
php-http/client-common                       1.7.0     Common HTTP Client implementations and tools for HTTPlug
php-http/discovery                           1.3.0     Finds installed HTTPlug implementations and PSR-7 message factories
php-http/guzzle6-adapter                     v1.1.1    Guzzle 6 HTTP Adapter
php-http/httplug                             v1.1.0    HTTPlug, the HTTP client abstraction for PHP
php-http/message                             1.6.0     HTTP Message related tools
php-http/message-factory                     v1.0.2    Factory interfaces for PSR-7 HTTP Message
php-http/promise                             v1.0.0    Promise used for asynchronous HTTP requests
phpspec/php-diff                             v1.1.0    A comprehensive library for generating differences between two hashable objects (strings or arrays).
phpunit/php-token-stream                     1.4.12    Wrapper around PHP's tokenizer extension.
psr/cache                                    1.0.1     Common interface for caching libraries
psr/container                                1.0.0     Common Container Interface (PHP FIG PSR-11)
psr/http-message                             1.0.1     Common interface for HTTP messages
psr/link                                     1.0.0     Common interfaces for HTTP links
psr/log                                      1.0.2     Common interface for logging libraries
psr/simple-cache                             1.0.0     Common interfaces for simple caching
sensio/distribution-bundle                   v5.0.21   Base bundle for Symfony Distributions
sensio/framework-extra-bundle                v3.0.29   This bundle provides a way to configure your controllers with annotations
sensiolabs/ansi-to-html                      v1.1.3    A library to convert a text with ANSI codes to HTML
sensiolabs/security-checker                  v4.1.7    A security checker for your composer.lock
simplepie/simplepie                          1.5.1     A simple Atom/RSS parsing library for PHP
swiftmailer/swiftmailer                      v5.4.8    Swiftmailer, free feature-rich PHP mailer
symfony/monolog-bundle                       v3.1.2    Symfony MonologBundle
symfony/polyfill-intl-icu                    v1.6.0    Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring                    v1.6.0    Symfony polyfill for the Mbstring extension
symfony/polyfill-php56                       v1.6.0    Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70                       v1.6.0    Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util                        v1.6.0    Symfony utilities for portability of PHP codes
symfony/swiftmailer-bundle                   v2.6.7    Symfony SwiftmailerBundle
symfony/symfony                              v3.3.6    The Symfony PHP framework
tecnickcom/tcpdf                             6.2.13    TCPDF is a PHP class for generating PDF documents and barcodes.
terminal42/contao-ce-access                  2.0.5     Limit user access to content elements for Contao Open Source CMS
terminal42/contao-changelanguage             3.1.7     ChangeLanguage extension for Contao Open Source CMS
terminal42/contao-easy_themes                2.2.6     Contao Open Source CMS extension easy_themes
terminal42/contao-folderpage                 2.0.2     Provides a new page type for Contao that allows you to group pages into folders.
terminal42/dcawizard                         2.4.3     dcaWizard extension for Contao Open Source CMS
terminal42/header-replay-bundle              1.4.1     Send preflight requests for user context headers and replay them for reverse proxy support.
terminal42/notification_center               1.4.2     Notification Center extension for Contao Open Source CMS
true/punycode                                v2.1.1    A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)
twig/twig                                    v1.35.0   Twig, the flexible, fast, and secure template language for PHP
ua-parser/uap-php                            v3.5.0    A multi-language port of Browserscope's user agent parser.
webmozart/assert                             1.2.0     Assertions to validate method input/output with nice error messages.
webmozart/path-util                          2.3.0     A robust cross-platform utility for normalizing, comparing and modifying file paths.
fritzmg commented 6 years ago

Post the output of composer prohibits contao/core-bundle 4.4.12 and php -v of the PHP version you are using to run composer commands.

captainKeller commented 6 years ago
contao/core-bundle      4.4.12  requires          symfony/console (^3.3.7)
contao/managed-edition  -       does not require  symfony/console (but v3.3.6 is installed)
fritzmg commented 6 years ago

Please post the PHP version you are using to run composer commands. If that is PHP 7.0.0 - 7.0.7 by any chance, then you ran into the same problem as here: #27

However, since your webserver is using PHP 7.1 anyway: you must ensure to use the same PHP version for composer operations as your webserver uses to run your Contao installation. If your previous composer operations were run with PHP 7.0.0 - 7.0.7 then you need to run a composer update -o again with the correct PHP version (7.1.13 according to your initial information).

captainKeller commented 6 years ago

The Composer run with php 7.1.13

fritzmg commented 6 years ago

Post the output of composer prohibits symfony/console 3.3.7.

captainKeller commented 6 years ago

Ok thats strange, symfony/console v3.3.7 requires php (^5.5.9|>=7.0.8 but 7.0 is installed)

fritzmg commented 6 years ago

How do you run your composer updates? Are you sure you are using PHP 7.1.13 when running composer operations? How are you sure?

Or: do you have a "platform" definition in your root composer.json? If yes, post the content of that :)

captainKeller commented 6 years ago

THX!

Or: do you have a "platform" definition in your composer.json? If yes, post the content of that

that was the problem :unamused: The platform was php7.0