/r/drupal

Photograph via snooOG

The place for news, articles, and discussion regarding Drupal and Backdrop, one of the top open source (GPL) CMS platforms powering millions of websites and applications, built, used, and supported by a diverse community of people worldwide.

More Info: http://drupal.org and https://backdropcms.org

Check out the sidebar for our AMA schedule, or view our past AMA's.


Welcome to r/Drupal

The place for news, articles and discussion regarding one of the top open source (GPL) CMS platforms: Drupal.

More Info: Drupal.org


Previous AMA's:

Latest AMA:

  • Mike Gifford (Accessibility Core Maintainer Drupal 8) – Click Here

Upcoming AMA's:

  • When would you like to start? Let us know!

Would you or someone you know make for an interesting Drupal AMA? Message the mods.


Weekly rotating posts

  • Monday: Beginner questions - no question is too easy.
  • Tuesday: Triumphant Tuesday - post recent Drupal successes and site launches
  • Wednesday: Contrib modules chat - Talk about recently tried modules, recommendations, warnings, etc.
  • Thursday: Development questions & discussion - Coding questions go here. Anything dev-related goes.
  • Friday: Useful things to know - Things you wish you had known earlier about Drupal.

Drupal Resources


Rules & Requests

Please no job ads. If you wish to post something of that nature we suggest you check out Drupal.org's paid services job board


Our Friends

/r/drupal

15,994 Subscribers

0

Mini Kanban AI Agents - Content Types and Field Types

0 Comments
2024/05/20
15:26 UTC

11

ECA + Drupal Recipes = Pure Butter! (Project Update)

5 Comments
2024/05/20
12:35 UTC

1

How hard is it to fix a theme that worked in 9 but upgrade status shows issues for the migration to durpl 10?

This is the evaulation: https://www.gelaendespiele.ch/single-export-gavias_kunco-2023-12-10T00%2031%2024+0100.html

How difficult or easy is it to migrate this to Drupal 10? If it's doable, how do I approach this? Or is it time to search for a new Theme?

7 Comments
2024/05/19
22:27 UTC

0

Aider : the production ready AI coding assistant

0 Comments
2024/05/19
18:51 UTC

4

Drupal newbie

Hi, for context, I am a full stack developer familiar with PHP but I have never worked with Drupal before.
A client has asked me to redesign their website, which is built with Drupal. They want to change the design but also make it possible to add articles and images themselves in the simplest way possible. How complex is Drupal to get started with for implementing this?

26 Comments
2024/05/19
14:51 UTC

2

Deep crawling using AI Interpolator

0 Comments
2024/05/16
19:34 UTC

3

Editoria11y dismissals table missing

Hey all,

I'm attempting to utilize the Editoria11y module, but it keeps breaking my site. I get the below error:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pvcc_drupal.editoria11y_dismissals' doesn't exist: SELECT "editoria11y_dismissals"."uid" AS "uid", "editoria11y_dismissals"."result_key" AS "result_key", "editoria11y_dismissals"."element_id" AS "element_id", "editoria11y_dismissals"."dismissal_status" AS "dismissal_status", "editoria11y_dismissals"."page_path" AS "page_path" FROM "editoria11y_dismissals" "editoria11y_dismissals" WHERE "page_path" = :db_condition_placeholder_0; Array ( [:db_condition_placeholder_0] => /users/dstach ) in Drupal\editoria11y\DismissalsOnPage->getDismissals() (line 50 of /var/pvcc-drupal/web/modules/contrib/editoria11y/src/DismissalsOnPage.php).

Is there an easy fix for this? Relatively new to Drupal, so if it's something obvious, I don't know what I don't know! Thanks in advance!

3 Comments
2024/05/16
17:47 UTC

1

How do I alter existing config?

I created this issue and created a patch. Comment #4 was asking if this should migrate unchanged configs so I put together some code and ran it under devel_php but it doesn't seem to work. Can you help?

Code in question:

$config = Drupal::service('config.factory')->getEditable('webform.settings');
$messages = ['default_form_access_denied_message', 'default_submission_access_denied_message', 'file_private_redirect_message'];
foreach ($messages as $message) {
    $config->set($message, 'Please log in to access this form.');
    $config->get($message);
    $config->save();
}
10 Comments
2024/05/16
14:45 UTC

1

Is there a module that will enable easy use of flexboxes for non-HTML savy content editors?

We want to become more mobile friendly while increasing our use of graphics and media for engagement. Is there a module that can enable flexboxes for easy use for content editors that are not comfortable getting into the HTML in the WYSiWYG?

4 Comments
2024/05/16
14:37 UTC

6

A new slack channel for "rsvp-system", also the Gitlabs Project Page is online

rsvp-system.org
An Open Source Drupal project focused on building advance reservation systems.

https://gitlab.com/rsvp-system/rsvp-system

... more soon.

5 Comments
2024/05/16
03:37 UTC

3

Anyone using the Gutenberg editor with D10?

Admin of a Drupal 10 site with several content editors that have recently come over from Wordpress. They absolutely hated CkEditor 5, so I installed the Gutenberg editor for creating/editing Articles. They are happy, and it was an easy fix.

Today I find an issue with Gutenberg and the Media library. Seems that when they add images to Articles via the Media library, the alt tag they enter in the editor does not save to the record. It does save to the node, so it is available for that specific Article.

Viewing the image in Admin -> Content -> Media displays a blank Alternative Text field. Furthermore, creating a second Article and importing that image using the Media library displays a blank Alt Text field for that image, so the alt field they entered on the original article is not available for subsequent Articles.

Thinking I may have a conflict with another module on a site that was not built around Gutenberg, I tested this issue on a fresh install of Drupal 10. Blank site with no records. Installed Media and Media Library, and then Composer installed Gutenberg module. Testing produced the same results, alt text saves to the node but not to the Media Library, so it's not a site/module conflict.

Anyone else using Gutenberg editor and running into this issue? Appreciate any info you might be able to share.

7 Comments
2024/05/15
15:41 UTC

0

Looking for remote work

I am a Drupal dev that's drowning in debt. Looking for a full time remote position in either the US or Canada.

I've been looking for about a year and a half. Is something happening that I'm not aware of?

10 Comments
2024/05/14
20:53 UTC

1

Twig - external URL without lang prefix

Hi,

I have a Drupal 9 site, with two languages.

In a Twig template, I simply write an `a href` with an external URL.

If I navigate in the primary lang, the link is good, but if I navigate in the second lang, the lang pref is added to the `a href`.

The code :

<li><a href="https://exemple.com">Exemple</a></li>

The result in primary lang :

https://exemple.com

The result in secondary lang :

/en/https://exemple.com

I tried to use {{ link }} like {{ link('Exemple', 'https://exemple.com') }} but same result.

Is there any easy solution to that ?

EDIT :

As I did not (already?) find a clean Drupal solution, I used some Javascript to correct the href after the page load.

8 Comments
2024/05/14
20:48 UTC

1

custom D9 module update

hi, i was wondering if i have a custom D9 module, is it possible to use this module also for D10 and D11 without changing any code?

9 Comments
2024/05/14
20:27 UTC

1

Bulk node creation or streamlined entry

I'm working on a site to track business expenses.

I have a content type Expense, with fields for the amount and date, with a document media reference.

Using Views Aggregator Plus, I can search for items in a period and see a table with the total amount.

I have Views Add Button to create a new expense at the top of the page. This navigates to the node add form, and saving it goes back to the table.

The scenario is I need to enter a bunch of expenses and want a streamlined way to do it.

If this was a spreadsheet, I would just hit tab and enter to navigate around quickly. I'm looking for a similarly streamlined editing experience.

One thing I'm picturing is that the add button would add a new row to the table, with input fields for the data, and a way to save it. I'd like to be able to add multiple at once. Being able to edit existing content this way would be awesome.

If that's too tricky, I'll try one of the modal modules to add the new item in a popup and refresh the results. This is a little nicer, but won't really make things faster.

I see modules that let you export content, make changes, and reimport. That might be necessary if there are no other solutions, but I'd prefer to avoid it.

Any other tips/ideas?

14 Comments
2024/05/14
16:47 UTC

4

Justice Department Rule for Accessibility

https://www.justice.gov/opa/pr/justice-department-publish-final-rule-strengthen-web-and-mobile-app-access-people

This was a link that I learned about from folks at Drupalcon.
Dropping in case anyone missed, or has comments.

( The other thing I heard at Drupacon, people sharing their appreciation for the hard work accessibility teams have put into Drupal. )

1 Comment
2024/05/14
15:53 UTC

2

Drupal change my front

i did create a app with Drupal 10 using the base theme Olivero 10.2.4 .

But i don't know how to change pages:

  • Views
  • Blocks
  • Nodes
  • Content
  • ...

Do i need to modify the themes ?

is there a directory with all my front files ? i only find weird named files.

Do i need to use the twig development mode ?

I ask all those questions because i remember helping a friend on a old Drupal 8, and i did change some HTML/CSS.

4 Comments
2024/05/14
12:13 UTC

1

RE Recipes .... What if they were a special Content Type?

Curious what people think. If Recipes were a special Content Type, then People would instantly be able to browse and understand them. A Views based UI paired with a Content Type would be super flexible.
(But it'd take buy-in from the community.)

Thoughts ?

PS: Drupal Views are the Jelly in Life : -)

19 Comments
2024/05/14
12:06 UTC

2

Drupal Individual Membership questions

Hi everyone,

I just signed up and purchased an individual recurring membership. How do I get the following:

  1. Get a membership badge?
  2. Get discount codes to being a member?
  3. Be searchable in the Drupal member directory?
  4. Link my Classy account to my Drupal.org account

Thank you.

4 Comments
2024/05/13
19:24 UTC

2

Using filter groups in views

I need a view to list all nodes of a certain content type (Article), as well as all nodes with a certain taxonomy term (Big).

I set up two filter groups, like this:

Content type = Article

OR

Taxonomy term ref = Big

The view only ever shows the Articles, but not the other nodes assigned to the taxonomy term.

13 Comments
2024/05/13
17:53 UTC

1

Is there a module to export content as a formatted excel sheet?

Not trying to build anything if it doesn't exists. But for my work I have to fill out excel spreadsheets every month for about 25 clients and there are like 10 fields of info that are already in Drupal. If

Is there a module that allows me to export content fields into certain cells of a spreadsheet so it experts into the correct formatted excel sheet required by finance?

10 Comments
2024/05/10
23:09 UTC

2

Anybody use the Visitors Module? What data can you see?

I'm looking at alternatives to Google Analytics and have a bias towards open-source locally hosted options.

https://www.drupal.org/project/visitors looks appealing. Does anyone know if there's screenshots or a video demo of the analytics?

Other ideas would be be very appreciated.

2 Comments
2024/05/10
20:55 UTC

1

Limiting views with multiple entity references to same langcode

Hi everyone,

I am using Drupal 10 and have a site which is translated into EN/FR.

I am building out a view which will have 3-4 relationships via field_associated_mything1,2,3,4. Usually to ensure I get the (E.g.) EN translation for content referenced by field_associated_thing1 I would add a translation language filter criteria for the relationship.

In this case, I can't guarantee that I will necessarily have a value in field_associated_thing1 and because of this translation language filter being in place, my node doesn't show.

Is there something I can do in a hook_views_query_alter() to alter my query to only filter on \Drupal::languageManager()->getCurrentLanguage()->getId()?

Here is how the query outputs when I have no translation filters in place (and Rendering language is interface text selected for page)

I am suspicious the bold part is what is returning the EN and FR entity ref field but I am not sure how/where I could configure this so that it doesn't add the OR

LEFT JOIN {node__field_associated_thing1} "node__field_associated_thing1" ON node_field_data.nid = node__field_associated_thing1.entity_id AND node__field_associated_thing1.deleted = '0' AND (node__field_associated_thing1.langcode = node_field_data.langcode OR node__field_associated_thing1.bundle = 'mycontenttype')

Appreciate any advice from multilingual pals!

In the meantime I am going to try grouped filters but since I have several references which could potentially not exist it is a scary undertaking.. it's all in service of a calendar-style module so I'd really like to avoid embedding more views within to get this data

0 Comments
2024/05/10
14:58 UTC

Back To Top