just_like_good_vibes → created an issue.
For Display suite users, one can look at the solution shown in
that issue
📌
Compatibility with UI patterns 2
Active
. It will be implemented in the future in ui_patterns_ds
module.
we found the solution.
one needs to implement
function ui_patterns_ds_preprocess_ds_entity_view(&$variables) {
if (isset($variables['content']) && isset($variables['content']['#entity']) && isset($variables['content']['#source_contexts'])
&& is_array($variables['content']['#source_contexts']) && !isset($variables['content']['#source_contexts']["entity"])) {
$variables['content']['#source_contexts']["entity"] = \Drupal\Core\Plugin\Context\EntityContext::fromEntity($variables['content']['#entity']);
}
}
more goodness pushed :)
just_like_good_vibes → made their first commit to this issue’s fork.
i just added some more fixes..
would you test please ?
expect an answer and new version very soon, within minutes :)
just_like_good_vibes → made their first commit to this issue’s fork.
just_like_good_vibes → created an issue.
For the moment, let's catch context exceptions and send a message to drupal logs...
just_like_good_vibes → created an issue.
+1
Thanks for reporting.
After investigation, this error occurs when using the contrib module ds, when a layout from ui patterns is configured in a content entity display (here a paragraph), and in the layout settings, a source with the current entity is used.
it works in form configuration, but fails to properly render.
Indeed, for the moment, ui_patterns module is not providing itself a way to guess the current entity inside ds_entity_view layout options.
just_like_good_vibes → made their first commit to this issue’s fork.
cool, i merge
i will take it
There is no "Reference entity" source ?
if you mean "Referenced entities", no it's not the same :)
i take this
ok :) thanksss
hello, i will take the current work and adds some tests for it
hello, do we need to add some tests for it ? i can make it just in case, let me know.
just_like_good_vibes → created an issue.
for me, work as expected right now.
maybe this should be configurable in the field formatter?
i will do this
just_like_good_vibes → created an issue.
ok, i fixed it.
i also added a phpunit test.
Hello,
i will take back this issue and publish the fix.
coool :)
here we go :) normalization of slot, a new add-on. Stronger than before :D
or maybe just a core bug...
see Drupal\Core\Render\Element::isRenderArray
called from ComponentElement::generateComponentTemplate
, line 112. the line Element::isRenderArray($slot_value)
is generating the error.
This is an horrible SDC bug...
there is a complex render array generated by the comments block, without any comments.
At a certain depth in the render array, there an an empty array as the value of key "comments".
empty arrays are not considered render arrays, and the whole array structure is then considered not being a render array,
and SDC fails with WSOD.
i propose to create a workaround for that case in ui_patterns, but that's clearly not our role.
We will help users, to keep protected from SDC being too strict :(
@grimreaper, would you try something for me ?
in the src/Element/ComponentSlotForm.php
, in function buildComponentDropbutton
(around line 400),
add a first line return $elements;
.
Then it seems everythings works, could you confirm please?
would you have some feedbacks about dropdowns please :) ?
please add more details to the usecase, not very clear how to reproduce :)
Yes, because in fact, no matter which block is used in Layout builder, as soon as we have a slot (for example in a component block in LB), and the dropdown button to add a source, it does not work anymore.
If i desactiveate the dropdown button, and repace it to a list of buttons, then ajax works again.
so the problem you encountered is clearly related to how dropdown are handled here in ui_suite_bootstrap.
Maybe we are not constructing well the dropdown ? i don't have the final answer yet
just a question, i am not sure about it : would it be related to how dropdown buttons are managed in bootstrap?
Please note, it seems it is not happening with theme ui_suite_dsfr for example.
looks ok for merge. then i just rebased to prepare merge
just_like_good_vibes → made their first commit to this issue’s fork.
i updated the code, would you test again?
back to it
Option 5
just_like_good_vibes → created an issue.
let's note, we clean the data for normalization but not everything.
g4mbini → credited just_like_good_vibes → .
- we need a comment into the convert to indicates normalization will clean bad strings
- update noramlization to clean properly
ok, seen during the weekly
we will deprecate the "HTML class source", still usable the same way.
but, the recommended source is Attributes, and the processing of the value is more elaborate.
we check if "=" sign is inside the value,
- if yes : in the attributes string format
- otherwide : a list of classes
so validation and getPropValue are changing for the better :)
let's update also the default source
i don't know why it's for me, i send it back to christian :)
i added a few minor changes.
and removed the unwanted tests. please review Christian :)
should we rename some props ?
we need to address this more carefully, the initial work posted by sourav_paul did not carefully check for existing attributes in the tags.
just_like_good_vibes → created an issue.