- Issue created by @SirClickALot
- π¦πΉAustria maxilein
Maybe this is a work around, until there is a solution https://www.drupal.org/project/field_group/issues/3452325#comment-15630502 π Twig\Error\LoaderError: Template "modules/field_group/templates/field-group-html-element.html.twig" is not defined Fixed
- π§πͺBelgium nils.destoop
Did you clear the cache after update? As I'm having no problems on 10.3. Your PHP error says it only received 3 arguments, while the service definition is declaring 4.
- π¬π§United Kingdom SirClickALot Somerset
RE #4
I have just performed a
composer require 'drupal/field_group:^3.6'</code, upgrading from the <code>3.4.0
that I rolled abck to and I am back in the same place, even after a doubledrusr cr
[03-Aug-2024 13:44:42 UTC] Uncaught PHP Exception ArgumentCountError: "Too few arguments to function Drupal\field_group\FieldGroupFormatterPluginManager::__construct(), 3 passed in <Site>\core\lib\Drupal\Component\DependencyInjection\Container.php on line 261 and exactly 4 expected" at C:\Users\nick\Sites\bit-by-bit.org\public_html\modules\contrib\field_group\src\FieldGroupFormatterPluginManager.php line 37
System otherwise as in the orignal post.
Roll back to
3.4.0
followed by a doubledrush cr
and we're back in business. - π¦πΉAustria maxilein
I also use these 4 patches:
But 2 of them don't apply since I think 3.4."drupal/field_group": { "Ensure visibility of invalid fields JS = TRUE #85": "patches/fieldgroup_2787179_ensure_visibility_of_invalid_fields_6.patch", "Horizontal vertical tabs set default tab to last item with #open = TRUE #2": "https://www.drupal.org/files/issues/2020-04-23/3130339-2.patch", "Nested groups render on other entity forms (or when fields are inaccessible) when they shouldnt #17" : "https://www.drupal.org/files/issues/2023-01-12/3098550-17.patch", "Add classes to JS rewriting in horizontal tabs" : "https://www.drupal.org/files/issues/add_classes_js-2936973-2.patch" },
- π¬π§United Kingdom SirClickALot Somerset
Got you, but then I think you'll agree that since I never applied any patches at all, that your affirmation that 3.5.0 is good to go as-is, is questionable.
- π¦πΉAustria maxilein
Yes maybe. I never tested if any of these patches makes a difference...
- π¬π§United Kingdom SirClickALot Somerset
OK, I've done some mre experimenting here and here's what I've found...
1) Clean, new Drupal 10 site, installed 3.6.0 - no problems at all so in that sense agree with #4
However,
2) Existing 10.3 site where FieldGroups are used prolifically, updating to 3.6.0 immedaitely causes the same fatal errorβ¦
[06-Aug-2024 08:17:26 UTC] Uncaught PHP Exception ArgumentCountError: "Too few arguments to function Drupal\field_group\FieldGroupFormatterPluginManager::__construct(), 3 passed in <site>public_html\core\lib\Drupal\Component\DependencyInjection\Container.php on line 261 and exactly 4 expected" at C:\Users\nick\Sites\bit-by-bit.org\public_html\modules\contrib\field_group\src\FieldGroupFormatterPluginManager.php line 37
So might it be possible that on my existing some other 'plugged in' code is triggering the call to line 37 in
src\FieldGroupFormatterPluginManager.php
but not supplying the fourth argument?Either way, it's definitley an issue and needs some mitigating action I think to deal with the missing
ContainerInterface $container
on the constuctor call? - π¬π§United Kingdom SirClickALot Somerset
OK, I've got it.
Following my own logic from #9 I took a look at which other modules might be providing a Formatter and traced the problem to the Field Group Popup module β .
I'll raise an issue there.
Might be worth leaving this onpe as it may help others to diagnose.
- π¦πΉAustria maxilein
Following your way I found these two modules installed:
Field Group Markup
Field Group Table - First commit to issue fork.
- Merge request !72Update FieldGroupFormatterPluginManager.php to remove unnecessary comma causing white screen. β (Open) created by brayn7
- πΊπΈUnited States brayn7 Lexington, Ky
Try out the patch i created just removing a comma in the manager constructor. @SirClickalot
- π¬π§United Kingdom SirClickALot Somerset
@bryan7 β RE the patch from your MR#72 - nice work, all sorted now, Field Group Popup was not the offender!
Thanks - Status changed to Needs work
3 months ago 7:58am 28 August 2024 - π§πͺBelgium nils.destoop
The trailing comma should not be the cause of your fatal error, as this is a coding standard. The pipelines are now failing because of this: https://git.drupalcode.org/issue/field_group-3465611/-/jobs/2465176
- π¬π§United Kingdom SirClickALot Somerset
@nils.destoop,
Maybe not in theory Nils but the patch to remove the trailing comma did immediately fix the situation and enabled us to start using the Field Group PopUp module again and in reality it's the latter that matters ;-)I'm curous though, a traiing comma after the last parameter in a function's parameter list?
We used to do that a fair bit in the old days in PHP as I remember but doing so is at odds with what do elsewhere β for example in composer.json. I have updated this module to the latest released version 3.6 with core 10.3. I do not see this issue. Looks like it has been fixed.
- π¬π§United Kingdom SirClickALot Somerset
I think you will only see the issue if you are using third-party modules that extend the use of the Field Group module.
- Status changed to Closed: cannot reproduce
3 months ago 7:28am 8 September 2024