Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.
4
votes
Accepted
Are passwords entered in the login form encrypted?
When you submit the form on /user/login, the fields are both sent in plaintext in the POST body. If you use a browser debugger (like Chrome Inspector), you can look at the network traffic and see thi …
3
votes
Accepted
How can I override or alter a module's help text?
I don't recall doing exactly this, but I think you can use a hook_module_implements_alter() for this:
function MYMODULE_module_implements_alter(&$implementations, $hook) {
if ($hook === 'help') {
…
3
votes
Accepted
Watchdog file growing out of control
You have a few options here.
For the short term, you can disable database logging on /admin/modules/uninstall until you can get the full situation under control.
You can disable assertions. Search …
4
votes
What's the proper way to refer to all the code in `core/lib/Drupal`, or the code in `core/li...
What you describe is correct, when you install Drupal, everything in the 'core' directory is considered the core set of Drupal files, or the bare minimum installation package.
The files in 'core/lib' …
1
vote
Accepted
Set datetime timezone when posting data via JSON api
In DateTimeNormalizer, the inferface format is RFC3339, which is Y-m-d\TH:i:sP as an input format string. It also accepts the ISO8601 PHP string, which is Y-m-d\TH:i:sO
Try using strings like in you …
4
votes
Accepted
MarkupInterface interoperability with other PHP frameworks
TLDR
(this summarizes conclusions from the comments below)
The MarkupInterface is available on packagist as part of the drupal/core-render package, which provides all the classes from Drupal\Compone …
2
votes
Is there a way to mock a procedural function from common.inc in a test without an external l...
Yes, this is possible and done in a handful of places in core. One example is TimeTest. I am not 100% sure it is official, but I call it a shadow function.
The trick is to declare the procedural func …
3
votes
Where is the temporary directory defined in the code?
The logic for finding the proper OS temp directory is in FileSystem::getOsTemporaryDirectory. This will try to use upload_tmp_dir, otherwise default back to an OS value, like /tmp.
This get used in …
0
votes
Should the Update Manager module be uninstalled when installing with Composer?
Personally, I have Update Manager installed on all my live sites.
While I use composer to manage all of my sites, I am do not blindly composer update and push out. I like to read changelogs and make …
2
votes
Accepted
Is there a standard place 3rd party module pages report what PHP version they're tested on?
There is a route for all modules of the pattern https://www.drupal.org/node/{nid}/qa for showing testing reports. Nightly runs, per-commit runs, and one offs should appear there.
For the module you …
2
votes
Accepted
In code, only create a revision if a field is changed
This may do the trick in a hook_entity_presave(), or get you close:
$old_dog = clone $dog;
update_the_dog($dog);
// Use == to allow for out of order keys.
$same = $dog->toArray() == $old_dog->toArra …
6
votes
Date vs Timestamp field-type
In Drupal 8, timestamps (and created and updated) are stored as integers in the database. They do not use the native datatype. …
1
vote
Accepted
How many blocks can be handled?
This is particularly important in a Drupal 8 system, where caching is used extensively. One of the most overlooked aspects of this is properly tuning the database. …
7
votes
Accepted
how to get all the fields that have been modified on entity save (form submit)?
When you are in the presave hook, the updated $node object will have $node->original, which is the node before things were changed.
Nodes also have a $node->toArray(), method that will flatten the ob …
2
votes
Dependency Injection if service exists
One possible way to handle this situation is for your Module B to define a default, stub service with the same type signature (ie, Interface) as the one you need). Use that in the YAML. Then, in you …