Quantcast
Channel: Issues for Drupal core
Viewing all 296830 articles
Browse latest View live

[Meta] Ensure that each handler in views has test coverage.

$
0
0

Problem/Motivation

Views has a bunch of handler classes.

Ensure that all of them have some sort of test coverage

HandlerBase (core/modules/views/src/Plugin/views/HandlerBase.php)
FilterPluginBase (core/modules/views/src/Plugin/views/filter/FilterPluginBase.php)
InOperator (core/modules/views/src/Plugin/views/filter/InOperator.php)
ManyToOne (core/modules/views/src/Plugin/views/filter/ManyToOne.php)
TaxonomyIndexTid (core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php)
TaxonomyIndexTidDepth (core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php)
Roles (core/modules/user/src/Plugin/views/filter/Roles.php)
ListField (core/modules/options/src/Plugin/views/filter/ListField.php)
FieldList (core/modules/views/src/Plugin/views/filter/FieldList.php)
Permissions (core/modules/user/src/Plugin/views/filter/Permissions.php)
Name (core/modules/user/src/Plugin/views/filter/Name.php)
UidRevision (core/modules/node/src/Plugin/views/filter/UidRevision.php)
UserUid (core/modules/tracker/src/Plugin/views/filter/UserUid.php)
NodeComment (core/modules/comment/src/Plugin/views/filter/NodeComment.php)
Status (core/modules/file/src/Plugin/views/filter/Status.php)
LanguageFilter (core/modules/views/src/Plugin/views/filter/LanguageFilter.php)
Bundle (core/modules/views/src/Plugin/views/filter/Bundle.php)
Search (core/modules/search/src/Plugin/views/filter/Search.php)
Numeric (core/modules/views/src/Plugin/views/filter/Numeric.php)
GroupByNumeric (core/modules/views/src/Plugin/views/filter/GroupByNumeric.php)
Date (core/modules/views/src/Plugin/views/filter/Date.php)
StatisticsLastUpdated (core/modules/comment/src/Plugin/views/filter/StatisticsLastUpdated.php)
BooleanOperator (core/modules/views/src/Plugin/views/filter/BooleanOperator.php)
Current (core/modules/user/src/Plugin/views/filter/Current.php)
BooleanOperatorString (core/modules/views/src/Plugin/views/filter/BooleanOperatorString.php)
String (core/modules/views/src/Plugin/views/filter/String.php)
Combine (core/modules/views/src/Plugin/views/filter/Combine.php)
Broken (core/modules/views/src/Plugin/views/filter/Broken.php)
Access (core/modules/node/src/Plugin/views/filter/Access.php)
Status (core/modules/node/src/Plugin/views/filter/Status.php)
FilterTest (core/modules/views/tests/modules/views_test_data/src/Plugin/views/filter/FilterTest.php)
HistoryUserTimestamp (core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php)
Equality (core/modules/views/src/Plugin/views/filter/Equality.php)
UserUid (core/modules/comment/src/Plugin/views/filter/UserUid.php)
Standard (core/modules/views/src/Plugin/views/filter/Standard.php)
TestHandler (core/modules/views/tests/src/Unit/Plugin/HandlerBaseTest.php)
RelationshipPluginBase (core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php)
GroupwiseMax (core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php)
Broken (core/modules/views/src/Plugin/views/relationship/Broken.php)
Standard (core/modules/views/src/Plugin/views/relationship/Standard.php)
NodeTermData (core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php)
EntityReverse (core/modules/views/src/Plugin/views/relationship/EntityReverse.php)
AreaPluginBase (core/modules/views/src/Plugin/views/area/AreaPluginBase.php)
ListingEmpty (core/modules/node/src/Plugin/views/area/ListingEmpty.php)
Result (core/modules/views/src/Plugin/views/area/Result.php)
View (core/modules/views/src/Plugin/views/area/View.php)
TestExample (core/modules/views/tests/modules/views_test_data/src/Plugin/views/area/TestExample.php)
HTTPStatusCode (core/modules/views/src/Plugin/views/area/HTTPStatusCode.php)
Title (core/modules/views/src/Plugin/views/area/Title.php)
Broken (core/modules/views/src/Plugin/views/area/Broken.php)
TokenizeAreaPluginBase (core/modules/views/src/Plugin/views/area/TokenizeAreaPluginBase.php)
TextCustom (core/modules/views/src/Plugin/views/area/TextCustom.php)
Text (core/modules/views/src/Plugin/views/area/Text.php)
Entity (core/modules/views/src/Plugin/views/area/Entity.php)
Messages (core/modules/views/src/Plugin/views/area/Messages.php)
SortPluginBase (core/modules/views/src/Plugin/views/sort/SortPluginBase.php)
GroupByNumeric (core/modules/views/src/Plugin/views/sort/GroupByNumeric.php)
Random (core/modules/views/src/Plugin/views/sort/Random.php)
Date (core/modules/views/src/Plugin/views/sort/Date.php)
StatisticsLastUpdated (core/modules/comment/src/Plugin/views/sort/StatisticsLastUpdated.php)
Broken (core/modules/views/src/Plugin/views/sort/Broken.php)
Score (core/modules/search/src/Plugin/views/sort/Score.php)
Thread (core/modules/comment/src/Plugin/views/sort/Thread.php)
StatisticsLastCommentName (core/modules/comment/src/Plugin/views/sort/StatisticsLastCommentName.php)
Standard (core/modules/views/src/Plugin/views/sort/Standard.php)
ArgumentPluginBase (core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php)
ManyToOne (core/modules/views/src/Plugin/views/argument/ManyToOne.php)
IndexTid (core/modules/taxonomy/src/Plugin/views/argument/IndexTid.php)
RolesRid (core/modules/user/src/Plugin/views/argument/RolesRid.php)
String (core/modules/views/src/Plugin/views/argument/String.php)
Type (core/modules/node/src/Plugin/views/argument/Type.php)
StringListField (core/modules/options/src/Plugin/views/argument/StringListField.php)
ListString (core/modules/views/src/Plugin/views/argument/ListString.php)
Search (core/modules/search/src/Plugin/views/argument/Search.php)
UserUid (core/modules/comment/src/Plugin/views/argument/UserUid.php)
UserUid (core/modules/tracker/src/Plugin/views/argument/UserUid.php)
Formula (core/modules/views/src/Plugin/views/argument/Formula.php)
Date (core/modules/views/src/Plugin/views/argument/Date.php)
DayDate (core/modules/views/src/Plugin/views/argument/DayDate.php)
WeekDate (core/modules/views/src/Plugin/views/argument/WeekDate.php)
MonthDate (core/modules/views/src/Plugin/views/argument/MonthDate.php)
YearMonthDate (core/modules/views/src/Plugin/views/argument/YearMonthDate.php)
YearDate (core/modules/views/src/Plugin/views/argument/YearDate.php)
FullDate (core/modules/views/src/Plugin/views/argument/FullDate.php)
IndexTidDepthModifier (core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php)
Numeric (core/modules/views/src/Plugin/views/argument/Numeric.php)
Nid (core/modules/node/src/Plugin/views/argument/Nid.php)
Uid (core/modules/user/src/Plugin/views/argument/Uid.php)
UidRevision (core/modules/node/src/Plugin/views/argument/UidRevision.php)
VocabularyVid (core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php)
Iid (core/modules/aggregator/src/Plugin/views/argument/Iid.php)
Fid (core/modules/aggregator/src/Plugin/views/argument/Fid.php)
NumberListField (core/modules/options/src/Plugin/views/argument/NumberListField.php)
Fid (core/modules/file/src/Plugin/views/argument/Fid.php)
FieldList (core/modules/views/src/Plugin/views/argument/FieldList.php)
Vid (core/modules/node/src/Plugin/views/argument/Vid.php)
Taxonomy (core/modules/taxonomy/src/Plugin/views/argument/Taxonomy.php)
Null (core/modules/views/src/Plugin/views/argument/Null.php)
Broken (core/modules/views/src/Plugin/views/argument/Broken.php)
LanguageArgument (core/modules/views/src/Plugin/views/argument/LanguageArgument.php)
GroupByNumeric (core/modules/views/src/Plugin/views/argument/GroupByNumeric.php)
Standard (core/modules/views/src/Plugin/views/argument/Standard.php)
IndexTidDepth (core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php)
FieldPluginBase (core/modules/views/src/Plugin/views/field/FieldPluginBase.php)
Field (core/modules/views/src/Plugin/views/field/Field.php)
BulkForm (core/modules/system/src/Plugin/views/field/BulkForm.php)
NodeBulkForm (core/modules/node/src/Plugin/views/field/NodeBulkForm.php)
UserBulkForm (core/modules/user/src/Plugin/views/field/UserBulkForm.php)
BlockContent (core/modules/block_content/src/Plugin/views/field/BlockContent.php)
Type (core/modules/block_content/src/Plugin/views/field/Type.php)
UserData (core/modules/user/src/Plugin/views/field/UserData.php)
Link (core/modules/user/src/Plugin/views/field/Link.php)
LinkCancel (core/modules/user/src/Plugin/views/field/LinkCancel.php)
LinkEdit (core/modules/user/src/Plugin/views/field/LinkEdit.php)
ContactLink (core/modules/contact/src/Plugin/views/field/ContactLink.php)
EntityLabel (core/modules/views/src/Plugin/views/field/EntityLabel.php)
DblogMessage (core/modules/dblog/src/Plugin/views/field/DblogMessage.php)
Link (core/modules/comment/src/Plugin/views/field/Link.php)
LinkApprove (core/modules/comment/src/Plugin/views/field/LinkApprove.php)
LinkReply (core/modules/comment/src/Plugin/views/field/LinkReply.php)
LinkEdit (core/modules/comment/src/Plugin/views/field/LinkEdit.php)
LinkDelete (core/modules/comment/src/Plugin/views/field/LinkDelete.php)
Taxonomy (core/modules/taxonomy/src/Plugin/views/field/Taxonomy.php)
Language (core/modules/taxonomy/src/Plugin/views/field/Language.php)
LinkEdit (core/modules/taxonomy/src/Plugin/views/field/LinkEdit.php)
ContextualLinks (core/modules/contextual/src/Plugin/views/field/ContextualLinks.php)
File (core/modules/file/src/Plugin/views/field/File.php)
Uri (core/modules/file/src/Plugin/views/field/Uri.php)
FileMime (core/modules/file/src/Plugin/views/field/FileMime.php)
Path (core/modules/node/src/Plugin/views/field/Path.php)
Node (core/modules/node/src/Plugin/views/field/Node.php)
Type (core/modules/node/src/Plugin/views/field/Type.php)
Language (core/modules/node/src/Plugin/views/field/Language.php)
Revision (core/modules/node/src/Plugin/views/field/Revision.php)
HistoryUserTimestamp (core/modules/history/src/Plugin/views/field/HistoryUserTimestamp.php)
User (core/modules/user/src/Plugin/views/field/User.php)
Mail (core/modules/user/src/Plugin/views/field/Mail.php)
Language (core/modules/user/src/Plugin/views/field/Language.php)
Name (core/modules/user/src/Plugin/views/field/Name.php)
Boolean (core/modules/views/src/Plugin/views/field/Boolean.php)
Date (core/modules/views/src/Plugin/views/field/Date.php)
LastTimestamp (core/modules/comment/src/Plugin/views/field/LastTimestamp.php)
StatisticsLastUpdated (core/modules/comment/src/Plugin/views/field/StatisticsLastUpdated.php)
Username (core/modules/comment/src/Plugin/views/field/Username.php)
Comment (core/modules/comment/src/Plugin/views/field/Comment.php)
TitleLink (core/modules/aggregator/src/Plugin/views/field/TitleLink.php)
DblogOperations (core/modules/dblog/src/Plugin/views/field/DblogOperations.php)
TimeInterval (core/modules/views/src/Plugin/views/field/TimeInterval.php)
TranslationLink (core/modules/content_translation/src/Plugin/views/field/TranslationLink.php)
EntityOperations (core/modules/views/src/Plugin/views/field/EntityOperations.php)
Extension (core/modules/file/src/Plugin/views/field/Extension.php)
Link (core/modules/node/src/Plugin/views/field/Link.php)
LinkEdit (core/modules/node/src/Plugin/views/field/LinkEdit.php)
LinkDelete (core/modules/node/src/Plugin/views/field/LinkDelete.php)
RevisionLink (core/modules/node/src/Plugin/views/field/RevisionLink.php)
RevisionLinkRevert (core/modules/node/src/Plugin/views/field/RevisionLinkRevert.php)
RevisionLinkDelete (core/modules/node/src/Plugin/views/field/RevisionLinkDelete.php)
Url (core/modules/views/src/Plugin/views/field/Url.php)
MachineName (core/modules/views/src/Plugin/views/field/MachineName.php)
Serialized (core/modules/views/src/Plugin/views/field/Serialized.php)
Links (core/modules/views/src/Plugin/views/field/Links.php)
Dropbutton (core/modules/views/src/Plugin/views/field/Dropbutton.php)
Markup (core/modules/views/src/Plugin/views/field/Markup.php)
NodeComment (core/modules/comment/src/Plugin/views/field/NodeComment.php)
EntityLink (core/modules/comment/src/Plugin/views/field/EntityLink.php)
Status (core/modules/file/src/Plugin/views/field/Status.php)
Numeric (core/modules/views/src/Plugin/views/field/Numeric.php)
Score (core/modules/search/src/Plugin/views/field/Score.php)
NodeNewComments (core/modules/comment/src/Plugin/views/field/NodeNewComments.php)
PrerenderList (core/modules/views/src/Plugin/views/field/PrerenderList.php)
Permissions (core/modules/user/src/Plugin/views/field/Permissions.php)
Roles (core/modules/user/src/Plugin/views/field/Roles.php)
TaxonomyIndexTid (core/modules/taxonomy/src/Plugin/views/field/TaxonomyIndexTid.php)
LanguageField (core/modules/views/src/Plugin/views/field/LanguageField.php)
Counter (core/modules/views/src/Plugin/views/field/Counter.php)
Custom (core/modules/views/src/Plugin/views/field/Custom.php)
Xss (core/modules/views/src/Plugin/views/field/Xss.php)
Xss (core/modules/aggregator/src/Plugin/views/field/Xss.php)
FileSize (core/modules/views/src/Plugin/views/field/FileSize.php)
FieldTest (core/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldTest.php)
StatisticsLastCommentName (core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php)
Depth (core/modules/comment/src/Plugin/views/field/Depth.php)
Broken (core/modules/views/src/Plugin/views/field/Broken.php)
Standard (core/modules/views/src/Plugin/views/field/Standard.php)

Proposed resolution

Remaining tasks

User interface changes

API changes


Explore whether the return_response annotation can be removed and replaced by \Drupal\views\Plugin\views\display\ResponseDisplayPluginInterface

$
0
0

Problem/Motivation

Proposed resolution

Remaining tasks

User interface changes

API changes

Specify what the line break converter should do and rewrite it in DOM

$
0
0

The line break converter is a shame we inherited from Wordpress. It is full of bugs, nobody really groks the implementation and it tries to parse HTML using regexps.

We need to rewrite this using proper DOM manipulations, like we refactored the HTML corrector.

But... what should this line break converter do exactly? This looks a bit like black-magic currently. Somehow, the line break converter should:

  1. Convert chunk of text separated by empty lines (\n\n) into HTML paragraphs (<p></p>)
  2. Retain text-level HTML tags in the chunk of text
  3. Ignore the content of some HTML tags (script, style, object, pre, ... maybe others)

But I'm not sure:

  • What to do with tables? We probably should only convert paragraphs into <td>s, not inside other elements... by the way, do we want to add <p> to mostly all <td>s?
  • What to do with <div>s?
  • ...

Standardize form submission behavior when "enter" key is pressed

$
0
0

This may very well be a "won't fix", but I thought it was worth documenting. The following tests were done with Firefox (I haven't tried with other browsers):

In Drupal 6, pressing the "enter" key in one of the input fields on the node submission page either
(a) submits the node, or
(b) does nothing
(On some forms it does "a", on some forms it does "b"... I can't figure out exactly what controls the behavior.)

In Drupal 5, the behavior was a bit different:
(a) previews the node, or
(b) does nothing

It looks like the change between Drupal 5 and 6 is due to http://drupal.org/node/195678 which puts the "save" button out in front on submission forms.

The behavior in Drupal 6 is not great, in my opinion -- people have a tendency to hit "enter" by mistake, and submitting the node (rather than previewing it) seems like it will lead to a lot of half-finished nodes being submitted on Drupal 6 sites. Also, ideally the behavior would be standardized for all forms.

I don't really know how to fix this at all, though. I did some Googling, and the solutions out there all seem really hackish (adding a preview button out in front and hiding it from display using CSS... blech).

Create a test database driver

$
0
0

Problem/Motivation

So Fake was broken and removed. But I still think a fake database driver for easier testing should be written.

Proposed resolution

This could be an extension of sqlite (can't be mysql/pgsql since you do not have the credentials). Here are the things this driver should do:

  1. Open should hardwire :memory:
  2. If select throws a table not found exception StatementEmpty should be returned.
  3. Insert/Merge should check for the table before execute and create it with the fields passed if necessary
  4. Update and Truncate should silently do nothing on a table not found exception
  5. Besides open, it should have a nice factory method which is already written in the migrate test case so that you can pass in an array and get a full database back.

Remaining tasks

User interface changes

API changes

Add secure debug output to twig trans extension

SelectQuery::getFields(): return all fields in the 'all_fields' case

$
0
0

See #814312: Add getConnection() to SelectQueryExtender for some background.

  $query = db_select('node', 'n')
           ->fields('n');
  $fields = $query->getFields();

The above returns an empty array. Logically, one would expect it to return all the fields that the query would return on execution, i.e. nid, vid etc. Well, at least I expect it...

My use case is #941440: Added column autodetect for sql source. Although it's generally considered better practice to explicitly list the fields you need, in this case one function of the Migrate module is discovery - identifying what data is available for migration, and making an explicit disposition of each field. Using the wildcard select form ensures no source fields are omitted, and also highlights any changes that may be made to the source tables during the migration implementation process.

getFields() returns a reference to the fields array in the query object, which suggests that the actual change would be to have fields(), in the 'all_fields' case, discover the fields in the table schema and add them to $fields.

Support exporting single-lined translations for optimal source revision diffing

$
0
0

Overcoming arbitrary line lengths of .po translations

...have you ever received a merge request for source containing changed .po-files?

Proposal

Option which makes translation export seek to keep translations single-lined instead of splitting them in parts of maximum 70 chars.

Limitation

Converted .po-files must be importable by core.
Thus lines cannot be longer than 10 * 1024 minus room for gettext context (e.g. msgid_plural);
10 * 1024 maximum defined in _locale_import_read_po().

For full reasoning, and a drush script which converts existing .po files

See potx issue drush script to ease .po revision diffing.


Stable ("non-destructive") sort in base Drupal?

$
0
0

I apologize in advance if this isn't a base drupal feature. If this belongs in a module, I don't know which one. I discovered the problem in Views module, but I gather from their forum that sorting issues are a base issue. I also apologize if it's simply my own ignorance that causes me to be unable to accomplish this with base configuration capablity.

Stable Sorting Defined: "Stable sorting algorithms maintain the relative order of records with equal keys."
(from: http://en.wikipedia.org/wiki/Sorting_algorithm )

Scenario:
Profile table. Click Street Name to sort on that. Then click House Number to see a list of members sorted by house number WITHIN street name. This doesn't work in current Drupal (or, at least, I haven't been able to figure out how to MAKE it work). Instead, you get what looks like a random ordering outside of the immediate sort column.

I could give you a million other examples, but the fact is that stable ("non-destructive") sorting is extremely useful. Allows users to accomplish multi-field sorts without having to deal with complicated UIs controls. It gives tables a whole new level of utility.

Excel is an example of an application that does this correctly.

In my experience, stable sort algorithms do not perform noticeably slower than other sorting (at least not with tables of fewer than 10's of thousands of records).

Stable Sort should be the default in Drupal, in my opinion.

Add an email or SMS page alert for DB errors

$
0
0

Inspired by http://drupal.org/node/178523#comment-657353 this request is to alert the admin when his production system is having issues with the DB. The idea will be to add a field in the settings.php file to send email or SMS paging alerts for errors while connecting to or operating with the DB. Then when critical DB errors happen the admin can take immediate action. These alerts will only happen if PHP's display_errors is Off; assuming that production systems do not have display_errors on.

Remove uses of FormattableMarkup in tests not testing that API

$
0
0

Problem/Motivation

There are uses of FormattableMarkup in tests that are not directly testing that API.

Steps to reproduce

git grep FormattableMarkup | grep Test.php: | awk -F: '{print $1}' | sort -u | nl

This will list the tests that should continue to use FormattableMarkup.

Proposed resolution

Identify the usages and change the code

Remaining tasks

Check that the remaining usages in tests should not be changed.
Review

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Provide non-deprecated replacement for Twig "spaceless" filter

$
0
0

Problem/Motivation

Per https://twig.symfony.com/doc/3.x/deprecated.html#filters:

The spaceless filter is deprecated as of Twig 3.12 and will be removed in Twig 4.0.

Usage of the spaceless filter in core templates was removed in #3486170: Remove use of deprecated "spaceless" filter in core templates.

Since the use of spaceless maybe quite prevalent in contrib and custom templates, and whitespace control equivalents are non-obvious, Drupal core perhaps provide a spaceless filter that is not deprecated, or at least, it can be deprecated on a timeline not controlled by an external dependency.

Steps to reproduce

Proposed resolution

Create a Twig extension in Drupal that provides the spaceless filter as BC, without triggering the deprecation notice.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

_user_mail_notify() doesn't handle accounts without an email address

$
0
0

Problem/Motivation

User accounts that don't have an email address can be created by administrators. _user_mail_notify() assumes that when it's passed a user account that it has an address. When that happens errors occur. It happens for any user action that sends an email. It can happen via the admin UI or Drush. This issue has resulted in at least three different issues that I could find, but there may be more:

These issues have proposed patches, but they all try to stop the email from being sent at the source, e.g. the User entity or the password reset form. None of them try to prevent _user_mail_notify() from sending an email to a NULL address, which means the inherent bug will persist. This issue will take that approach.

Afterward, some of the related issues may simply be closed. Some may be repurposed as follow-ups. For instance, the password reset form may want to print an extra message if an email can't be sent.

Steps to reproduce

  1. Log into the site as an administrator.
  2. Create a new user. The user should not have an email address.
  3. Block the user.

Expected result

The user should be blocked with no attempt to send an email.

Actual result

[error]  TypeError: Drupal\Core\Mail\Plugin\Mail\PhpMail::doMail(): Argument #1 ($to) must be of type string, null given, called in /var/www/html/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php on line 123 in Drupal\Core\Mail\Plugin\Mail\PhpMail->doMail() (line 168 of /var/www/html/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php) #0 /var/www/html/core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php(123): Drupal\Core\Mail\Plugin\Mail\PhpMail->doMail()
#1 /var/www/html/core/lib/Drupal/Core/Mail/MailManager.php(308): Drupal\Core\Mail\Plugin\Mail\PhpMail->mail()
#2 /var/www/html/core/lib/Drupal/Core/Mail/MailManager.php(181): Drupal\Core\Mail\MailManager->doMail()
#3 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(600): Drupal\Core\Mail\MailManager->Drupal\Core\Mail\{closure}()
#4 /var/www/html/core/lib/Drupal/Core/Mail/MailManager.php(180): Drupal\Core\Render\Renderer->executeInRenderContext()
#5 /var/www/html/core/modules/user/user.module(659): Drupal\Core\Mail\MailManager->mail()
#6 /var/www/html/core/modules/user/src/Entity/User.php(162): _user_mail_notify()
#7 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(564): Drupal\user\Entity\User->postSave()
#8 /var/www/html/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(796): Drupal\Core\Entity\EntityStorageBase->doPostSave()
#9 /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(490): Drupal\Core\Entity\ContentEntityStorageBase->doPostSave()
#10 /var/www/html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(806): Drupal\Core\Entity\EntityStorageBase->save()
#11 /var/www/html/core/lib/Drupal/Core/Entity/EntityBase.php(370): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
#12 /var/www/html/vendor/drush/drush/src/Commands/core/UserCommands.php(154): Drupal\Core\Entity\EntityBase->save()
#13 [internal function]: Drush\Commands\core\UserCommands->unblock()
#14 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#15 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#16 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#17 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process()
#18 /var/www/html/vendor/symfony/console/Command/Command.php(279): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#19 /var/www/html/vendor/symfony/console/Application.php(1094): Symfony\Component\Console\Command\Command->run()
#20 /var/www/html/vendor/symfony/console/Application.php(342): Symfony\Component\Console\Application->doRunCommand()
#21 /var/www/html/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRun()
#22 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#23 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#24 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#25 /var/www/html/vendor/bin/drush.php(119): include('...')
#26 {main}.

Proposed resolution

Add a check to _user_mail_notify() to verify that the account has an email address. Log info if it doesn't have one.

Remaining tasks

  • Agree on the message to be displayed
  • Review
  • Commit
  • Evaluate related issues to see if some can be closed

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Entity reference fields' config schema should not be allowed to refer to the fallback selection plugin

$
0
0

Problem/Motivation

This issue is spun off from #3332593: Adopt PluginExists validator in relevant places.

In that issue, we added validation for the field.field_settings.entity_reference:handler property in config schema, validating that the entity reference selection handler does, in fact, exist.

To manage scope and prevent potential backwards compatibility breaks, we are currently allowing the fallback plugin ID (broken) to be stored in config. But that's not really okay - config should never be referring directly to a fallback plugin, except in very limited circumstances (like block_content:UUID plugins, which might refer to a block content entity that doesn't exist).

Proposed resolution

Remove the allowFallback: true line from field.field_settings.entity_reference:handler's PluginExists constraint. Then fix any tests that break because of that, and create an update path if necessary.

User interface changes

Shouldn't be any.

API changes

Unclear, but there shouldn't be.

Data model changes

Possible; TBD.

Release notes snippet

TBD

Check that the CSP header is added to SVG files

$
0
0

Problem/Motivation

This is a followup to #2868079: Add a default Content-Security-Policy-header for svg files.
This issue adds a CSP header for SVG files.
It would be useful to have a check in the status report that makes sure this CSP is added correctly.
However, this has some challenges:

  • We need to write a SVG file then remove it.
  • The site needs to be able to send a HTTP request to itself.

We can't always guarantee this, especially when running the checks in a CLI environment.

Steps to reproduce

Proposed resolution

Some work was started here: https://git.drupalcode.org/project/drupal/-/blob/a70fae35ca4f0a09a5e5665...

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet


Add CSS variable fonts syntax to the main spelling library

BundleConfigImportValidate error message when entities exist of a bundle being deleted could be clearer

$
0
0

Problem/Motivation

If you do a config import which removes a bundle, such as a vocabulary entity or a node type, and entities of that bundle exist, the import fails with this message:

> Entities exist of type %entity_type and %bundle_label %bundle. These entities need to be deleted before importing.

This is confusing because 'importing' refers to the whole import process, but what's actually causing this problem is an attempt to *delete* something.

Steps to reproduce

Proposed resolution

Make the message clearer about what's going on - the config import is trying to delete the bundle %bundle.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Remove use of exec('rm -Rf') as security concern preventing use of open_basedir.

$
0
0

Remove use of exec('rm -Rf') as security concern preventing use of open_basedir.

ConfigFormBase produces an error when saving empty number value from the form to a numeric schema item: This value should be of the correct primitive type

$
0
0

Problem/Motivation

I have a number type in my config schema, that is not required, so can be empty. And created a config form to manage the value. It works well if I fill the number value, but doesn't work if I keep the value empty, producing an error:
This value should be of the correct primitive type.

Steps to reproduce

1. Create a schema: my_module.schema.yml:

my_module.my_config:
  type: config_object
  label: 'My Config'
  mapping:
    my_int:
      type: integer
      label: 'My int'

2. Create a config form to manage the value - Form/MyConfigForm.php:

namespace Drupal\my_module\Form;

use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;

class MyConfigForm extends ConfigFormBase {
  public function getFormId() {
    return 'my_config_form';
  }
  public function getEditableConfigNames() {
    return ['my_module.my_config'];
  }
  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['my_int'] = [
      '#type' => 'number',
      '#title' => $this->t('My Int'),
      '#config_target' => 'my_module.my_config:my_int',
    ];
    return parent::buildForm($form, $form_state);
  }
}

3. Open the form page, type any number into the field value, submit - the config will be updated successfully.
4. Make the field value empty, submit - the form will produce the validation error.

Proposed resolution

Seems this issue is related to the validation of the individual configuration values, and casting '' (empty string) to NULL.

I found a pretty old post in the issue https://www.drupal.org/project/drupal/issues/2130811#comment-8280187 related to this, and in this issue the problem with casting '' to NULL was resolved even for 8.0.x-dev, but seems not fully, or there is a regression.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

GeneratedLink should be immutable since it has both cacheable metadata and implements MarkupInterface

$
0
0

Problem/Motivation

GeneratedLink objects are mutable - this is inherently dangerous because they provide cacheability metadata and markup.

Proposed resolution

Make them immutable.

Remaining tasks

User interface changes

API changes

Remove GeneratedLink::setGeneratedLink().

Data model changes

None

Viewing all 296830 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>