🇬🇧United Kingdom @nigelwhite

Marsden
Account created on 11 July 2013, about 11 years ago
#

Recent comments

🇬🇧United Kingdom nigelwhite Marsden

Same as #91

Anon and administrator get full content. A lesser permission level gets 'span data-big-pipe-placeholder-id=....' on the second and third variants of views blocks

Drupal 10.3.2

🇬🇧United Kingdom nigelwhite Marsden

nigelwhite created an issue.

🇬🇧United Kingdom nigelwhite Marsden

I understand it now and it works great.

I've spent ages looking for a way so many thanks indeed.

🇬🇧United Kingdom nigelwhite Marsden

Yes, that would be helpful. If some kind person who has got through this step could detail a solution that would be great.

🇬🇧United Kingdom nigelwhite Marsden

Thanks for that idea. I just tested it again in a new simplytest.me.

  1. I added field 'When - start' to the view
  2. In Format Settings I put Start in both boxes (see screenshot 'both start.png')

The calendar displays but is empty of all events (single day and multi-day)

🇬🇧United Kingdom nigelwhite Marsden

Yes, that patch does the trick.

Many thanks

🇬🇧United Kingdom nigelwhite Marsden

Thank you for writing.

Our events (eg courses) last for months. We'd like a calendar which displays each event on its start date only. So, in the screenshot, the Multi day event would only appear on the 23rd and occupy only one day - just like the One day event.

We're using a Smart Date Range field.

You say, "By design an event will be displayed every day it occurs." So I guess this use case is out of scope?

🇬🇧United Kingdom nigelwhite Marsden

More information:

I've tested this on a vanilla D10 site. The behaviour is the same - ie an event with a range of several days will appear in the calendar on every day of its range. There appears no way of getting it to display only on its start date.

The field is still type = Smart Date Range but this time the settings are simpler -
- field storage is limited to 1 value so there is no 'multiple values' in the views field formatter. This removes one source of my confusion.
- the Smart Date Recurring module is not installed

What made no difference -
- grouping on the Smart date field
- adding a Smart date Start Date field - this did not show up in Month Settings
- add a entity_id field - all the events had id = 0
- add a content id field - though each event had its own id there was no grouping
- aggregation - no events in calendar

Maybe, after all, the calendar works as designed?? If someone could confirm it would put me out of my misery (-:

🇬🇧United Kingdom nigelwhite Marsden

Same problem here.
Some more detail, in case it's helpful --

Error
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Order report
The Address field needs to be updated.

Yesterday I used composer to update Drupal core-recommended from 10.1.6 to 10.2.2, and drupal/commerce from 2.11 to 2.37. This introduced a new dependency - commerceguys/addressing ^2.1.1.

Does this bug belong in commerceguys/addressing or elsewhere?

🇬🇧United Kingdom nigelwhite Marsden

nigelwhite created an issue.

🇬🇧United Kingdom nigelwhite Marsden

We still can't get a ui_pattern to save inside a layout_paragraphs container. Data can be entered in the pattern's fields but on Save the pattern vanishes. Go back into Edit and the pattern is gone.
Vanilla Drupal 9.5.8. The only modules present are ui_patterns, ds and layout_paragraphs + it's dependencies. ui_patterns and layout_paragraphs are both working on their own.
Error in logs
[error] 1895#1895: *871 FastCGI sent in stderr: "PHP message: Uncaught PHP Exception Twig\Error\LoaderError: "Template "modules/contrib/ui_patterns/templates/pattern-simpletext.html.twig" is not defined." at /var/www/html/web/modules/contrib/ds/templates/ds-entity-view.html.twig line 10" while reading response header from upstream, client: 172.24.0.6, server: , request: "POST /layout-paragraphs-builder/c141b322eb57d784c43020d991520c5a/choose-component?parent_uuid=c750c7c6-930f-4cbf-ac3a-830da4c3143e&region=first&_wrapper_format=drupal_dialog&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1", upstream: "fastcgi://unix:/run/php-fpm.sock:", host: "d9-vanilla.ddev.site:89", referrer: "http://d9-vanilla.ddev.site:89/node/add/section_paragraph_ui_pattern"

🇬🇧United Kingdom nigelwhite Marsden

Thank you for looking into it @andrewmriv. I'm glad it works for you - so maybe there's something funny in my environment that stops it working....... that is kinda hopeful.......

In response to your questions - yes ui_patterns outside of layout_paragraphs does work. Please see no. 2 in 'steps to reproduce'

To test the ui_pattern in isolation from layout_paragraphs........

test that it works by creating a content type 'Test Modal'
add the fields to the content type
set the layout for the content type as Modal
create a node of type Test Modal
save. It displays the modal button and clicking it opens the modal message.
Pass

still puzzling

🇬🇧United Kingdom nigelwhite Marsden

Patch #6 worked for me, thanks
Core 9.5.2
migrate_file_to_media 2.0.9

🇬🇧United Kingdom nigelwhite Marsden

I'd like to add some detail in case someone with more Drupal skills than me can make something of the symptoms

Steps to reproduce........

  1. create a ui_pattern eg Modal
  2. test that it works by creating a content type 'Test Modal'
    1. add the fields to the content type
    2. set the layout for the content type as Modal
    3. create a node of type Test Modal
    4. save. It displays the modal button and clicking it opens the modal message
  3. Crate a paragraph type and create the fields
  4. because we have ui_patterns_layouts module, in manage display we can select the layout 'Modal'
  5. in a different content type (eg Test) add an 'entity reference revisions' field
  6. call it 'components' or some such
  7. edit the field and allow Modal to be used in this content type
  8. select Layout Paragraphs widget in Form Display and Manage Display
  9. at last we can create a node of type Test
  10. add a Section and pick a layout
  11. inside the section, add a Modal
  12. we get the Modal form asking us to enter data in the fields
  13. save
  14. the modal is now showing in the text editor window
  15. save the node
  16. modal is gone. It's not in the DOM at all.

According to this documentation the two should work together

🇬🇧United Kingdom nigelwhite Marsden

Thank you for these ideas. [Coming back to this after a while, so sorry for the delay]

Two of your ideas worked for me. To summarize for any other site builders who are puzzled -

  • fields you want to format with your pattern must be plain text or link. Even then Drupal will add a load of html markup around your field, which will throw your pattern's twig
  • remove markup from all fields in your display as per #11. At the bottom of /admin/structure/types/manage/your-content-type/display you will find a Pattern Settings tab. Set Field Templates to 'Only content'.
  • remove markup from fields individually by installing nomarkup module as per #12. Each field's settings cog has a 'Remove field markup' option

For links -

  • in yml your link field is type 'uri'
  • in pattern preview this worked for me: preview: "<a href='https://example.com/'>Link to source</a>"
  • in the twig a simple {{ your-field }} is all you need
  • when adding content in the node add form the url and the link text are what you'd expect
Production build 0.71.5 2024