Drupal - Open Source Content Platform

Subscribe to Drupal - Open Source Content Platform feed
The place for news, articles and discussion regarding Drupal, 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: [Drupal.org](http://drupal.org)Drupal - Open Source Content Platform | #Celebr8D8
Updated: 24 min 14 sec ago

How to fix "undefined function drupal_get_form()" in Drupal 8?

Fri, 11/16/2018 - 15:00

I'm working on a project where I have php code in my content pages, for which I installed the PHP Filter module. All of my pages work fine now but I keep getting this at the bottom of the page.

Drupal 8 PHP error

Looking at modules/php/php.module, I see that 'drupal_get_form' is a parameter in php_eval(), but I don't know where to go from there. Does anyone know how to solve this issue?

Thank you.

submitted by /u/noob64
[link] [comments]

Weekly useful Drupal things to know thread

Fri, 11/16/2018 - 09:06

What's a useful tip or technique or tool (or anything) that you picked up and think others should know about?

(Check out the weekly post schedule in the sidebar)

submitted by /u/AutoModerator
[link] [comments]

Best method of storing company phone numbers

Fri, 11/16/2018 - 03:19

Our company website has many translations all with different phone numbers. We need a central place where we can store them all, we will then tokenize them for use throughout the site.

Is the best way to just create a content type for this? Or is there a better method?


submitted by /u/dbj2000
[link] [comments]

Anyone familiar with integrating SimpleSAMLphp with Drupal 8?

Thu, 11/15/2018 - 15:42

I'm trying to put up our Company's SSO in front of our Drupal CMS. The end goal is to authenticate via our Company's system (which has high security and 2-Factor Auth, etc.), use the person's email to look up their Drupal account and login to Drupal with that account.

I've been reading through documents from Acquia, the SimpleSAMLphp site and other posts around the web, trying to reconcile some conflicting information. Here's what I have so far.

The Authentication System

For our Company's Authentication system (the remote IDP), I have:

  • I've installed the simplesamlphp_auth contrib module via composer
  • I've created a boilerplate config.php file. All this really specifies is the database connection for recording sessions.
  • Converting the XML from the IDP, I've created a metadata/saml20-idp-remote.php file. It specifies the sign on URL.
  • I've modified the authsources.php file to use the IDP I defined in metadata/saml20-idp-remote.php
  • I've configured/activated the simplesamlphp_auth module. I've enabled the option to "Automatically enable SAML authentication for existing users upon successful login". The unique identifier is the mail attribute from the IDP.
Current Behavior
  • On the /user/login page of the CMS, there is a link that goes out to the "Federated" Login (my company's authentication system.
  • I click there, enter my credentials, do my 2FA and all that works.
  • Once I get out of the my company's system I am redirected to the /admin/content page, which is configured on the IDP side.
  • I am NOT logged into Drupal :(

After stepping through some code, it seems as though the SimpleSAMLphp library does NOT think I am authenticated by the IDP and so it doesn't continue the logic flow any further.

Am I missing any other configuration files?

submitted by /u/PompeiWasAnInsideJob
[link] [comments]

*rant* Attending DrupalCon is becoming too expensive

Thu, 11/15/2018 - 13:58

I like the concept of tracks and I'm sure it will be successful.

However, the price of attending DrupalCon is another example that Drupal is an Enterprise framework.

$900 + staying in an expensive city like Seattle is not cheap.

submitted by /u/Tabestan
[link] [comments]

Drupal how to add/remove database tables dynamically

Thu, 11/15/2018 - 11:42

Our website has several administrators. Each of them moderates a large amount of data.

So website sometimes goes extremely slow. I think that we can separate our main data table into small chunks. So each administrator will be associated with its own database table. What is the best possible approach to implement it?

The nuance is that administrators can be replaced so we need to update database schema (add/remove tables) dynamically somehow. Is there a way to add/remove tables dynamically (not via hook_install)?

submitted by /u/dakruchko
[link] [comments]

Drupal Dev Thursdays: Post here with development questions or discussion

Thu, 11/15/2018 - 09:06

This is the weekly thread for development questions or chit-chat that doesn't belong in the Monday Beginner Questions thread. All questions/comments/ranting about Drupal dev is fair game.

(Check out the weekly post schedule in the sidebar)

submitted by /u/AutoModerator
[link] [comments]

It's Drupal Contrib Wednesday! Post recent contrib module likes/dislikes

Wed, 11/14/2018 - 09:07

Have you tried a new module or theme recently, or do you have a favorite that nobody seems to know about? Tell us what you like or dislike.

(Check out the weekly post schedule in the sidebar)

submitted by /u/AutoModerator
[link] [comments]


Wed, 11/14/2018 - 04:36

Hi all,

I've been working on a side project which allows the creation of throwaway test/demo instances of Magento 2 Community, Drupal 8 and WordPress. More platforms and features to come in the future.

You can create a test instance with the specific version of the platform you want, configure to your liking without any hassle.

It's still in beta and has some bugs, but any feedback is much appreciated.


submitted by /u/funkywhat
[link] [comments]

File Field -> set language

Tue, 11/13/2018 - 11:43

Hello All,

my Drupal knowledge is mediocre I would say. So I would like to kindly ask you all for help.

I would like to offer a D8 content type with a file field where users can upload text documents (but also images and other assets.) These text files can be in multiple languages - base language will be englisch and than translations (8) of that same text.

Like: textcopy-us.txt / textcopy-fr.txt / textcopy-jp.txt and so on...

What I would like to offer in the back end is that users can set the language from a list - for each file separately and filter them by language in the front end.

So I would like to set a language value for a field - not the content type.

I hope that makes sense as my English is also mediocre.

Has somebody an idea how to archive this and could set me on the right path?

submitted by /u/mars16c
[link] [comments]

Nested docroot, modules/contrib & modules/custom

Tue, 11/13/2018 - 10:31

If it's such a good idea to have nested docroot, for example a `web` subdirectory, and to have contrib modules in `modules/contrib` and custom modules in `modules/custom`, why doesn't the Drupal 8 installer set that up from the outset?

submitted by /u/Nick_Hope
[link] [comments]

It's Triumphant Tuesday! Post your recent Drupal wins and launches

Tue, 11/13/2018 - 09:06

Here's your chance to brag about cool stuff you've done recently and awesome sites you've shipped. Anything happy and Drupal-related goes.

(Check out the weekly post schedule in the sidebar)

submitted by /u/AutoModerator
[link] [comments]

Recommended block body type for Google Adsense ad code in Drupal website?

Tue, 11/13/2018 - 03:53

Hi so I have a Drupal 7 website in which I've placed some Adsense code.

I'm having problems with displaying these ads although I have placed the ad code in a block.

I want to know what's the recommended Block Body "Text Format" type for adsense ad codes?

I can see the following text format types:


Filtered HTML

Plain Text

Please advise. thanks!

submitted by /u/froddo7
[link] [comments]

remove index.php from urls on nginx & drupal8

Tue, 11/13/2018 - 01:03

Hello folks !!

I have been struggling enough to get the url corrected for a site implemented with drupal8 & nginx. I have use official conf for drupal8 from https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/

This works fine for other sites but one of the site has issue on url. The url contains index.php for every url of every page as /somesite/index.php/contactus , /somesite/index.php/donors instead of just /somesite/contactus or /somesite/donors.

I would like to get some help.

submitted by /u/iamdevops2
[link] [comments]

Drupal site ad not loading and hence slowing home page

Mon, 11/12/2018 - 21:29

Hi, so I have this website on Drupal 7 which is for whatever reason stuck on a script in the home page.

Whenever I empty cache in Chrome for IOS and then load my site it's stuck in loading.

So I went to desktop and ran developer tools using Chrome. Sure enough a google adsense ad is showing as "pending" always in the Network/Time column (there are 3-4 adsense ads in the homepage and they all seem to load visually) .

This is completely messing up my website when it's loaded without cache (first time visitors?). It doesn't complete loading.

My question is: how do I figure out in Developer tools exactly which adsense ad code in the html is not loading properly? I can see the urls but not the actual code.

Can anyone please post any tips on how to find the actual code in the page that's slowing my load times? thanks!

submitted by /u/froddo7
[link] [comments]