25 votes
Accepted

Should I ignore the "vendor" directory?

There isn't really a right or wrong answer, it will come down to your situation. Composer themselves have pretty strong feelings that yes, you should ignore it, and in an ideal world that's definitely ...
user avatar
  • 163k
20 votes
Accepted

How to use the Features module in a 3 dev environnement?

Welcome to the land of Features Configuration Management, aka FCM! It is not only about Features, and not about Configuration Management (as introduced in Drupal version 8). Instead, it is a special ...
user avatar
16 votes
Accepted

Drupal patch files - Why do Drupal patches have complicated file names?

It just provide good information about the patch. Here is the proper way to name a patch [project_name]-[short-description]-[issue-number]-[comment-number].patch Why? Here is a list of why these ...
user avatar
11 votes
Accepted

`composer require` fails because "Source directory docroot/core has uncommitted changes"

Explanation: The problem is that cweagans/composer-patches is applying patches to Drupal Core after cloning it, leading Composer to believe you've modified the affected files and therefore to prompt ...
user avatar
10 votes

How do I apply a patch with Composer workflow?

The issue is that composer is applying patches using git apply which is not working for packages that are not installed from source. Therefore the solution is to install the packages from source. ...
user avatar
10 votes

How do I apply a patch with Composer workflow?

First, run Composer require cweagans/composer-patches Now you have a package installed that enables you to patch core, libraries or modules. Second, add a patch to a folder named 'patches' in the ...
user avatar
10 votes

How to tell if my Drupal site is comprised from the SA-CORE-2018-002 -- 2018 March exploit?

How can I tell if someone used this exploit to hack my site? Your Drupal 7 or 8 site can experience loss or theft of data, data can be removed, deleted or changed, wreaking havoc on the site in many ...
user avatar
  • 1,617
8 votes
Accepted

How make patch in PHPStorm suitable for Drupal.org?

PHPStorm patching issues have a long history. I have corresponded with their staff more than once, about a year ago. They told me then, that my issue was taken up to developers, but never actually ...
user avatar
8 votes

How do I apply a patch with Composer workflow?

To apply a patch in drupal 8, edit the composer.json file and find the extra section - "extra": { . . . "patches": { "drupal/MODULE_NAME": { "...
user avatar
8 votes
Accepted

How to tell if my Drupal site is comprised from the SA-CORE-2018-002 -- 2018 March exploit?

What could happen I had a personal Drupal site hacked during Drupalgeddon, an exploit of similar severity (though of a different type). In terms of "what could happen," in that case the hacker put ...
user avatar
7 votes

Drush Make removes .git folders

And if you're using YAML for your make file, the following will allow you to preserve the .git repository info: projects: drupal: type: core version: 8.0.x download: working-copy:...
user avatar
  • 5,463
7 votes
Accepted

How does drupal 7 know its version? which file does it check?

The VERSION constant is defined on line 11 of bootstrap.inc: /** * The current system version. */ define('VERSION', '7.41');
user avatar
  • 3,624
7 votes
Accepted

How to update my module's dev branch on Drupal.org

No need to deal with tags for the dev branch. Tags are only required for stable releases. Since you have already added your dev branch you just have to add your files, commit them and push them, like ...
user avatar
  • 14.5k
7 votes

How to use the Features module in a 3 dev environnement?

Merge conflicts are probably going to be a given when multiple developers are integrating their configuration into a Feature. I wrote up several guidelines for reviewing feature code, but I think the ...
user avatar
  • 5,701
6 votes

How can you gitignore items in a Drupal project without modifying core?

While .gitignore, .htaccess and robots.txt will come as part of the package when you clone Drupal, they should not be considered part of core and you should not feel that they cannot be changed or ...
user avatar
  • 14.7k
6 votes

How to apply patches?

If you're on UNIX based system (e.g. MacOSX, various Linux distros), the patch utility is a great tool here. I typically use the command: patch -p1 < patch-file.patch With the -p1 option being ...
user avatar
  • 26.1k
6 votes
Accepted

What is the purpose of key_value_expire table?

Beside the form cache and the update status the key_value_expire table is mainly used by the private and shared temp store. There you find a good explanation what the purpose of this data is: class ...
user avatar
  • 86.9k
5 votes
Accepted

How do I preserve custom files in my Drupal configuration across minor core upgrades?

You can build a site totally with git to help manage this process. The process is basically Git clone into your DOCROOT: git clone --branch 7.x http://git.drupal.org/project/drupal.git /var/www/...
user avatar
  • 37.6k
5 votes
Accepted

How to get a patch for the Views module reviewed and committed to the project?

A pitty that nobody has reviewed your patch so far. I think you should consider posting a question in one of the Drupal.org forums, with some kind of friendly reminder about it. Something like "can ...
user avatar
5 votes
Accepted

How to maintain a Drupal project on GitHub

Technically, this post on SO covers pushing/pulling from multiple git remotes. In your case, it sounds like you'd set up 2 remotes (git.drupal.org & github.com), pull/push from github.com as ...
user avatar
  • 26.1k
5 votes

How do I use a settings.local.php file?

When installing Drupal, you need to copy the example.settings.php file in settings.php. After Drupal is installed, you need to include the following code in the settings.php file. if (file_exists(...
user avatar
  • 311
5 votes
Accepted

[user-name]@git.drupal.org: Permission denied (publickey)

Cloning a project as maintainer of that project is done using the following command. git clone git@git.drupal.org:project/a_project.git The username is always git. As non-maintainer, the command to ...
user avatar
  • 93.7k
5 votes
Accepted

I'm trying to release a contrib module, but only see the dev version

I just cloned the repo but there is not an 8.x-1.0 tag. You have to push the tag with git push origin 8.x-1.0. Then you can create the 8.x-1.0 release.
user avatar
  • 2,602
4 votes

How to handle enabling new modules with Drush via makefile

I worked for a company that had a large dev/stage/prod flow that tried to automate as much as possible. Everything had to be done in code, scripted either using features or update hooks. Basically, ...
user avatar
  • 616
4 votes
Accepted

Place to put patched module under contrib or custom

You may leave it in place (a good reason for doing this is given in the reply from alexkb). However, this is not all there is to working with patches. Sometimes the maintainer is reluctant to ...
user avatar
  • 14.7k
4 votes

How do I preserve custom files in my Drupal configuration across minor core upgrades?

One way to solve this, is as follows: Create a set of patches that patches any altered files (i.e. .htaccess, robots.txt, and other files where you're have added customization). After downloading ...
user avatar
  • 14.7k
4 votes

Run "git" on remote server with drush alias

This works just fine for me on both the 6.x and master branches of Drush, and on the 6.2.0 release. So, your first step would be to try with the latest versions, and see if it works. If that doesn't ...
user avatar
4 votes

How can you gitignore items in a Drupal project without modifying core?

I use a global gitignore file https://www.drupal.org/node/1054616#comment-4139810 Place the following in ~/.gitignore: *~ *.orig *.rej *.patch *.diff LICENSE.txt .directory Then run this: git ...
user avatar
  • 8,202
4 votes
Accepted

How can I download specific dev version of Drupal module?

For the easiest way to do it: Go into the repository Select a version there and click on it There will be hash of commit (example) So, you know the hash of commit - just clone this module from ...
user avatar
  • 2,369
4 votes
Accepted

How do I save patched core after new upgrade?

Normally you should never hack the Drupal core. However, there are few exceptions: you're applying patch downloaded from Drupal.org which has been QA tested, you're applying patch implemented by ...
user avatar
  • 13.5k

Only top scored, non community-wiki answers of a minimum length are eligible