Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fehlermeldung bei Update auf Contao 4.11 #9

Closed
seibtph opened this issue Feb 11, 2021 · 5 comments
Closed

Fehlermeldung bei Update auf Contao 4.11 #9

seibtph opened this issue Feb 11, 2021 · 5 comments

Comments

@seibtph
Copy link

seibtph commented Feb 11, 2021

Beim Update des NATURE Theme (die eure Erweiterung als Abhängigkeit hat) auf Contao 4.11 bekam ich folgende Fehlermeldung:

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct(), 0 passed in C:\laragon\www\nature49\vendor\netzmacht\contao-font-awesome-inserttag\src\DependencyInjection\Configuration.php on line 44 and at least 1 expected in C:\laragon\www\nature49\vendor\symfony\config\Definition\Builder\TreeBuilder.php:26
Stack trace:
#0 C:\laragon\www\nature49\vendor\netzmacht\contao-font-awesome-inserttag\src\DependencyInjection\Configuration.php(44): Symfony\Component\Config\Definition\Builder\TreeBuilder->__construct()
#1 C:\laragon\www\nature49\vendor\symfony\config\Definition\Processor.php(50): Netzmacht\Contao\FontAwesomeInsertTag\DependencyInjection\Configuration->getConfigTreeBuilder()
#2 C:\laragon\www\nature49\vendor\symfony\dependency-injection\Extension\Extension.php(111): Symfony\Component\Config\Definition\Processor->processConfiguration(Object(Netzmacht\Contao\FontAwesomeInsertTag\DependencyInjection\Configuration), Array)
#3 C:\laragon\www in C:\laragon\www\nature49\vendor\symfony\config\Definition\Builder\TreeBuilder.php on line 26

Durch Anpassung der Funktion in der Configuration.php konnte ich den Fehler lösen:

$treeBuilder = new TreeBuilder('netzmacht_font_awesome_insert_tag');

$treeBuilder
    ->getRootNode()
    ->children()
        ->scalarNode('icon_template')
        ->end()
        ->scalarNode('stack_template')
        ->end()
        ->scalarNode('default_style')
        ->defaultValue('fa')
        ->end()
        ->end();

return $treeBuilder;

Habt ihr die Erweiterung schonmal für Contao 4.11 getestet? Diese erscheint ja am Montag.

@dmolineus
Copy link
Member

dmolineus commented Feb 11, 2021

Die Erweiterung ist derzeit nicht kompatibel mit symfony/config ^5.0. Da leider keine Abhängigkeiten definiert sind, kommt es zu dem Fehler. PRs sind willkommen.

@seibtph
Copy link
Author

seibtph commented Feb 11, 2021

Ok, ich habe da mal einen Pull Request angelegt.

@ro-a-fi
Copy link

ro-a-fi commented Feb 21, 2021

Ist der Fehler durch den PR behoben? Ich erhalte gerade bei einigen Themes dasselbe Problem mit Contao 4.11-ern. Danke für eure Bemühungen 👍

@seibtph
Copy link
Author

seibtph commented Mar 2, 2021

Für Contao 4.11 zumindest ging es, aber das verursacht noch Probleme mit Contao 4.4. Man kann aber in der composer.json folgende Zeile unter require hinzufügen, dann sollte es auch klappen: "symfony/config": "4.4.*"

@dmolineus
Copy link
Member

Release 2.1.1 is Contao 4.9 compatible only and includes the fix, see 2.0.1...2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants