Questions tagged [blocks]
In Drupal, a self-contained collection of content and functionality that is displayed in theme regions is called block.
2,895 questions
0 votes
0 answers
48 views
How to avoid caching problems when "Remember the last selection" is used with Views exposed filters in block
The Views page display in question uses exposed filters in block, Better Exposed Filters, no AJAX. It is restricted to a particular role. The exposed filters all have "Remember the last selection&...
0 votes
2 answers
196 views
How can I disallow blocks and views from being cached by render cache?
I have read a couple of similar questions and tried various methods in these tickets to disable any caching for this particular page of the site in Drupal 10 to no avail. These included invalidating ...
-1 votes
1 answer
59 views
Decoupled Drupal with NextJs
Can we integrate nextjs in drupal. I have worked on next drupal headless. But I want decoupeled drupal next. I want to integrate nextjs in custom block of drupal like we do with reactjs. In the ...
-1 votes
1 answer
350 views
Multilingual menu links are displayed on all languages no matter the settings
Menu itself has no language, only menu links have language. This means that only links in selected language for current page should be shown. This is how it has worked since Drupal 7. But for some ...
1 vote
1 answer
289 views
Cache tags not bubbling up correctly in blocks
I have a custom block that contains a media field (field_featured_media). I noticed if the alt text of that image is updated, it does not reflect in my block unless the site cache is cleared. After ...
1 vote
1 answer
841 views
Layout builder + multilingual
I'm currently working on translating a D10 site based on Layout Builder to other languages. As I want the layouts to be the same in every language, but displaying just a translated version, I don't ...
0 votes
1 answer
214 views
The variation price isn't showing on the product page
When I go to a product page the price isn't shown. When logged in as admin I see 'This block is broken or missing. You may be missing content or you might need to install the original module.' and the ...
1 vote
1 answer
308 views
How to properly set up caching in a preprocess function for a block variation by node type?
I have a site that uses hook_preprocess_block to add a node content type/bundle variable for a block twig template. The template then has logic to display different HTML depending on the node type. ...
0 votes
1 answer
167 views
Is there a way to create a views block for layout builder where the admin filters the information to be show to the end user?
I have a views block where the views exposed filters is available to the end user. However, I need to allow the content editor to make the selection in the block (to be placed in layout builder) as to ...
0 votes
2 answers
147 views
Deprecated EntityBlock module preventing upgrade
I have a Drupal 9.5 site that I am attempting to composerize and upgrade to Drupal10. I created a Drupal10 site in a local environment, copied the site content over, and installed all the Drupal10 ...
1 vote
0 answers
87 views
How do I add a custom module block to any theme's bottom-most region programmatically?
I have a custom block in my custom module that I want to appear automatically at the bottom-most region of any theme. I want this to happen when the module is installed. Similar to how the 'Powered by ...
1 vote
1 answer
79 views
Parts of the Edit Page
I don't know Drupal, but I need to be able to talk about Drupal with someone and I don't know what to call things, and I can't figure this one out from the rest of the Internet. I have a Drupal 10 ...
0 votes
1 answer
99 views
Submitting an existing block or form in a modal doesn't work
I am trying to open either the simplenews subsription block or the corresponding form in a modal. I tried with both the form using the formBuilder service or the exising plugin-block and in both cases ...
0 votes
0 answers
204 views
Styling a "programmatically created block" in drupal 10
I'm new to Drupal dev, I'm messing around creating some custom modules and explore how the env of drupal 10 works... I've created a custom block that i called "Copyright": <?php declare(...
0 votes
0 answers
508 views
Edit existing custom blocks in layout builder
I have an issue with layout builder and existing custom blocks. When I insert existing custom block from custom block library (either create block inline in layout builder, clone it and then try to ...