/r/drupal
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.
The place for news, articles and discussion regarding one of the top open source (GPL) CMS platforms: Drupal.
More Info: Drupal.org
Would you or someone you know make for an interesting Drupal AMA? Message the mods.
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
/r/drupal
Hey everyone!
I was offered a gig to adapt a megamenu (html+css+js already created) into a drupal theme.
The client wants it to be customizable, aside from the obvious logo position, there’s number of columns, ability to highlight sections, give it backgrounds, featured images.
How would you go on to build this?
So far in the last 3 years doing Drupal, i’ve never done something like this, so, if anyone could shed some light i’d appreciate it.
A client of mine is transitioning from Bootstrap to the https://designsystem.digital.gov/ while staying on Drupal 10. They’re also interested in a headless architecture.
After researching, it seems that Next.js + Drupal https://next-drupal.org/ is the recommended approach. I successfully set up JSON:API and can fetch data into my Next.js app.
However, I’m running into challenges integrating USWDS properly into my Next.js project. Has anyone implemented USWDS in a Next.js environment before? Any guidance on best practices, configuration, or potential pitfalls would be greatly appreciated!
Love, love Drupal CMS. So many basic & time-consuming configs are taken off my plate, in particular a big set of responsive image types. The Gin Admin interface with the dashboard, Media and side bars is SOOO much better than Claro... The Drupal admin experience is now much, much better than WP!
The biggest gap in Drupal CMS is that Webform is not yet released for D11, and that module is pretty essential for real form building. I'm working with the Dev releases of Webform, but not on my production websites.
I have a sandbox site with Drupal 11, CiviCRM, and my normal Radix-based subtheme.
I found it easy-peasy to add responsive image styles to it:
mkdir recipes
composer require drupal/drupal_cms_image
cd web
php ./core/scripts/drupal recipe ../recipes/drupal_cms_image -v
Then, I quickly changed my content type displays to D-CMS's well-behaved responsive images.
So I asks myself: what else can I add from Drupal CMS?
It is definitely easier to do the standard Drupal CMS install. And TBH it took some running down rabbit holes to get the recipes I wanted to load ... In the end, I was able to load many if not most of the recipes via the composer process, above. Some configuration conflicts along the way, as it isn't obvious which order you should install the recipes to avoid them. It would have been better to read through the dependencies.
One tip is to "composer require" the regular Drupal modules called for in the Drupal CMS recipes I found my stock installation. Taking that off the drupal_cms_xxx requires, made the recipes install faster, and broken installs easier to clean up.
Hi, I'm new at Drupal-10.4.
I want to create Layout-Builder sections I can place Content-Blocks (or any kind of Block) into which are rendered as a media-style. I've been at this for days and no matter what I try, the image is not rendered on the section when Viewed. I do notice if I create a Thumbnail type on the node hosting the sections, I can see it's field in the Layout-Builder (add-block) editor and actually use it as an Image source. Unfortunately, I can't change the image but I do have control over which media type is rendered, etc.
Is there any way to render a media-style Image in a block using Fields, not HTML? And, yes, I created custom media types but that didn't work for me either...
TIA
I have a project for a artist directory, user will create a node for an artist profile, the node title will be the artist name. the problem is we always receive the same artist node from different submission, many users are submitting node for the same artist. what's the best option in drupal 10 to prevent this ?
My understanding is :
1: If able to check the same node title in the system when user inputting the node title.
2: if able to stop the submission when user saving the same artist node.
Please suggest if you know there are modules that can make this work. Thanks
What is the best/correct way to change the conditions in a Search API query in code? It looks as if what I may need is SearchApiQuery, which lets me get where by reference, but it doesn’t seem as if any hooks are using that. I basically need to add additional filters if our user is on http://siteB.sitename.com instead of siteA.sitename.com.
I'm part of a focus group that is evaluating Github Copilot in very specific environments/platforms. My chosen platform is Drupal.
As a senior Drupal developer, I feel it's in my best interests if I show ways that AI can't replace me (or you, for that matter) if I can.
Specifically, what I'm looking for are questions or requests that will elicit responses that:
Here are two examples I've tried so far:
Prompt: I need my Drupal site to allow uploads of CSV files, replacing some values in the CSV, and mapping the CSV's columns to fields on a node.
What it gave me: Build a custom module that adds a form; use logic in the form to modify field values; then use a hook to add the form to a page.
The correct answer: Use one of the well-known and robust contrib modules like Feeds and Feeds Tamper.
Prompt: Help me modify this Twig template (field--text.html.twig) in the core theme Olivero to add a <div> wrapper.
What it gave me: It walked me through modifying the Twig file
The correct answer: never modify anything in core; instead use a custom theme that extends Olivero and follow the steps to override a template.
Anyone else have suggested challenges that AI is likely to solve in a non-Drupal way that causes problems or creates tons of additional work?
New to drupal so thanks (in advance) for patience!
My (possibly dumb) question: Is there a way to copy a component from one page to another?
I have a remote server that POST's a request to my d10 site.
If i directly in index.php output file_get_contents("php://input"); it's containing the POST body data.
I have a custom controller that receives the request (order/xml), and data from file_get_contents('php://input") is empty, same is Request $request->getContent().
Is that due to a CORS issue ?
My cors settings is
cors.config:
enabled: true
# Specify allowed headers, like 'x-allowed-header'.
allowedHeaders: ['x-csrf-token','authorization','content-type','accept','origin','x-requested-with', 'access-control-allow-origin','x-allowed-header','*']
# Specify allowed request methods, specify ['*'] to allow all possible ones.
allowedMethods: ['POST, GET, OPTIONS, DELETE, PUT']
# Configure requests allowed from specific origins. Do not include trailing
# slashes with URLs.
allowedOrigins: ['*']
# Configure requests allowed from origins, matching against regex patterns.
# Sets the Access-Control-Expose-Headers header.
exposedHeaders: []
# Sets the Access-Control-Max-Age header.
maxAge: false
# Sets the Access-Control-Allow-Credentials header.
supportsCredentials: false
EDIT: From my local development server, i can make the same request to the server, and it works.
Hello Everyone,
I'm working on a contract where I need to deploy a Drupal website to AWS. I decided to go the Elastic Beanstalk route, following this guide for a test run:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/php-hadrupal-tutorial.html
However, I'm getting an error related to EFS failing to mount. I'm quite confident it is coming from one of the infrastructure as code file in the .eb folder. Have you guys ran into this issue and how did you solve it?
Also, would you recommend a different deployment method? It is a government project, so not all options are available to us, but we can consider some other options.
I'm curious: what's the most tragic way you've seen someone butcher a Drupal site due to a lack of Drupal knowledge?
Mine was a site where a team of devs who had never worked in Drupal spent an ungodly number of hours building a custom user permissioning system to control access to specific assets. Their code had snowballed into a tangled mess of errors and weird behaviors throughout the site. They brought me in to "help them finish it", and of course my first question was: "Why didn't you just use Drupal's roles and permissions?" They looked at me like I just pulled a goat out of my ass. They had no idea Drupal had built-in roles and permissions, even though that's one of the most fundamental features of Drupal.
Morning folks, looking at setting up Commerce Recurring Framework, I am using Commerce License to provide roles to active subscribers and am Using Authnet for the payment gateway. I believe I have followed the steps outlined in the documents for the Recurring framework, but it seems to not automatically renew after the period (for testing I set it to 1 hour). When I go into the subscriptions page, I see the subscription, the primary order is marked as completed but there is 1 subscription order in the bottom section marked as still in draft. Has anyone ran into this before? This is on a Drupal 9 site, soon to be drupal 10.
Is there an easy way to upload and link to PDFs in Ckeditor? It's one of those things that should be really easy but Drupal tends to make it difficult.
In D7 we had IMCE, which made it easy to upload and link a PDF to any text or an image. In D10, we have media library which kind of lets you insert a PDF, but not a link to it on text or an image.
What are the most user-friendly solutions for accomplishing this?
Hi all, I'm using the new drupal CMS (enjoying it, would be interested to hear other's views). I have installed the AI Drupal Agent chatbot but it just keeps serving error messages. Have checked the API key and tried with both Open Ai and Anthropic keys just in case it was a system issue, still no dice! Have uninstalled and reinstalled, checked the errors log and can see nothing wrong. Anyone have any idea?
Hey!
I've got some availability and a lot of experience with Drupal under my belt(+13Y). I'm considering using Reddit channel Drupal to find new clients, but I'm wondering if this is the right move ??
Thanks folks & Good luck! to me 😁
That feels like a basic security feature that should be readily available. For instance, I am using Simplenews to send nodes as newsletters but I wouldn't want those nodes to be accessible via a URL. With the default setup, people can just go to /node/n, /node/n+1...and view all the content that they shouldn't be able to view with a URL.
Please suggest me the best resources to learn drupal.
I'm looking to export 500 or so nodes of a content type to csv from drupal 7, then import them in drupal 10.
Most of the fields are simple text or boolean fields. The 2 that are complicated are a geolocation field (lat/lng location) and a multi image field.
I was looking at exporting with node export, but this puts each of the images into many separate columns. Doesn't seem like that will work well with Feeds.
Does anyone know the best way to handle the export and import? Open to any modules.
Without using an htaccess redirect, it is possible set up a redirect from a specific file to another page or file? I have a file located at xyz.com/sites/files/file.pdf and I need to redirect existing links to that file either to an updated version of the file (file_v2.pdf) or an existing node page. Either option is ok. Right now, the link goes to a 404 page since the original file is no longer there.
I've tried the drupal redirect module but it won't accept a file path as the source path.
Thanks for suggestions. I'm not a coder so looking for the right module or flow. I can code if I need to edit something.
I'd like to set up groups, such that group 1 sees group 1 stuff and group 2 sees group 2 stuff and it's locked between them. When I log in as group 1 content editor, I have no way of adding content to group 1 only. Content I add is published to the front page (I will turn that off) but I'm mostly needing RBAC on a web based CMS. Ideas?
If a website was originally installed / updated manually along with its contributed modules and themes, is it possible to switch to composer to update upcoming versions and other modules instead of doing it manually? Is there a need to amend or reconfigure anything before doing so? Drupal version 10.2x. Thanks
We have a viral news portal running Drupal 8 for around 7 years already. We are moving the site to another server to cut down on hosting cost. We would like to trim down the site before moving as the size of the site is now around 120gb. Most of the data are pictures.
I am not familiar with Drupal. So forgive me if I am asking bad questions.
Thank you.
Hi ,
We are doing maintenance and support to one company but the web developer vanished.
Two sites they own is in Drupal version 9.0.7
We have to add EU cookies but everything we do is just not working.
Every change we made to that website , the whole site goes down.
I think the web page maybe got hacked in the past so it may need to be upgraded to another version or reinstall.
We dont have any experience in Drupal and also we are not web developers.
We are looking for someone that can help us upgrade the website to a newer version of Drupal or migrate the whole web page to a new version or rebuild the whole website. I dont know what are the fees to do these upgrades but the owners are not willing to pay a lot for these updates since they are looking for someone to build a new page for them.
For more info if you are interested just private message me , I may not answer immediately since I am doing a lot of meetings but I will answer back after some hours.
I have a project to build a website(from scratch) for a college and integrate it with their CMS "mautic". It should have the regular email forms, Google analytics, and handle about 20k inquiries per month.
I came across Druple which is recommended for a university/college type website and apparently it's also better than wordpress. I have decent programming experience (MERN stack, nextjs, docker, vite, kubernetes, etc) but haven't really had to touch php since I mostly worked with more modern technologies. I also know that drupalize dot me is a good resource that'll check out soon.
Is there anything specific I should be worried about or look into as I begint to study it from scratch? Idk what's the deal with Drupal 6,7,8,9,10 but I'm assuming it's safe to use the latest version.
Any tips or insights would be appreciated, thanks!
So I'm relatively new to Drupal 6/7 months and I'm working on d10.
My sites performance is fine and does not time out from general use but with some tasks it will. Tasks such as saving an entity - I've been using eck entity module and the module works fine, but occasionally when generating entities it times out. The site also times out with feed imports, using the feed module. On refresh the feeds will import.
I'm on pantheon.
I was hoping if someone could give me a steer of where to start here ... Is it likely a database issue?
If anyone has pointers on what to look for that would be great 👍🏻
User warning. Trying to overwrite a cache redirect with one that has nothing in common, old one at address "languages:language_interface, theme, user.permissions, url.path.is_front" was pointing to "url.path.parent, route", new one points to "url.path, url". in Drupal\Core\Cache\VariationCache- >set() (line 143 of core/lib/Drupal/Core/Cache/VariationCac
I'm building a site with layout builder but the UI in layout builder looks really bad because it's inheriting the styles from my frontend theme.
I also tried layout builder modal but the theme design is affecting the modal too.
Is there a solution or workaround to prevent conflicting theme styles?