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

Render Array for Route

$
0
0

How do I get the render array for a route? I know the path, and have injected the renderer service so I can get the markup from the render array.

I am looking for something like:

$render_array = $route->getRenderArray();
$markup = $renderer->render($render_array);

I need to get the "placeholdered" markup, as I am working on the http://drupal.org/project/static_generator module, which generates static html pages with ESL includes.


badly worded @return for getPreferredLangcode()

$
0
0

API page: https://api.drupal.org/api/drupal/core%21modules%21user%21src%21Entity%2...

> If the preferred language is not set or is a language not configured anymore on the site, the site default is returned or an empty string is returned (if $fallback_to_default is FALSE).

This is phased as "If A or B, then C or D, if E".

So, what happens if A? What happens if B? You can't really tell...

Logically, if there no no language configured on the site, then there's no site default to return, so you'd get an empty string. But it takes a fair amount of picking that sentence apart to see that.

This should be rewritten in several sentences, and ideally with bullet points to explain what happens.

importing content type does not iimport fields.

$
0
0

Im exporting a simple content type with a body and image for import into another site. the operation completes without error but the imported content type has lost the fields of the exported content type

from the source site...

/admin/config/development/configuration/single/export

select single item=>content-type=>my custom type

generates....

uuid: 03aa0f8b-a2bc-4809-a2c1-7ca70049594e
langcode: en
status: true
dependencies:
  module:
    - menu_ui
third_party_settings:
  menu_ui:
    available_menus:
      - main
    parent: 'main:'
name: 'Custom Page'
type: custom_page
description: ''
help: ''
new_revision: true
preview_mode: 1
display_submitted: true

i import this into target site without error but the fields are lost.

thanks

[PP-1] Create a field widget for the Media library module

$
0
0

Problem/Motivation

It would be nice if users could visually select media when editing and creating content, instead of using the Entity Reference field widget.

Proposed resolution

We should create a new field widget that allows users to select media from the Media library view, and ensure that the widget is designed in a way that other selection interfaces (like upload, oembed, etc.) will also work in the future.

Remaining tasks

Write/review patches, wait for #2962110: Add the Media Library module to Drupal core to land.

User interface changes

A new field widget will be available to users who are already using the Media library.

API changes

TBD.

Data model changes

None.

Change SYMFONY_DEPRECATIONS_HELPER back to strict

$
0
0

Problem/Motivation

In order to get to PHPUnit 6 and PHP7.2 compatibility we had to change SYMFONY_DEPRECATIONS_HELPER to weak_vendors because we were triggering deprecation notices from our mocks. PHPUnit 6 has a neat new feature that triggers deprecation messages from mocks if the method has an @deprecated annotation. So even if the method's real code has no @trigger_error its mock will do. This is great because it allows us to find tests which are mocking deprecated methods but it tricky for Drupal 8 because we have methods that were deprecated before we had the @trigger_error policy in place.

This was a hack to get around that. We should be on strict so that all deprecations in core are either skipped or expected. Eventually we should get rid of the skipped deprecations too. See #2959269: [meta] Core should not trigger deprecated code.

When it is set to weak_vendors we don't trigger deprecation errors for things like #2961688: Fix "Using UTF-8 route patterns without setting the "utf8" option" deprecation because this deprecation is triggered by vendor code calling vendor code - even though it is our usage of the Symfony API that triggers it.

Proposed resolution

Probably add all the deprecations to skipped so at least we know the size of the work.

It's important to run the tests on both PHP 5.6 and PHP 7+ to get the difference between PHPUnit 4 and PHPUnit 6.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Allow users to translate content they can edit

$
0
0

Problem/Motivation

#253157: Add "Translate own content" permission, rename "Translate content" to "Translate all content" was committed in earlier versions of Drupal 8 which allowed users to translate their own content. However, this feature was later removed from the core and it made https://www.drupal.org/node/1776752 obsolete.

Nowadays, multilingual community sites still have a requirement to allow users to translate their own content.

Proposed resolution

Based on @Berdir's feedback:

Options are:

  • New permissions: "translate own entities", "translate own {entity_type}", "translate own {bundle} {entity_type}"
  • Single global permission: "allow translating content that the user can edit"

Remaining tasks

Discuss.

User interface changes

API changes

Data model changes

If Then Else Process plugin

$
0
0

I'm trying to use a custom process plugin to allow to choose conditionally which field to define as source.

Here is the migrate portion:

process:
  'field_foo/value':
    plugin: ifte
    source: type
    comparison: ==
    this: news
    then: field_bar/0/value
    else: field_baz/0/value

And here is the 'ifte' process plugin code: https://gist.github.com/trepmag/d3957f919857e3f6a21bca89c2af0a9a

Unfortunately the 'field_foo/value' field get the fields strings ('field_bar/0/value' or ''field_bar/0/value') but not their values...

How could I get their values?

Bootstrap issue with theme initialization causes hook_custom_theme() never to be invoked

$
0
0

Problem/Motivation

hook_custom_theme() fails to work under certain circumstances.
Call stack that causes the issue:

  • On boot the redirect module checks for redirect: redirect_load_entity_from_path()
  • This builds the node, which attaches the fields
  • Having a text field with media token support triggers media_token_to_markup()
  • Loading the file to create the markup triggers file_entity_file_load()
  • This triggers token_replace() for the alt / title tags.
  • Token replacement triggers system_token_info()
  • This creates a link using l()
  • l() wants to know the current theme thus drupal_theme_initialize() is called.
  • drupal_theme_initialize() defines global variables e.g. $theme, $theme_key. Once those variables are set the main part of the function is skipped. Unfortunately drupal_theme_initialize() doesn't force menu_get_custom_theme() to initialize.

Now what's the problem with that:
The call of the redirect module is made before menu_set_custom_theme() was called, which is normally called after drupal_path_initialize() in _drupal_bootstrap_full().
And the redirect module acts on hook_url_inbound_alter() which is triggered by drupal_path_initialize().
Because that call is skipped hook_custom_theme() never is invoked and we lose the control over the theme.

Proposed resolution

I see two approaches:

  1. Add a force flag to drupal_theme_initialize() to be able to re-set the global theming variables when calling the function in _drupal_bootstrap_full()
  2. Change drupal_theme_initialize() to force the initialization when calling menu_get_custom_theme()

I think the first one is more unobtrusive and is the one I've added as patch.

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

The function signature of drupal_theme_initialize() has changed but in a transparent way. This means already existing code will work as before.


Reverse proxy settings not used

$
0
0

Problem/Motivation

Settings for reverse proxy are not used in standard request.
Taking a look at the code, I've seen that the class ReverseProxyMiddleware is used to read the reverse proxy settings and to apply them.
But this class is only used once in install.core.inc:426.
During the normal request handling process, through index.php, the class is never called and the settings are not used.

This results in Drupal ignoring the reverse proxy settings and generate wrong urls.

Consider this example architecture:

When I create a new user on the website, the e-mail sent to notify him about his new account has the wrong base url (http://web.drupal.loc). The same happens for other absolute urls, as for example the reset link, etc..

Proposed resolution

In DrupalKernel class, when handling the request and after the settings inizialization, it must be called ReverseProxyMiddleware::setSettingsOnRequest to read and apply the reverse proxy configuration (if present).
A proposed patch is attached.

Further notes

If it could be useful, to replicate the problem and test the solution I've set up a docker environment with a fresh drupal installation that I can share.

Get rid of BulkForm subclasses when they just override emptySelectedMessage

$
0
0

Problem/Motivation

There are a good amount of subclasses of BulkForm:

  • NodeBulkForm
  • UserBulkForm
  • CommentBulkForm
  • ...

All just override to provide a custom message.

Proposed resolution

Move the message to a config setting in the BulkForm plugin.

Remaining tasks

Do it.

User interface changes

User will be able to configure the empty selection message on views bulk form fields.

API changes

@TODO

Data model changes

New config setting for views bulk operation fields.

Temporary files whose files are missing on the disk result in never-ending error log messages

$
0
0

Problem/Motivation

If you have a temporary file and for some reason the file on the disk for it no longer exists, it logs an error every time file_cron() runs:

Could not delete temporary file x during garbage collection

Proposed resolution

The file is gone. Maybe log an error or warning once, then drop the record.

Remaining tasks

Address #12 and #14

User interface changes

API changes

Data model changes

Don't force new revisions automatically in content_moderation

$
0
0

Problem/Motivation

Steps to reproduce:

  • Install content_moderation
  • Install lingotek module
  • Setup a good bunch of languages with lingotek module
  • Create a new entity

Expected behaviour

  • You get a single new revision

Actual behaviour

  • You get a really good portion of new revisions, 2 + one for each language

The problem is that lingotek, as well as content_translation, store metadata on the actual entity. Everytime this metadata is updated, things potentially call out to $entity->save(). Lingotek module avoids creating new revisions by using ->setNewRevision(FALSE), but sadly content_moderation overrules that.

Proposed resolution

Assume that entities are configured correctly and create new revisions already, and no longer overrule that in content_moderation.

Remaining tasks

User interface changes

API changes

Data model changes

Add view builder for contact module's ContactForm entity

$
0
0

Problem/Motivation

When referenced in an entity reference field, the ContactForm entity has no 'rendered entity' output.

Proposed resolution

Add the view builder from Contact storage module to core.
Set this in the annotation for the ContactForm entity.
Add test coverage to verify that forms can be referenced from entity reference fields and doing so renders the message form.

Remaining tasks

All of the above

User interface changes

None

API changes

None

Data model changes

None

Fix sub-optimal DX in MigrateFieldInterface

$
0
0

Problem/Motivation

Some of Migrate’s cckfield plugin's method naming are not describing clear enough what they do and therefore may confuse developers using the API (therefore giving poor DX).

Proposed resolution

See discussion in #23 - #27

  • Rename processFieldValues() to defineValueProcessPipeline()
  • Rename processField() to alterFieldMigration()/li>
  • Rename processFieldInstance() to alterFieldInstanceMigration()
  • Rename processFieldWidget() to alterFieldWidgetMigration()
  • Rename processFieldFormatter() to alterFieldFormatterMigration()
  • Update tests
  • Add BC layer

Remaining tasks

Review
Commit

User interface changes

None.

API changes

Yes.

  1. processCckFieldValues()will be deprecatedThis wad deprecated in #2683435: CCK does not exist in Drupal 7, rename Migrate's cckfield plugins to field plugins
  2. processFieldValues() will be deprecated
  3. processField() will be deprecated
  4. processFieldInstance() will be deprecated
  5. processFieldWidget() will be deprecated
  6. processFieldFormatter() will be deprecated

Data model changes

None.

Original report

Those who know me know that I’m fairly fanatical about good DX in core APIs (or, indeed, any APIs). Because of that, certain aspects of Migrate’s cckfield plugins have been bugging me for a long time.

I have three main bones to pick:

  1. processField() is poorly named. Its actual purpose is altering the migrations that transform CCK fields (in D6) and Field API field definitions (in D7) into D8 field_storage_config entities. This should be renamed to processFieldMigration() or alterFieldMigration().
  2. processFieldInstance() has the same problem. It should be called processFieldInstanceMigration() or alterFieldInstanceMigration().
  3. processCckFieldValues() is on another planet entirely. Its purpose is to define the processing pipeline for values of the field type that the plugin handles, but this does not come through at all in the method name. I think this should be called something like defineFieldValueProcess() or defineValueProcessPipline().

The doc blocks for each of these methods in MigrateCckFieldInterface need to be improved as well. These plugins are crucial for contrib migrations from D6 and D7, so the interface should include short snippets of example code in the doc comments.

[meta] Core should not trigger deprecated code

$
0
0

Problem/Motivation

#2870194: Ensure that process-isolated tests can use Symfony's PHPunit bridge to catch usages of deprecated code added the ability to test deprecated code. In order to get that done we add to add \Drupal\Tests\Listeners\DeprecationListenerTrait::getSkippedDeprecations() because core is exercising lots of deprecated code. This is all technical debt that we need to clear up. This issue is going to coordinate all the issues that need to be filed in order to stop using deprecated code.

The @todo list:

  • #2600154: Update our Twig tests to be ready for Twig 2.x
    The Twig_Environment::getCacheFilename method is deprecated since version 1.22 and will be removed in Twig 2.0.
  • #2959282: Fix "Install profile will be a mandatory parameter in Drupal 9.0." deprecation
    Install profile will be a mandatory parameter in Drupal 9.0.
  • Setting the strict option of the Choice constraint to false is deprecated since version 3.2 and will be removed in 4.0.
  • The revision_user revision metadata key is not set.
  • The revision_created revision metadata key is not set.
  • The revision_log_message revision metadata key is not set.
  • #2968519: The entity.query service is essentially deprecated because it relies on \Drupal\Core\Entity\Query\QueryFactory which is
    The "entity.query" service relies on the deprecated "Drupal\Core\Entity\Query\QueryFactory" class. It should either be deprecated or its implementation upgraded.
  • #2970108: Fix "MigrateCckField is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField instead." deprecation problem. MigrateCckField is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField instead.
  • MigrateCckFieldPluginManager is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateFieldPluginManager instead.
  • MigrateCckFieldPluginManagerInterface is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateFieldPluginManagerInterface instead.
  • The "plugin.manager.migrate.cckfield" service is deprecated. You should use the \'plugin.manager.migrate.field\' service instead. See https://www.drupal.org/node/2751897
  • #2969965: Fix Drupal\system\Tests\Update\DbUpdatesTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0.
    Drupal\system\Tests\Update\DbUpdatesTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Use \Drupal\FunctionalTests\Update\DbUpdatesTrait instead. See https://www.drupal.org/node/2896640.
  • Using "null" for the value of node "count" of "Drupal\Core\Template\TwigNodeTrans" is deprecated since version 1.25 and will be removed in 2.0.
  • Using "null" for the value of node "options" of "Drupal\Core\Template\TwigNodeTrans" is deprecated since version 1.25 and will be removed in 2.0.
  • Using "null" for the value of node "plural" of "Drupal\Core\Template\TwigNodeTrans" is deprecated since version 1.25 and will be removed in 2.0.
  • The Behat\Mink\Selector\SelectorsHandler::xpathLiteral method is deprecated as of 1.7 and will be removed in 2.0. Use \Behat\Mink\Selector\Xpath\Escaper::escapeLiteral instead when building Xpath or pass the unescaped value when using the named selector.
  • Passing an escaped locator to the named selector is deprecated as of 1.7 and will be removed in 2.0. Pass the raw value instead.
  • Providing settings under \'handler_settings\' is deprecated and will be removed before 9.0.0. Move the settings in the root of the configuration array. See https://www.drupal.org/node/2870971.
  • #2970831: Fix "AssertLegacyTrait::getRawContent() is scheduled for removal in Drupal 9.0.0. Use $this->getSession()->getPage()->getContent() instead."
    AssertLegacyTrait::getRawContent() is scheduled for removal in Drupal 9.0.0. Use $this->getSession()->getPage()->getContent() instead.
  • AssertLegacyTrait::getAllOptions() is scheduled for removal in Drupal 9.0.0. Use $element->findAll(\'xpath\', \'option\') instead.
  • assertNoCacheTag() is deprecated and scheduled for removal in Drupal 9.0.0. Use $this->assertSession()->responseHeaderNotContains() instead. See https://www.drupal.org/node/2864029.
  • assertNoPattern() is deprecated and scheduled for removal in Drupal 9.0.0. Use $this->assertSession()->responseNotMatches($pattern) instead. See https://www.drupal.org/node/2864262.
  • The Drupal\config\Tests\AssertConfigEntityImportTrait is deprecated in Drupal 8.4.1 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\config\Traits\AssertConfigEntityImportTrait. See https://www.drupal.org/node/2916197.
  • #2970017: Fix "Drupal\system\Tests\Menu\AssertBreadcrumbTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait" Drupal\system\Tests\Menu\AssertBreadcrumbTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\system\Functional\Menu\AssertBreadcrumbTrait
  • \Drupal\Tests\node\Functional\AssertButtonsTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\node\Functional\AssertButtonsTrait
  • Drupal\system\Tests\Menu\AssertMenuActiveTrailTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\system\Functional\Menu\AssertMenuActiveTrailTrait
  • Drupal\taxonomy\Tests\TaxonomyTranslationTestTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\taxonomy\Functional\TaxonomyTranslationTestTrait
  • Drupal\basic_auth\Tests\BasicAuthTestTrait is deprecated in Drupal 8.3.0 and will be removed before Drupal 9.0.0. Use \Drupal\Tests\basic_auth\Traits\BasicAuthTestTrait instead. See https://www.drupal.org/node/2862800.
  • Drupal\taxonomy\Tests\TaxonomyTestTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait
  • #2961688: Fix "Using UTF-8 route patterns without setting the "utf8" option" deprecation
    Using UTF-8 route patterns without setting the "utf8" option is deprecated since Symfony 3.2 and will throw a LogicException in 4.0. Turn on the "utf8" route option for pattern "/system-test/Ȅchȏ/meφΩ/{text}".
  • #2961688: Fix "Using UTF-8 route patterns without setting the "utf8" option" deprecation
    Using UTF-8 route patterns without setting the "utf8" option is deprecated since Symfony 3.2 and will throw a LogicException in 4.0. Turn on the "utf8" route option for pattern "/somewhere/{item}/over/the/קainbow".
  • #2961688: Fix "Using UTF-8 route patterns without setting the "utf8" option" deprecation
    Using UTF-8 route patterns without setting the "utf8" option is deprecated since Symfony 3.2 and will throw a LogicException in 4.0. Turn on the "utf8" route option for pattern "/place/meφω".
  • #2961688: Fix "Using UTF-8 route patterns without setting the "utf8" option" deprecation
    Using UTF-8 route patterns without setting the "utf8" option is deprecated since Symfony 3.2 and will throw a LogicException in 4.0. Turn on the "utf8" route option for pattern "/PLACE/meφω".
  • The Drupal\editor\Plugin\EditorBase::settingsFormValidate method is deprecated since version 8.3.x and will be removed in 9.0.0.
  • #2969806: Fix "CckFile is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\file\Plugin\migrate\process\d6\FieldFile instead." deprecation message. CckFile is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\file\Plugin\migrate\process\d6\FieldFile instead.
  • The Drupal\migrate\Plugin\migrate\process\Migration is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use Drupal\migrate\Plugin\migrate\process\MigrationLookup
  • #2969804: Fix "LinkField is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\link\Plugin\migrate\field\d6\LinkField instead." LinkField is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\link\Plugin\migrate\field\d6\LinkField instead.
  • CckFieldPluginBase is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase instead.
  • #2969902: Fix "MigrateCckFieldInterface is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField instead." deprecation message. MigrateCckFieldInterface is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField instead.
  • Drupal\system\Plugin\views\field\BulkForm is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\views\Plugin\views\field\BulkForm instead. See https://www.drupal.org/node/2916716.
  • The numeric plugin for watchdog.wid field is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Must use standard plugin instead. See https://www.drupal.org/node/2876378.
  • The numeric plugin for watchdog.uid field is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Must use standard plugin instead. See https://www.drupal.org/node/2876378.
  • The in_operator plugin for watchdog.type filter is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Must use dblog_types plugin instead. See https://www.drupal.org/node/2876378.
  • Using an instance of "Twig_Filter_Function" for filter "testfilter" is deprecated since version 1.21. Use Twig_SimpleFilter instead.
  • #2969903: Fix "The Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead." The Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.
  • #2600154: Update our Twig tests to be ready for Twig 2.x
    Using an instance of "Twig_Function_Function" for function "testfunc" is deprecated since version 1.21. Use Twig_SimpleFunction instead.
  • #2969903: Fix "The Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead." The Twig_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.
  • The Twig_Filter_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.
  • The Twig_Filter class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFilter instead.
  • #2600154: Update our Twig tests to be ready for Twig 2.x
    The Twig_Function_Function class is deprecated since version 1.12 and will be removed in 2.0. Use Twig_SimpleFunction instead.
  • Referencing the "twig_extension_test.test_extension" extension by its name (defined by getName()) is deprecated since 1.26 and will be removed in Twig 2.0. Use the Fully Qualified Extension Class Name instead.
  • Passing in arguments the legacy way is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Provide the right parameter names in the method, similar to controllers. See https://www.drupal.org/node/2894819
  • DateField is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.x. Use \Drupal\datetime\Plugin\migrate\field\DateField instead.
  • The Drupal\editor\Plugin\EditorBase::settingsFormSubmit method is deprecated since version 8.3.x and will be removed in 9.0.0.
  • CommentVariable is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.x. Use \Drupal\node\Plugin\migrate\source\d6\NodeType instead.
  • CommentType is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.x. Use \Drupal\node\Plugin\migrate\source\d7\NodeType instead.
  • CommentVariablePerCommentType is deprecated in Drupal 8.4.x and will be removed before Drupal 9.0.x. Use \Drupal\node\Plugin\migrate\source\d6\NodeType instead.
  • The Drupal\config_translation\Plugin\migrate\source\d6\I18nProfileField is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use Drupal\config_translation\Plugin\migrate\source\d6\ProfileFieldTranslation
  • The Drupal\migrate_drupal\Plugin\migrate\source\d6\i18nVariable is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use Drupal\migrate_drupal\Plugin\migrate\source\d6\VariableTranslation
  • Implicit cacheability metadata bubbling (onto the global render context) in normalizers is deprecated since Drupal 8.5.0 and will be removed in Drupal 9.0.0. Use the "cacheability" serialization context instead, for explicit cacheability metadata bubbling. See https://www.drupal.org/node/2918937
  • Automatically creating the first item for computed fields is deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. Use \Drupal\Core\TypedData\ComputedItemListTrait instead.
  • "\Drupal\Core\Entity\ContentEntityStorageBase::doLoadRevisionFieldItems()" is deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. "\Drupal\Core\Entity\ContentEntityStorageBase::doLoadMultipleRevisionsFieldItems()" should be implemented instead. See https://www.drupal.org/node/2924915.
  • Passing a single revision ID to "\Drupal\Core\Entity\Sql\SqlContentEntityStorage::buildQuery()" is deprecated in Drupal 8.5.x and will be removed before Drupal 9.0.0. An array of revision IDs should be given instead. See https://www.drupal.org/node/2924915.
  • Adding or retrieving messages prior to the container being initialized was deprecated in Drupal 8.5.0 and this functionality will be removed before Drupal 9.0.0. Please report this usage at https://www.drupal.org/node/2928994.
  • The "serializer.normalizer.file_entity.hal" normalizer service is deprecated: it is obsolete, it only remains available for backwards compatibility.
  • Drupal\comment\Plugin\Action\PublishComment is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\PublishAction instead. See https://www.drupal.org/node/2919303.
  • Drupal\comment\Plugin\Action\SaveComment is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\SaveAction instead. See https://www.drupal.org/node/2919303.
  • Drupal\comment\Plugin\Action\UnpublishComment is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\UnpublishAction instead. See https://www.drupal.org/node/2919303.
  • Drupal\node\Plugin\Action\PublishNode is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\PublishAction instead. See https://www.drupal.org/node/2919303.
  • Drupal\node\Plugin\Action\SaveNode is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\SaveAction instead. See https://www.drupal.org/node/2919303.
  • Drupal\node\Plugin\Action\UnpublishNode is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\UnpublishAction instead. See https://www.drupal.org/node/2919303.
  • The Symfony\Component\ClassLoader\ApcClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.
  • The Symfony\Component\ClassLoader\WinCacheClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.
  • The Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher class is deprecated since Symfony 3.3 and will be removed in 4.0. Use EventDispatcher with closure factories instead.
  • #2961861: Remove usage of WriteCheckSessionHandler
    The Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler class is deprecated since Symfony 3.4 and will be removed in 4.0. Implement `SessionUpdateTimestampHandlerInterface` or extend `AbstractSessionHandler` instead.
  • #2961861: Remove usage of WriteCheckSessionHandler
    The "session_handler.write_check" service relies on the deprecated "Symfony\Component\HttpFoundation\Session\Storage\Handler\WriteCheckSessionHandler" class. It should either be deprecated or its implementation upgraded.
  • Not setting the strict option of the Choice constraint to true is deprecated since Symfony 3.4 and will throw an exception in 4.0.
  • Drupal\node\Plugin\Action\DeleteNode is deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\DeleteAction instead. See https://www.drupal.org/node/2934349.
  • Drupal\comment\Plugin\Action\DeleteComment is deprecated in Drupal 8.6.x, will be removed before Drupal 9.0.0. Use \Drupal\Core\Action\Plugin\Action\DeleteAction instead. See https://www.drupal.org/node/2934349.

Done list:

Proposed resolution

Ensure each skipped deprecation has an issue to work on.

Remaining tasks

Create all the necessary issues

User interface changes

None

API changes

None

Data model changes

None


Enable blocks instead of single IP-addresses in UI

$
0
0

The ban module enables you to store single IP-addresses, from which any access of the website will be prevented.
In some cases spammers uses IP-ranges from where they spam contact forms. So it would be nice to have a comfortable opportunity to block IP-ranges or if the usage of wildcards would be supported.

Create an interface and initial class for the batch processor service

$
0
0

Problem/Motivation

There are times when the functionality to for the processing of batches is required to be swapped out.

Proposed resolution

Create an interface and class for the processing of batches and add it as a service.

The current functionality is not to be changed at this stage. The default batch processor service class will call the existing functions. Further issues will be created to migrate the functionality to the service class at a later stage. See #2875151.

User interface changes

None.

API changes

A service is to be introduced for processing of batches.

Data model changes

None.

Add a entity_pre_load() hook for modules that need to load a different revision than the default one

$
0
0

Problem/Motivation

Some modules need to act before an entity is loaded, and swap out the default revision with a different one.

For example, the Workspace module in core swaps the default revision with a workspace-specific revision, if one exists.

Proposed resolution

Add two new hooks: hook_entity_pre_load() and hook_ENTITY_TYPE_pre_load() that are called before the entity loading process.

Remaining tasks

Discuss, review.

User interface changes

Nope.

API changes

API addition, the two new hooks mentioned above.

Data model changes

Nope.

Profile provided configuration entities can have unmeetable dependencies

$
0
0

This blocks #2571235: [regression] Roles should depend on objects that are building the granted permissions and hence at least a major because it is blocking a critical.

Problem/Motivation

Profiles can override configuration used in an install. For example, a profile can provide a user.role.anonymous that is used instead of the one in user/config/install. This works fine at the moment because user roles have no dependencies. But #2571235: [regression] Roles should depend on objects that are building the granted permissions will break this because that adds them and as user is installed right after system there is no way this can work without causing an \Drupal\Core\Config\UnmetDependenciesException error. This behaviour is tested in \Drupal\config\Tests\ConfigInstallProfileUnmetDependenciesTest.

Proposed resolution

This is not an ideal situation as it means we can't really add any new dependency information without breaking install profiles that do this. According to @Berdir we've done this several time over the 8.x dev cycle.

Maybe instead of replacing the configuration we can just install the configuration from the module and then when the install profile is instead we can update the configuration entity instead.

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

Fix "Install profile will be a mandatory parameter in Drupal 9.0." deprecation

$
0
0

Problem/Motivation

We are currently skipping the Install profile will be a mandatory parameter in Drupal 9.0. deprecation.

Proposed resolution

Remove deprecation skipping and fix how it is triggered to be only when \Drupal::installProfile() results in setting a profile value.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Viewing all 296553 articles
Browse latest View live


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