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

Add skip-process option to file_copy and download process plugins

$
0
0

The file_copy process plugin being added in #2695297: Refactor EntityFile and use process plugins instead throws MigrateException when a copy fails, aborting the entire row being processed. This makes sense for the core usages in d6_file and d7_file, where it makes no sense to create the file entity if the file itself does not exist in Drupal. However, in contrib we'd like to use this plugin in other contexts - in particular, to copy a file and create a file entity within a file/image field mapping in a node migration (#2635622: Process plugin for importing/creating files by URL). In this case, we don't want to throw out the node for the sake of a missing file, we just want to leave the field empty.

To support this, let's add a skip_process_on_failure option - when set to TRUE, we'll throw MigrateSkipProcessException instead of MigrateException.


Installer tests fail if contrib driver hides database credentials form fields

$
0
0

Problem/Motivation

If a contrib driver sets database credentials fields to 'hidden' in the installation form, Installer tests fail because Mink cannot find the fields to be set.

Proposed resolution

In InstallerTestBase::setUpSettings, remove the fields that Mink cannot update before calling drupalPostForm.

Remaining tasks

Review.

User interface changes

none

API changes

none

Data model changes

none

Disallow saving config entities with applied configuration overrides

$
0
0

If you use the Drupal's admin in another language than the default language when enabling module or adding field or making any new translatable config, you risk having different langcode in your exported configuration. Most of the time you don't want that.

I think we can help the user to avoid that. A simple warning?

Or perhaps in the installer we can be clearer about what is the default language, and give an option to force configuration always to be saved first in the default language.

Another way would be to lock the language in administration by default in the default language and warn the user of potential side effect if he wants to change this setting.

For the end user is sometimes hard differentiate between configuration and content.

Peoples that did that by mistake:
https://wunder.io/blog/drupal-8-translations-best-practices
https://drupal.stackexchange.com/questions/223665/how-to-change-default-...

[meta] 8.7.0 beta testing

$
0
0

This issue tracks the status of the 8.7.0 beta testing program, the recommended testing procedure is described in the handbook page. An overview of the beta testing program status is available at the tracking spreadsheet.

Testing instructions

People and organizations that joined the program are listed in the tracking spreadsheet and are expected to keep the row referencing them up-to-date. Each row contains the following information:

  • Username of the reference person linking the drupal.org profile
  • The testing outcome: either passed if no significant regression was found, or failed otherwise
  • A link to the reported issues in the following form:
    =HYPERLINK("https://www.drupal.org/project/issues/search/drupal?issue_tags_op=%3D&issue_tags=8.7.0%20beta%20testing&submitted=USERNAME";"issues")
  • A brief description of the testing process.

Any regression found should be reported in the Drupal core issue queue, should reference this meta issue as parent, and should be tagged with the 8.7.0 beta testing tag. This does not apply to security issues, which should be reported privately following the standard procedure.

Update notification messages as an option in settings

$
0
0

This is one settings that is really missing in Drupal (both 7 and 8).
It was really annoying because (almost) every admin page has this Update notification message if you don't have the latest modules and you want to keep Update module enabled because of Drush up.

32.png

The goal of this issue is to hide this notifications in Update module's settings page - /admin/reports/updates/settings

For all users.
Like this.

33.png

Of course it will be enabled by default but at least you can disable it to stop spamming you while developing.

P.S. The similar patch would apply to Drupal 8 too.

EDIT:
Drupal 7 patch in #1
Drupal 8 patches from #2 on.

Form blocks rendered inside layout builder break save

$
0
0

I can no longer save changes to the layout after any kind of form has been added to the layout.

Steps to reproduce:
1. Enable layout builder on a content type, then open layout builder.
2. Add 'Search Form' block to a section
3. Save the layout
4. Re-open the layout builder, and make some change (e.g. reorder blocks)
5. Attempt to save the layout

The page refreshes, but still shows unsaved changes. At this point, it is no longer possible to save the layout until the search form is removed.

Non interactive install with configuration overrides is broken

$
0
0

Problem/Motivation

Steps to reproduce:

  1. Install standard in German
  2. Enable config_translation
  3. Add the english language
  4. Edit the standard profile to not have an standard_install() and add keep_english: true to its .info.yml file
  5. Export the configuration using drush
  6. Re-install the site using drush site-install with the --existing-config flag.

You'll see an error like

 [info] Undefined index: id ConfigurableLanguageManager.php:312 [16.45 sec, 58.13 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [16.45 sec, 58.13 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [16.45 sec, 58.13 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [16.45 sec, 58.13 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [16.45 sec, 58.13 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [16.45 sec, 58.13 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [21.25 sec, 62.74 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [21.25 sec, 62.75 MB]
 [info] Undefined index: id ConfigurableLanguageManager.php:312 [21.25 sec, 62.75 MB]
 [info] Undefined index: field_type FieldConfigStorageBase.php:25 [22.66 sec, 76.9 MB]
 [info] Undefined index: field_type FieldConfigStorageBase.php:28 [22.66 sec, 76.94 MB]

In FieldConfigStorageBase.php line 28:

  [RuntimeException]
  Unable to determine class for field type '' found in the 'field.field.' configuration

Proposed resolution

The problem is caused by container invalidation not causing a reboot. In a non-interactive install container invalidation shouldn't occur because we don't know what the next task is going to do with the container.

Remaining tasks

User interface changes

API changes

Data model changes

Convert schema.inc to a service

$
0
0

Problem/Motivation

Convert the schema.inc functions to a service so it can be injected, unit tested and swapped. Affected functions:

  • drupal_get_schema_versions()
  • drupal_get_module_schema()
  • drupal_schema_get_field_value()

The following functions should fall into the scope of extension services and should be moved in #2908886: Split off SchemaInstaller from schema.inc

  • drupal_get_installed_schema_version()
  • drupal_set_installed_schema_version()
  • drupal_install_schema()
  • drupal_uninstall_schema()
  • _drupal_schema_initialize()

Already removed in https://www.drupal.org/node/2467521

  • drupal_get_schema()
  • drupal_get_complete_schema()
  • drupal_get_schema_unprocessed()

Proposed resolution

Create a schema service with methods that replace the mentioned functions in schema.inc.

Remaining tasks

Deprecate the functions changed by this issue. https://www.drupal.org/core/deprecation#how-function

Move the extension-related functions into extension services. Follow-up or find child issue here: #2186491: [meta] D8 Extension System: Discovery/Listing/Info

User interface changes

None

API changes

New Schema service with the following methods:

  • get
  • getComplete
  • getVersions
  • getInstalledVersion
  • setInstalledVersion
  • install
  • uninstall
  • getUnprocessed
  • getFieldsSqlgetFieldValue

Contextual links destination uses internal paths, not path aliases

$
0
0

When viewing an entity with an alias, the edit link sets the destination path using the system path, rather than the alias.

So after editing, the user is returned to the system path - e.g. node/1.

This is likely to be confusing and annoying for content editors.

For example, from a taxonomy term with the alias technologies/drupal, the edit link is taxonomy/term/11/edit?destination=taxonomy/term/11

MapItem unserialize function in setValue method should allow TranslatableMarkup class

$
0
0

In SA-CORE-2019-003 code below was introduced in MapItem.php and introduced a bug which throws fatal errors because of incomplete object which previously worked.

if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
    $values = unserialize($values, ['allowed_classes' => FALSE]);
}
else {
  $values = unserialize($values);
}

if class is passed like for example in commerce logs.
https://www.drupal.org/forum/support/post-installation/2019-02-28/fatal-....

Returns fatal error like below.
Fatal error: method_exists(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Drupal\Core\StringTranslation\TranslatableMarkup" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in ...

I think we can allow TranslateableMarkup here on the list of allowed classes as it is considered that
"Strings sanitized by t() are automatically marked safe" as listed here

This would solve issues below:
https://www.drupal.org/project/commerce/issues/3040333#comment-13022686
https://www.drupal.org/forum/support/post-installation/2019-02-28/fatal-....

Providing patch for this.

Entity queries for latest revisions should return the latest workspace-specific revisions

$
0
0

Problem/Motivation

Doing a 'latest revision' entity query should return the latest workspace-specific revisions, otherwise a user could edit a revision that belongs to a different workspace.

Proposed resolution

Make latest revision entity queries return the latest workspace-specific revisions instead.

Remaining tasks

Review.

User interface changes

Nope.

API changes

Nope.

Data model changes

Nope.

Release notes snippet

Nope.

Source plugin uses oEmbed suggestions is not working with the provider name, if available

$
0
0

I tried to play with media_theme_suggestions_media, but it did not work in my case - seems that Drupal is not going into the hook_theme_suggestions_media
for example:

media-oembed-iframe--provider-vimeo.html
media-oembed-iframe--provider-youtube.html

I know I may have something wrong with media__source_ but It's not showing
the suggestion in the twig debug to know the right format

Thanks for all your work on the media module

Opened this issue as a follow up on the following lin
https://www.drupal.org/project/drupal/issues/2998091#comment-13013994
from
#2998091: Remote videos overflow their containing element

/**
 * Implements hook_theme_suggestions_HOOK().
 */
function media_theme_suggestions_media(array $variables) {
  $suggestions = [];
  /** @var \Drupal\media\MediaInterface $media */
  $media = $variables['elements']['#media'];
  $sanitized_view_mode = strtr($variables['elements']['#view_mode'], '.', '_');

  $suggestions[] = 'media__' . $sanitized_view_mode;
  $suggestions[] = 'media__' . $media->bundle();
  $suggestions[] = 'media__' . $media->bundle() . '__' . $sanitized_view_mode;

  // Add suggestions based on the source plugin ID.
  $source = $media->getSource();
  if ($source instanceof DerivativeInspectionInterface) {
    $source_id = $source->getBaseId();
    $derivative_id = $source->getDerivativeId();
    if ($derivative_id) {
      $source_id .= '__derivative_' . $derivative_id;
    }
  }
  else {
    $source_id = $source->getPluginId();
  }
  $suggestions[] = "media__source_$source_id";

  // If the source plugin uses oEmbed, add a suggestion based on the provider
  // name, if available.
  if ($source instanceof OEmbedInterface) {
    $provider_id = $source->getMetadata($media, 'provider_name');
    if ($provider_id) {
      $provider_id = \Drupal::transliteration()->transliterate($provider_id);
      $provider_id = preg_replace('/[^a-z0-9_]+/', '_', mb_strtolower($provider_id));
      $suggestions[] = end($suggestions) . "__provider_$provider_id";
    }
  }

  return $suggestions;
}

Comment:: Comment system doesn't render for Article and Recipe Content type.

$
0
0

Hi,

While adding comment field on article or recipe content type, the comment system doesn't render for their respective node pages.

How to reproduce:

  • - Enable Comment Module.
  • - Create a comment type targeting entity type content.
  • - Add a comment field on article content type or recipe content type.
  • - Create a new content of Article content type or recipe content type.
  • - View the newly created node page of article content type or recipe content type.

Thanks

Convert TaxonomyFieldTidTest to a kernel test

$
0
0

Problem/Motivation

TaxonomyFieldTidTest makes no HTTP requests but is a functional test.

Proposed resolution

Convert it to a kernel test.

Create an interface for LayoutBuilderSampleEntityGenerator

$
0
0

Problem/Motivation

As a public service, LayoutBuilderSampleEntityGenerator should have an interface.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Create an interface for InlineBlockUsage

$
0
0

Problem/Motivation

InlineBlockUsage was added as an internal class, but as a public service it deserves an interface now.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Layout Builder's Quick Edit integration causes fatals when using field blocks for entities other than the one being viewed

$
0
0

Problem/Motivation

On 8.8.x. Standard, Install Layout Builder and enable Layout Builder and override on Basic page.

1. Create a new Basic page.
2. Override the layout.
3. Click "Add Block" , add "Name" under "User fields"
4. Save the layout

The website encountered an unexpected error. Please try again later.

Stack trace:

Error: Call to a member function isDisplayConfigurable() on null in Drupal\layout_builder\QuickEditIntegration->supportQuickEditOnComponent() (line 316 of /Users/john/code/drupal/core/modules/layout_builder/src/QuickEditIntegration.php) #0 /Users/john/code/drupal/core/modules/layout_builder/src/QuickEditIntegration.php(140): Drupal\layout_builder\QuickEditIntegration->supportQuickEditOnComponent(Array, Object(Drupal\node\Entity\Node)) #1 /Users/john/code/drupal/core/modules/layout_builder/layout_builder.module(169): Drupal\layout_builder\QuickEditIntegration->entityViewAlter(Array, Object(Drupal\node\Entity\Node), Object(Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay)) #2 /Users/john/code/drupal/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): layout_builder_entity_view_alter(Array, Object(Drupal\node\Entity\Node), Object(Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay)) #3 /Users/john/code/drupal/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(308): Drupal\Core\Extension\ModuleHandler->alter('node_view', Array, Object(Drupal\node\Entity\Node), Object(Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay)) #4 /Users/john/code/drupal/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(242): Drupal\Core\Entity\EntityViewBuilder->buildMultiple(Array) #5 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build(Array) #6 /Users/john/code/drupal/core/lib/Drupal/Core/Render/Renderer.php(378): call_user_func(Array, Array) #7 /Users/john/code/drupal/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #8 /Users/john/code/drupal/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false) #9 /Users/john/code/drupal/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #10 /Users/john/code/drupal/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #11 /Users/john/code/drupal/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #12 /Users/john/code/drupal/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #13 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #14 /Users/john/code/drupal/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #15 /Users/john/code/drupal/vendor/symfony/http-kernel/HttpKernel.php(156): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #16 /Users/john/code/drupal/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #17 /Users/john/code/drupal/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /Users/john/code/drupal/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /Users/john/code/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #20 /Users/john/code/drupal/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #21 /Users/john/code/drupal/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #22 /Users/john/code/drupal/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #23 /Users/john/code/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #24 /Users/john/code/drupal/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #25 /Users/john/code/drupal/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #26 /Users/john/code/drupal/.ht.router.php(65): require('/Users/john/cod...') #27 {main}.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Views module is adding an extra div.views-element-container for no reason

$
0
0

Problem/Motivation

Views module is adding an extra <div> element for no apparent reason when rendering a view block or EVA attachment. As if having the wrapper from both the block and views-view templates wasn't enough, there is a third coming through via the Views element pre-render callback, which sets #theme_wrappers container.

<?php
  if (empty($view->display_handler->getPluginDefinition()['returns_response'])) {
    $element['#attributes']['class'][] = 'views-element-container';
    $element['#theme_wrappers'] = array('container');
  }
<div class="block block-blah-blah">
  <div class="views-element-container">
    <div class="view view-name blah-blah">
      ...
    </div> 
  </div>
</div>

Proposed resolution

Remove it:

<div class="block block-blah-blah">
  <div class="view view-name blah-blah">
    ...
  </div> 
</div>

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

Twig\Error\SyntaxError: An exception has been thrown during the compilation of a template ("Attribute "name" does not exist for Node "Twig\Node\CheckToStringNode"

$
0
0

Upgrading from 8.6.10 to 8.6.11 and 8.6.12 causes the white screen of death to appear on specific admin pages.

"/admin/modules/update" and "/admin/modules/install" both work, but "/admin/modules/uninstall" gives the error:

Twig\Error\SyntaxError: An exception has been thrown during the compilation of a template ("Attribute "name" does not exist for Node "Twig\Node\CheckToStringNode".") in "core/themes/stable

"/admin/reports/dblog" gives:

Twig\Error\SyntaxError: An exception has been thrown during the compilation of a template ("Attribute "name" does not exist for Node "Twig\Node\CheckToStringNode".") in "core/themes/classy

"/admin/reports/updates" gives:

Twig\Error\SyntaxError: An exception has been thrown during the compilation of a template("Attribute "name" does not exist for Node "Twig\Node\CheckToStringNode".") in "core/themes/stable

There may be more, but that's all I've come across so far.

Support enclosure field in Views RssFields row plugin

$
0
0

Problem/Motivation

The RSS format has the <enclosure> tag for "attaching" media to an item. It is typically used for the main image of an article or the audio file of a podcast issue.

Views has an RSS Enclosure formatter but it looks like it cannot really be used. Only the fields selected in the RssFields plugin settings form are rendered.

Proposed resolution

Add an optional "Enclosure field" option to RssFields.

Remaining tasks

User interface changes

API changes

Data model changes

Viewing all 292543 articles
Browse latest View live