Closed (fixed)
Project:
UI Patterns (SDC in Drupal UI)
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jan 2025 at 14:06 UTC
Updated:
24 Jul 2025 at 10:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
grimreaperComment #3
grimreaperAfter commenting out in Context.php:
Now it is a new fatal in attachment...
Comment #4
pdureau commentedComment #5
christian.wiedemann commentedComment #6
christian.wiedemann commentedHi @grimreaper, I can't reproduce this bug. I tried to install sobki_profile_dsfr but was not sucessful.
Can you give me a hint to install it.
Comment #7
christian.wiedemann commentedComment #8
pdureau commentedComment #9
grimreaperIt is on the sobki_profile_bootstrap that there is a problem.
And more precisely on the MR on #3485615: [10.1.x] Upgrade to UIP2.
Comment #10
grimreaperComment #11
grimreaperHello,
I made some dichotomy to isolate the problematic configuration. by deleting all core.entity_view_display.* config and then reputting it one by one until failure during installation.
So when I list problematic config, it is when one of this config is present I have the bug.
With the following config:
Failure after install_import_translations during install_configure_form:
[error] InvalidArgumentException: Field user_picture is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 616 of /project/app/core/lib/Drupal/Core/Entity/ContentEntityBase.php).With the following config:
Failure after install_profile_themes during install_install_profile:
The 'entity:block_content' context is required and not present.With the following config:
Failure after install_profile_themes during install_install_profile:
Without all those problematic config, during installation even if installation is successful I have the following warnings:
Also before encountering config bugs, I had to edit app/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php:
Otherwise there was a fatal with the array_rand in this method.
I hope that all those elements will help the debugging.
Maybe we can figure out common points with those configs.
Comment #12
pdureau commentedFixed in #3498456: [2.0.0-rc2] PHP warnings with computed fields according to https://www.drupal.org/project/ui_patterns/issues/3498456#comment-15951405
Comment #13
grimreaperWith current MR, I no more have the following errors:
- The 'entity:block_content' context is required and not present.
- [error] TypeError: Drupal\ui_patterns_field_formatters\Plugin\UiPatterns\Source\FieldFormatterSource::createInstanceFormatter(): Argument #2 ($field_definition) must be of type Drupal\Core\Field\FieldDefinitionInterface, null given,
Without editing app/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php, I no more have the associated fatal.
Warnings about block plugins not found remains but not a blocker and already there with UIP1 (not exactly the same but you guessed the point).
So remains:
I will check my translatability configs.
Thanks! Huge step forward!
Comment #14
grimreaperCelebrated too early.
I still got:
Comment #15
christian.wiedemann commentedI checked that also, but I thought it is not UI Patterns related.
But "Maybe" this happens because we call createInstance during calculateDependencies and the field is not setup correctly during that. Will check it.
Comment #16
pdureau commentedComment #17
grimreaperFor
Field user_picture is unknown, Currently I am removing the user_picture field from Sobki. I think this problem is core because I saw similar issues on other projects but no issue on core.Currently MR is too big.
So when merged in another issue I will re-add user_picture and demonstrate it is problematic.
But array_rand error remains.
Comment #18
grimreaperI fixed errors with default content that I changed manually.
Now only remains array_rand
Comment #20
christian.wiedemann commentedWe found the problem behind the ImageRand bug. The Image SVG Module generates an SVG sample value while saving a layout. This sample generated entity leads to this bug. See issue https://www.drupal.org/project/svg_image/issues/3170319
I tested the workaround mentioned in the issue:
I add to
Comment #21
christian.wiedemann commentedComment #22
grimreaperThanks! I confirm the workaround is working.
Updating Sobki MR.
Comment #23
pdureau commentedComment #25
christian.wiedemann commented