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

egulias/email-validator validates email address insufficiently

$
0
0

Problem/Motivation

While building user-facing forms with the webform module, I noticed that some invalid email addresses are considered valid - in my case it's address without a domain suffix (such as name.surname@hostname. This is a known issue with egulias/email-validator library we're using.

But there are multiple similar unsolved issues, e.g. https://github.com/egulias/EmailValidator/issues/372

Steps to reproduce

Run

\Drupal::service('email.validator')->isValid("name.surname@server")

and see it's considered a valid email address.

Proposed resolution

Preferably help fix https://github.com/egulias/EmailValidator/issues/359 and update to version containing the fix.
Alternatively, create a fork of egulias/email-validator and fix the issue there.

Remaining tasks


Allow passing context information to media_oembed_iframe theme implementation.

$
0
0

Problem/Motivation

To enable more control over the html returned by an oembed provider, more optional contextual information in the theme implementation media_oembed_iframe would be useful (e.g. to enable autoplay for videos from YouTube, if a field formatter setting is set).

Proposed resolution

To enable modules to add contextual information to the iframe, the OEmbedIframeController should pass a "context" query argument to the render array.

To easily add context based on the provider or field formatter, an additional alter hook for the iframe usage should be added.

Remaining tasks

Review of the attached patch.

User interface changes

None

API changes

Additional alter hook for contextual information in the formatter.

Data model changes

None

Unhandled exception when trying to register a duplicate username with equality mismatch between php and database layer

$
0
0

Problem/Motivation

In https://www.drupal.org/project/drupal/issues/3415582, an unhandled exception when trying to register a duplicate username with different case was fixed. However, we've now noticed that there are some other cases where the same issue occurs (caused by the same change that caused #3415582). The issue does not only affect case-sensitivity (fixed), but also things like accentuation (e.g. "example" vs. "éxample"). I think there might also be some (not yet known) other edge cases where the same issue occurs. Basically, the issue always occurs if the database layer has a different understanding of equality than the php layer.

I think the issue was introduced by https://www.drupal.org/project/drupal/issues/2478663.

Steps to reproduce

1. Set-up a fresh Drupal 10.3 installation (e.g. on simplytest.me)
2. Log-in as admin
3. Create a user with username "éxample"
4. Create another user with username "example"
5. An unhandled exception occurs:

The website encountered an unexpected error. Try again later.

Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'example-en' for key 'user__name': INSERT INTO "users_field_data" ("uid", "langcode", "preferred_langcode", "preferred_admin_langcode", "name", "pass", "mail", "timezone", "status", "created", "changed", "access", "login", "init", "default_langcode") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13, :db_insert_placeholder_14); Array ( [:db_insert_placeholder_0] => 3 [:db_insert_placeholder_1] => en [:db_insert_placeholder_2] => en [:db_insert_placeholder_3] => en [:db_insert_placeholder_4] => example [:db_insert_placeholder_5] => $2y$10$h3YBVBuf9CTaL0qk6WpjX.WTmPdNpYLbeEQvpJxVRGAGBOkPNtAqu [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => UTC [:db_insert_placeholder_8] => 1 [:db_insert_placeholder_9] => 1719306986 [:db_insert_placeholder_10] => 1719306986 [:db_insert_placeholder_11] => 0 [:db_insert_placeholder_12] => 0 [:db_insert_placeholder_13] => [:db_insert_placeholder_14] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 817 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php). 

Remaining tasks

- Propose a resolution
- Implement the fix

SQLContentEntityStorage::saveToDedicatedTables() doesn't correctly use storage configuration

$
0
0

Problem/Motivation

During an upgrade from 8.6.16 to 8.7.3, I ran into an issue with taxonomy_post_update_make_taxonomy_term_revisionable() .

The following error is thrown during processing of the update.

Base table or view not found: 1146 Table 'drupal.tmp_ed8154taxonomy_term_r__ff793441e7' doesn't exist: ...

.

Through some debugging, I determined that the temporary table, tmp_ed8154taxonomy_term_r__ff793441e7 was related to a custom field, field_default_access, an entity reference field on my Vocabulary. The default tempary table name, tmp__taxonomy_term_revision__field_default_access, turns out to be 49 characters, and is replaced with the hash format tmp table name, see DefaultTableMapping::generateFieldTableName() . While tracing the code for the EntityDefinitionUpdateManager::updateFieldableEntityType() , I discovered that this table was actually being created, but with a different sha255 has, resulting in the table name tmp_ed8154taxonomy_term_r__d348111e42.

Further discovery determined that SQLContentEntityStorage::saveToDedicatedTables() doesn't use the "$field_storage_definitions" used through out the update code, but calls $field_definition->getFieldStorageDefinition(); , which results in a different instance of the storage definition, with a different ( getUniqueStorageIdentifier() ), and as a result the table name isn't mapped correctly.

The issue here may be related to #3056539: Updating an entity type from non-revisionable to revisionable fails if it has non-revisionable fields stored in dedicated tables, however it doesn't appear the missing table in that issue is the result of the incorrect hashed table id, but it may be the result of not using the current table mapping correctly.

Proposed resolution

Changes the entity storage to use its internal definitions instead of the ones provided by the entity field manager.

Remaining tasks

#26.2
Review
Commit

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

Call to a member function getId() on null in Drupal\Core\Entity\EntityViewBuilder->getBuildDefaults(

$
0
0

Problem/Motivation

After remove german language i get this error.
I deleted all german term and german content but error persist.

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getId() on null in Drupal\Core\Entity\EntityViewBuilder->getBuildDefaults() (line 212 of core/lib/Drupal/Core/Entity/EntityViewBuilder.php).

Drupal\Core\Entity\EntityViewBuilder->getBuildDefaults(Object, 'teaser') (Line: 157)
Drupal\Core\Entity\EntityViewBuilder->viewMultiple(Array, 'teaser', 'de') (Line: 123)
Drupal\Core\Entity\EntityViewBuilder->view(Object, 'teaser', 'de') (Line: 89)
Drupal\views\Entity\Render\TranslationLanguageRenderer->preRender(Array) (Line: 221)
Drupal\views\Plugin\views\row\EntityRow->preRender(Array) (Line: 441)
Drupal\views\Plugin\views\style\StylePluginBase->preRender(Array) (Line: 1508)
Drupal\views\ViewExecutable->render() (Line: 131)
Drupal\views\Plugin\views\display\Block->execute() (Line: 1630)
Drupal\views\ViewExecutable->executeDisplay('block_1', Array) (Line: 81)
Drupal\views\Element\View::preRenderViewElement(Array) (Line: 59)
Drupal\views\Plugin\Block\ViewsBlock->build() (Line: 171)
Drupal\block\BlockViewBuilder::preRender(Array)
call_user_func_array(Array, Array) (Line: 101)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 772)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 363)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 134)
__TwigTemplate_fd2d1d267a30195197ffb681dc27b97718ad79fc4f795dba55b6dfa6c57a9d9a->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array, Array) (Line: 45)
__TwigTemplate_38dcf7bd64040a1d76d94890afe021edb563871c3dca59e6b1d00a67e4672ab5->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 55)
twig_render_template('themes/custom/oto_frontend/templates/layout/page--taxonomy--product-term.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 479)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 113)
__TwigTemplate_184af407217c790cf11d0eb4944ff42ffc946b44f25c292c2ba1218346ab1814->doDisplay(Array, Array) (Line: 405)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 378)
Twig\Template->display(Array) (Line: 390)
Twig\Template->render(Array) (Line: 55)
twig_render_template('themes/custom/customer_frontend/templates/layout/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 162)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 163)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 142)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 130)
Drupal\cdn\StackMiddleware\DuplicateContentPreventionMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)


Steps to reproduce

Delete a language and got to taxonomy term views

Media library grid item label sticks out, media alignment should adhere to positioning standards

$
0
0

Issue summary updated as of comment #14

Problem/Motivation

  1. In Claros's media-grid the item's name sticks out of its expected place if the name of the media is shorter than width of the individual grid block. It exceeds both on the top and the bottom of the name space.
  2. Also, the uploaded media does not adhere to the standardised design, and floats above the media name space instead of being stuck to it.

Steps to reproduce

  1. Enable Media and Media Library modules.
  2. Goto /admin/content/media-grid
  3. Add media with short filename

Proposed resolution

  1. .media-library-item__attributes should be shrunk to address the media name space bleeding into either ends of the Y axis.
  2. Media element should be aligned to the top of its name space.

BEFORE patch

media before patch

AFTER patch

media after patch

Layout template suggestions are not loaded properly

$
0
0

Problem/Motivation

Layout discovery doesn't load layout suggestions unless the layout definition is prefixed with layout__ and the template with layout--.

This break any existing site using the (deprecated) Layouts contrib module, where the prefixing wasn't necessary.

Additionally site-builders and developers get confused as twig debug comments suggest wrong [as in: not-prefixed] template suggestions names, i.e. (from: #2905197: Template override is not working):

layouts definitions file: naurodvolleys.layouts.yml

naurodvolleys_1x1:
  label: "naurodvolleys 1x1"
  category: "naurodvolleys"
  template: "templates/content-layout/naurodvolleys_1x1"
  regions:
    main:
      label: "Main"

Template suggestions:

Target suggestion: naurodvolleys-1x1--node-result-1x1.html.twig

Suggestion is not loaded.

For further investigation you can read #2862683: 'base hook' key prevents template suggestions from working comments from #25 on going.

Proposed resolution

The first task should be to understand if prefixing layouts with layout__/layout-- as core does is the right way.
- If it is then we need to update the documentation pages How to register layouts and How to upgrade from Layout Plugin, together with updating the twig debug comment suggestions.
- if it is NOT, then we need to fix the issue in order for layout suggestions to be loaded correctly.

@tim.plunkett on #9 confirmed this is actually a bug, themes and modules layout templates suggestions needs to be loaded in accordance with their definitions.

Remaining tasks

  1. Define what is the right way to name layout bundles and their templates, if the layout__/layout-- prefixes are mandatory. (#9
  2. Update the issue summary with the right proposed resolution when task 1) is complete #11
  3. Code a solution
  4. Update the documentation if necessary

User interface changes

This is a pure code change, so no UI changes expected.

API changes

There may be Layout API changes, depending what the result of task 1) will be.

Media Library: Argument #1 ($array) must be of type array, null given in array_filter().

$
0
0

PHP error

TypeError: array_filter(): Argument #1 ($array) must be of type array, null given in array_filter() (line 144 of /core/modules/media_library/src/Plugin/views/field/MediaLibrarySelectForm.php)

Steps to reproduce

Use media library in CKeditor, doesn't matter if it is 5 or old one.

  1. Click on add media button in CKeditor
  2. Ensure that you have some filters on your media popup
  3. Select 1 item from list
  4. Filter results to hide somehow that item
  5. Click on insert selected

So your popup will not refresh with error message but you'll get that PHP error in backend.


add a comment to install.core.inc about the updated container

$
0
0

Problem/Motivation

It would help readability of the code to explain that we're getting a full container from the kernel, to replace the partial installer container.

MR coming.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Cloned entities don't retain their Inline Block usage

$
0
0

When cloning an entity either via code or via a module such as Entity Clone the inline block usage is not carried over, meaning if you delete the original entity, the inline blocks will be removed and break the clone.

Incorrect order and duplicate theme hook suggestions

$
0
0

Just by turning on twig debug and looking at theme suggestions, you can see for the main menu (and any corresponding menu like footer) that there is a duplicate theme suggestion and at the most specific level which overrides any and all customizations in hook_theme_suggestions_alter().

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'menu__main' -->
<!-- FILE NAME SUGGESTIONS:
   x menu--main.html.twig
   * menu--main--customization.html.twig
   x menu--main.html.twig
   * menu.html.twig
-->

Should be:

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'menu__main' -->
<!-- FILE NAME SUGGESTIONS:
   x menu--main--customization.html.twig
   * menu--main.html.twig
   * menu.html.twig
-->

Review/update $adminTags variable for new html elements to be whitelisted

$
0
0

Problem/Motivation

Xss::filterAdmin() is currently stripping out the picture & source html elements that are part of the Core module Responsive Image. $adminTags sets the elements that are whitelisted and would need to be updated.

This bug was first found at https://www.drupal.org/node/2687479. Views is stripping out the picture & source elements when responsive images fields are being rewritten. The patch there will be uploaded here to start / demo a fix that would need to be reviewed.

Steps to reproduce

This is for testing responsive image support (picture):

1. Install Drupal with Umami profile
2. Create new View: Content of type Article, Create a page, Save and edit
3. Switch Format from Content to Fields
4. Add a Media Image field
5. Choose Formatter = Rendered entity and View mode = Responsive 3x2
6. Look at the page
7. Result: See original image for the articles
8. Expected: See responsive image for the articles

Proposed resolution

Review/update $adminTags to include picture & source. It would probably be good to review $adminTags to see if there are any other html elements that should be whitelisted at the same time.

Remaining tasks

  • Verify steps to reproduce
  • Review what HTML elements to add
  • New HTML elements to be reviewed for XSS vulnerabilities

HTML elements to add:

  • button

User interface changes

none

API changes

none

Data model changes

none

Continuation Add Views EntityReference filter to be available for all entity reference fields

$
0
0

Continuation of #2429699: Add Views EntityReference filter to be available for all entity reference fields since there were so many comments the page was struggling to load.

Slack thread

https://drupal.slack.com/archives/C6SQM2J94/p1706633005193429

Problem/Motivation

One major piece of functionality from the D7 Entity Reference module was left out entirely in #1801304: Add Entity reference field: the ability to render exposed views filters as a select list or autocomplete of available entities.

Proposed resolution

Create a new Views Entity Reference filter plugin to be available for all entity reference fields and migrate the existing taxonomy filters to be based on the new generic filter plugin.

How to use

  1. Add on an entity type / bundle an entity reference field, ex field_test_reference.
  2. Create a view displaying this entity type.
  3. Add a filter on the view for field_test_reference.
  4. Configure the entity selection mode and the widget display mode.
  5. Configure the filter behavior (ex: required, multiple, etc.)
  6. Finally use the filter field for filtering the results based on the selected entity from the autocomplete or select list.

Remaining tasks

  • ☑ support for content entity reference
  • ☑ support for configuration entity reference
  • ☑ support for content with and without bundles
  • ☑ support for base fields
  • ☑ taxonomy filter rebased on generic entity reference
  • ☑ settings forms to configure the filter
  • ☑ display widget in select or autocomplete
  • ☑ filter values based on reference view
  • ☑ filter values based on bundles
  • ☑ maximum filter values in select list for performance concerns
  • ☑ sort for filter values when in bundle selection handler mode
  • ☑ argument support for when view selection handler is used
  • ☑ views configuration schema update
  • ☐ existing configuration migration (no longer needed if we create a new filter only)
  • ☐ fix select option (#208, #215)
  • ☑ tests for general functionality
  • ☑ tests support for base fields
  • ☐ Address points in comment #49 (comment 534 from original ticket)
    • ☑ add test coverage for calculate dependencies
    • ☐ sort by empty on initial load (needs more info), see comment #49
    • ☐ prevent circular reference: validate no selection of an entity reference that uses itself as the filter, see comment #49
    • ☐ node titles in the select options when configuring the filter are double escaped (e.g. " shows as &quot;), see comment #49
    • ☐ exposed filters on the chosen entity reference view are also shown on the view, see comment #49
  • ☐ get framework manager approval
  • ☑ write change record

Post tasks

  • ☐ follow-up task for TaxonomyIndexTid
    #3339738: Convert TaxonomyIndexTid to use new EntityReference filter
  • ☐ conversion of the "authored by" filter to use the entity reference filter (now covered since base fields are now supported)
  • ☐ extract selection handler form logic in separate plugins that will specialize for rendering and validating the filter selection config form
  • ☐ caching of the value form?
  • ☐ documentation updates
  • ☐ set up deprecation of existing filter, removing this 'as a Reference' suffix

User interface

UI
UI

UIUI

Known issues

  • CANNOT REPRODUCE ATM sometimes when switching between widget it gets stuck on the previous selected one
  • FIXED when switching between the widget types the previous value is left in the exposed form and it's incompatible with the other widget type
  • FIXED triggering ajax requests on the extra options form right after adding the filter brings you back to the add handler form fixed

API changes

None.

For 10.2

See hidden branches and comment #143

Adding media library openers use autoconfigure and tags in 10.3.x has BC consequences

$
0
0

Problem/Motivation

The contrib module Media Library Media Modify was overriding the media_library.opener.field_widget by having

  media_library.opener.field_widget:
    class: Drupal\media_library_media_modify\MediaLibraryMediaModifyFieldWidgetOpener
    arguments: [ '@entity_type.manager' ]

in its services.yml file. This would replace the media_library's service definition. And this works in 10.2.x but fails on 10.3.x due to the changes in #3401730: Add default autoconfigure to all *.services.yml and remove event_subscriber tags and #3421480: Convert OpenerResolver to use a service locator.

Steps to reproduce

Run Thunder's tests on 10.3.x

Proposed resolution

Note the module will be fixed in #3445963: Use service decoration to replace media_library.opener.field_widget but there are other modules that might be affected - see http://codcontrib.hank.vps-private.net/search?text=MediaLibraryOpenerInt...

In discussion with @longwave, we decided that the issue occurs because we added a new tag (media_library.opener) and enabled autoconfig for it. We could add a BC layer by extending service_collector to also look for interfaces (and issue a deprecation if a service has the interface but is not tagged).

It is also apparent that https://www.drupal.org/project/drupal/issues/3421480 is missing a change record.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Error: Cannot read properties of undefined (reading 'settings')
 with dialog.position.js

$
0
0

Problem/Motivation

Error accessing property of undefined, when resizing page with a dialog opened.

caught TypeError: Cannot read properties of undefined (reading 'settings')
 at HTMLDocument.resetSize (dialog.position.js?v=10.0.8:85:32)
 at later (debounce.js?v=10.0.8:37:23)

Steps to reproduce

  1. Open a page and open a dialog: in my case, I use Layout Builder and can reproduce this problem when configuring a block in page node layout
  2. With the dialog opened, resize the window
  3. Error shows up in console

Proposed resolution

By looking into the function 

resetSize(event) {…
}

So it looks like the events parameter passed in this function are not the same. 
When resizing, they can be of type resize or type drupalViewportOffsetChange (called by debounce.js).

And if event is of type drupalViewportOffsetChange, data attribute is undefined, causing the error accessing event.data.settings

Remaining tasks

None

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet


Warning: Undefined array key 1

exception message thrown in createConnectionOptionsFromUrl() is unclear

$
0
0

Problem/Motivation

> throw new \InvalidArgumentException('Minimum requirement: driver://host/database');

This is unclear.

Would be better as something like:

> throw new \InvalidArgumentException("The given database connection URL '$url' is badly formed. The minimum requirement is 'driver://host/database'.");

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CategoryAutocompleteController should check that user actually provided query string

$
0
0

Steps to reproduce

1. Navigate to /block-category/autocomplete page.
2. The following error will appear.

stripos(): Passing null to parameter #2 ($needle) of type string is deprecated i

Primary Drop Button style update

$
0
0

Problem/Motivation

The default Dropdown button is being implemented on #3023243: Drop Buttons style update. This issue is a follow-up to get the primary one addressed. At the moment this is not being used anywhere so we want to implement it for potential contrib use cases.

Specs:
FIGMA

Remaining tasks

  • Accessibility review
  • RTL review (Right to left)

Test Instructions

From comment #31 by @bnjmnm
A way to test the use of primary dropbuttons is with the Workbench Moderation module. If moderation is enabled on a content type, the submit button is converted to a dropbutton. (example: after enabling the module -- turn on moderation for the Article content type here /admin/structure/types/manage/article/moderation )

rename locale batch operation callbacks to match the API methods they call

$
0
0

Problem/Motivation

locale_config_batch_set_config_langcodes() and locale_config_batch_refresh_name() are batch operation callbacks which are just wrappers around API methods on the LocaleConfigManager.

However, the names don't match up at all which is confusing:

function locale_config_batch_set_config_langcodes(&$context) {
  Locale::config()->updateDefaultConfigLangcodes();

and:

function locale_config_batch_refresh_name(array $names, array $langcodes, &$context) {
  SNIP
  $context['results']['stats']['config'] += Locale::config()->updateConfigTranslations($names, $langcodes);

Steps to reproduce

Proposed resolution

Rename both callbacks to 'locale_config_batch_' + snake case version of the API method it calls.

No BC handling is necessary as batch API callbacks are internal.

Remaining tasks

  • Update the merge request to retain the procedural functions that wrap the new methods, and add a deprecation (see #5).
  • Fix the coding standards error in the pipeline job (see #16).

User interface changes

API changes

Data model changes

Release notes snippet

Viewing all 294899 articles
Browse latest View live


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