The news bundle adds news functionality to Contao 4

Overview

Contao 4 news bundle

The news bundle adds news functionality to Contao 4.

Contao is an Open Source PHP Content Management System for people who want a professional website that is easy to maintain. Visit the project website for more information.

License

Contao is licensed under the terms of the LGPLv3.

Getting support

Visit the support page to learn about the available support options.

Comments
  • Make image link to news by default

    Make image link to news by default

    Everytime we're working on a new Contao site one of the things we have to do is to adjust the listing templates to make the image link to the article.

    Is there any particular reason or has this been discussed before why the image should not link to the article by default?

    From an endusers perspective it's mostly expected that clicking the image would take you to the complete article.

    feature 
    opened by bennyborn 23
  • 4.4.9+ still requires only core-bundle ^4.4.2

    4.4.9+ still requires only core-bundle ^4.4.2

    contao/core-bundle 4.4.9 introduced the Model::isPreviewMode function, which is also used in contao/news-bundle (and the other bundles) starting with 4.4.9.

    However, the composer.json was never changed to reflect that new dependency, it still only says:

    "contao/core-bundle": "^4.4.2"
    

    So if the core-bundle cannot be updated to 4.4.9+ but the news-bundle for example can be updated to 4.4.9+, you will get the error

    … isPreviewMode does not exist
    

    These circumstances can happen, if your PHP version is >=7.0.0,<7.0.8. The contao/core-bundle has a dependency on

    "symfony/console": "^3.3.7"
    

    since version 4.4.8. Thus contao/core-bundle cannot be updated to 4.4.8+ under PHP >=7.0.0,<7.0.8, because symfony/console 3.3.7+ requires at least PHP 7.0.8. The contao/news-bundle can be updated to 4.4.12 without any problems under PHP >=7.0.0,<7.0.8.

    defect 
    opened by fritzmg 13
  • feature: exclude reader page from sitemap and forward to or display latest news

    feature: exclude reader page from sitemap and forward to or display latest news

    By default, the reader page also gets included into the sitemap, which means search engines might index an otherwise empty page (since there is no output from the reader module when there is no parameter). People often wish to exclude it from the sitemap for that reason, or at least make it so that the reader page either forwads to or displays the latest news entry (though the latter would be duplicate content and inserting a canonical tag in such a case wouldn't make much sense imho).

    So this feature request would generally be about handling empty reader pages. The reader module could provide two additional options:

    • Redirect to newest entry
    • Hide page from sitemap

    When the first option is active, the reader module would simply search for the first news archive, that has the redirect page set to itself and generate an URL to the latest news entry from there and execute a redirect.

    Furthermore, the getSearchablePages Hook would look for any reader modules on pages when $blnIsSitemap is true and remove the page from $arrPages whenever the second option of the module is set.

    defect 
    opened by fritzmg 12
  • Unknown method isPreviewMode

    Unknown method isPreviewMode

    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)```
    invalid 
    opened by captainKeller 10
  • Feature: Sortierfunktion für Nachrichtenliste

    Feature: Sortierfunktion für Nachrichtenliste

    Die Ausgabe der Nachrichtenliste sollte um eine Sortierfunktion ergänzt werden, so dass über das Modul gesteuert werden kann, in welcher Reihenfolge die News ausgegeben werden.

    • absteigend (Datum)
    • aufsteigen (Datum)
    • A - Z (Titel)
    • Z - A (Titel)
    • Zufällig

    Früher gab es eine Erweiterung news_sorted. Aus meiner Sicht eine hilfreiche Funktion die in den Core integriert werden sollte.

    feature 
    opened by fenepedia 9
  • array_intersect(): Argument #1 is not an array

    array_intersect(): Argument #1 is not an array

    Under some circumstances it is not possible to enter the select-multiple mode for the non-admin user. The session's current IDs tends to be not an array and thus the array_intersect function fails:

    https://github.com/contao/news-bundle/blob/master/src/Resources/contao/dca/tl_news.php#L606

    defect 
    opened by qzminski 8
  • Tag news and news archive in 4.6

    Tag news and news archive in 4.6

    Here's the page example. Should be added on bothtl_news and tl_news_archive, imho.

    // Tag the response
    if (System::getContainer()->has('fos_http_cache.http.symfony_response_tagger'))
    {
        /** @var ResponseTagger $responseTagger */
        $responseTagger = System::getContainer()->get('fos_http_cache.http.symfony_response_tagger');
        $responseTagger->addTags(array('contao.db.tl_page.' . $objPage->id));
    }
    
    feature 
    opened by Toflar 7
  • A new version is saved even though no changes have been made

    A new version is saved even though no changes have been made

    I noticed that every time you save, a new version is created, although it hasn't been changed.

    It looks like the adjustTime callback handling the date and time input is causing this behaviour. When the form is submitted, the dc_table driver will first save the timestamps for each of these fields and the onsubmit_callback will add the two timestamp together and saves them again. This result in an always different timestamp when loading the form and when saving (e.g. the time input only return and save the seconds from midnight to the entered hours and minutes).

    This is the same in the calendar-bundle when time is added.

    I don't know a solution right now. One solution could be to use a single field with 'regx'=>'datim'. But that is not user friendly when time is not relevant.

    defect 
    opened by agoat 7
  • The alias-url of news with external target doesn't redirect

    The alias-url of news with external target doesn't redirect

    If you create a news-record with an external redirect, the newslist is linking the entry to the external ressource.

    The previously generated alias-url of the news-entry doesn't redirect you. The old url is still available and shows a 1 to the screen:

    image

    AFAIK this is a bug as the page-module is handeling this case correctly.

    feature 
    opened by ADoebeling 6
  • Fix alias generation

    Fix alias generation

    Under certain circumstances the id is appended to an auto-generated alias, although it would be unique without it. This happens when:

    • a news item with the alias field left blank is saved, but the first attempt to save it results in an error
    • an existing news item is edited, the alias field is cleared, but the auto-generated alias would be the same as before

    How to reproduce this in the online demo:

    1. Create a new news item
    2. Leave the alias field blank
    3. Select no author (or do anything else that will trigger a form error)
    4. Save
    5. Correct the error
    6. Save again The news item's alias will now contain the id, even though it would have been unique without it.

    As far as I can tell this is caused by the generateAlias method which only checks the number of the alias' occurencies. The case where the generated alias already exists, but actually belongs to the item for which it was generated is not handled.

    This issue might also apply to other bundles using the same logic (Events comes to mind)

    defect 
    opened by patrickjDE 6
  • RSS Teaser Image as media:content

    RSS Teaser Image as media:content

    Issue by @pswerbung February 16th, 2017, 15:29 GMT

    Können wir nicht das Teaser Image in zukünftigen Contao Versionen als <media:content> Element statt als <enclosure> einfügen?

    Dienste wie MailChimp könnten dann die Bilder aus dem RSS-Feed lesen und ausgeben. Das wäre wohl hier zu implementieren: https://github.com/contao/core/blob/3.5.24/system/modules/news/classes/News.php#L209-L218

    Was spricht dagegen?

    feature 
    opened by ghost 5
Owner
Contao
Contao Open Source CMS
Contao
A small library that provides functionality to PHP 8.1 enums to act as BitMask flags

PHP Enum BitMask A small library that provides functionality to PHP 8.1 enums to act as BitMask flags. Why? Sometimes you need some flags on the objec

FramJet 53 Dec 11, 2022
This bundle provides tools to build a complete GraphQL server in your Symfony App.

OverblogGraphQLBundle This Symfony bundle provides integration of GraphQL using webonyx/graphql-php and GraphQL Relay. It also supports: batching with

Webedia - Overblog 720 Dec 25, 2022
Pure PHP implementation of GraphQL Server – Symfony Bundle

Symfony GraphQl Bundle This is a bundle based on the pure PHP GraphQL Server implementation This bundle provides you with: Full compatibility with the

null 283 Dec 15, 2022
DataTables bundle for Symfony

Symfony DataTables Bundle This bundle provides convenient integration of the popular DataTables jQuery library for realtime Ajax tables in your Symfon

Omines Internetbureau 199 Jan 3, 2023
GraphQL Bundle for Symfony 2.

Symfony 2 GraphQl Bundle Use Facebook GraphQL with Symfony 2. This library port laravel-graphql. It is based on the PHP implementation here. Installat

Sergey Varibrus 35 Nov 17, 2022
An Unleash bundle for Symfony applications to provide an easy way to use feature flags

Unleash Bundle An Unleash bundle for Symfony applications. This provide an easy way to implement feature flags using Gitlab Feature Flags Feature. Ins

Stogon 7 Oct 20, 2022
Symfony Health Check Bundle Monitoring Project Status

Symfony Health Check Bundle Version Build Status Code Coverage master develop Installation Step 1: Download the Bundle Open a command console, enter y

MacPaw Inc. 27 Jul 7, 2022
Copy of hautelook/alice-bundle v2.9.0

AliceBundle A Symfony bundle to manage fixtures with nelmio/alice and fzaninotto/Faker. The database support is done in FidryAliceDataFixtures. Check

Global4Net Ltd. 3 Sep 10, 2021
A bundle providing routes and glue code between Symfony and a WOPI connector.

WOPI Bundle A Symfony bundle to facilitate the implementation of the WOPI endpoints and protocol. Description The Web Application Open Platform Interf

Champs-Libres 5 Aug 20, 2022
The maker bundle allows you to generate content elements, front end modules

Contao 4 maker bundle The maker bundle allows you to generate content elements, front end modules, event listener, callbacks and hooks using interacti

Contao 7 Aug 3, 2022
Mediator - CQRS Symfony bundle. Auto Command/Query routing to corresponding handlers.

Installation $ composer require whsv26/mediator Bundle configuration // config/packages/mediator.php return static function (MediatorConfig $config)

Alexander Sv. 6 Aug 31, 2022
The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs

NelmioApiDocBundle The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs. Migrate from 3.x to 4.0 To migrate from

Nelmio 2.1k Jan 6, 2023
Airbrake.io & Errbit integration for Symfony 3/4/5. This bundle plugs the Airbrake API client into Symfony project

AmiAirbrakeBundle Airbrake.io & Errbit integration for Symfony 3/4/5. This bundle plugs the Airbrake API client into Symfony project. Prerequisites Th

Anton Minin 8 May 6, 2022
Symfony bundle for EventSauce (WIP)

Symfony EventSauce (WIP) This bundle provides the basic and extended container configuration of symfony for the EventSauce library. Before using it, I

Andrew Pakula 8 Dec 19, 2022
Symfony bundle integrating server-sent native notifications

Symfony UX Notify Symfony UX Notify is a Symfony bundle integrating server-sent native notifications in Symfony applications using Mercure. It is part

Symfony 6 Dec 15, 2022
Bundle to integrate Tactician with Symfony projects

TacticianBundle Symfony2 Bundle for the Tactician library https://github.com/thephpleague/tactician/ Installation Step 1: Download the Bundle Open a c

The League of Extraordinary Packages 240 Jan 4, 2023
A Symfony bundle that provides #StandWithUkraine banner and has some built-in features to block access to your resource for Russian-speaking users.

StandWithUkraineBundle На русском? Смотри README.ru.md This bundle provides a built-in StandWithUkraine banner for your Symfony application and has so

Victor Bocharsky 10 Nov 12, 2022
SAML bundle for gateway, self-service, and ra

SURFnet SamlBundle A bundle that adds SAML capabilities to your application using simplesamlphp/saml2 Developed as part of the SURFnet Stepup Gateway

OpenConext 12 Dec 14, 2022
Single file PHP script that adds a REST API to a SQL database

PHP-CRUD-API Single file PHP script that adds a REST API to a MySQL/MariaDB, PostgreSQL, SQL Server or SQLite database. NB: This is the TreeQL referen

Maurits van der Schee 3.2k Jan 8, 2023