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

Add missing languages present on localize.drupal.org

$
0
0

We should add the missing languages that are not in Drupal core but supported on localize.drupal.org. This is how the localized Drupal install profile looks now with the .po files in place for all l.d.o languages:

Not pretty. We should have an explicit listing for the missing languages. Here are Drupal 6 and 7 patches.


Do not strip www. from cookie domain by default because that leaks session cookies to subdomains

$
0
0

Problem/Motivation

In #56357: Login issues with multiple sites in the same domain (session cookie collision) while fixing various session cookie problems, code was added that strips a leading www. from the cookie domain by default

At the time it may have made sense that people did not want to get logged out switching between www and the bare domain. Now, most sites force one or the other for security and consistency and to avoid possible SEO hits for duplicate content.

This behavior is actually a bug, however, because makes sites less secure because the session cookie is then sent to ALL subdomains by default.
e.g. see http://erik.io/blog/2014/03/04/definitive-guide-to-cookie-domains/

It also make it much harder to defend against file uploads attacks like the one described at https://soroush.secproject.com/blog/2014/05/even-uploading-a-jpg-file-ca...

If www. is not stripped it would be easier to point a different subdomain at your site just for serving files.

Proposed resolution

Remove the www. stripping behavior, or make it configurable and off by default.

Remaining tasks

patch
review

User interface changes

None (unless there is a setting page for the behavior)

API changes

Small change to session cookie behavior

Data model changes

none

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue categoryBug because Drupal will (unexpectedly) send session cookies to subdomains
Issue priorityMajor because this has security implications
Prioritized changesThe main goal of this issue is security
DisruptionPossible disruption for any Drupal 8 site that's already in production and relying on this behavior

Incorrect typehint for FieldConfig::loadByName

Unsupported operand types in Drupal\views\Entity\View->mergeDefaultDisplaysOptions() (line 472 of modules/views/src/Entity/View.php).

$
0
0

I was doing view import, In between site shown "The website encountered an unexpected error. Please try again later."

While looking to error logs in web server it gives,
Error: Unsupported operand types in Drupal\views\Entity\View->mergeDefaultDisplaysOptions() (line 472 of modules/views/src/Entity/View.php).

How do you re-generate thumbnails in media for vimeo hosted videos?

$
0
0

Problem/Motivation

Prior to https://www.drupal.org/project/media_vimeo_domain_privacy I was getting generic/"Bad" thumbnails with bad names when using videos hosted on vimeo. (that module solved that problem for NEW media... They correctly generate thumbnails and names now...)

How do I regenerate the thumbnails and names for each media entity now?

Good and bad names

For example ^^^ the first item in that image is an auto generated name, because prior to using media_vimeo_domain_privacy there were issues getting that meta data out of privacy protected vimeo videos (even if they were allowed to be embeded on the domain).

The bottom two are examples of "good" videos that correctly generate a thumbnail and name based on the vimeo.com provided information.

.... Is there a way to '"regenerate" the thumbnails and displayed names?

Thank you!

Move some methods in MailFormatHelper to a generic helper class

Jsonapi ResourceType error

$
0
0

Hello,

I have Upgraded to 9.30 a few days ago and when I try to uninstall a module or clear cache I receive the following error page;

"The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\jsonapi\ResourceType\ResourceTypeAttribute::withRelatableResourceTypes() in Drupal\jsonapi\ResourceType\ResourceType->Drupal\jsonapi\ResourceType\{closure}() (line 390 of core/modules/jsonapi/src/ResourceType/ResourceType.php).
Drupal\jsonapi\ResourceType\ResourceType->Drupal\jsonapi\ResourceType\{closure}(Array, 'drupal_internal__geoid')
array_reduce(Array, Object, Array) (Line: 392)
Drupal\jsonapi\ResourceType\ResourceType->setRelatableResourceTypes(Array) (Line: 137)
Drupal\jsonapi\ResourceType\ResourceTypeRepository->all() (Line: 115)
Drupal\jsonapi\Routing\Routes->routes()
call_user_func(Array) (Line: 146)
Drupal\Core\Routing\RouteBuilder->rebuild() (Line: 83)
Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild() (Line: 581)
drupal_flush_all_caches() (Line: 31)
Drupal\php\PhpUninstallValidator->removeFilterConfig() (Line: 18)
Drupal\php\PhpUninstallValidator->validate('php') (Line: 633)
Drupal\Core\Extension\ModuleInstaller->validateUninstall(Array) (Line: 99)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->validateUninstall(Array) (Line: 148)
Drupal\system\Form\ModulesUninstallForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 531)
Drupal\Core\Form\FormBuilder->retrieveForm('system_modules_uninstall', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
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: 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: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
"

Thanks for you suggestions.

Mails resembling HTML are corrupted

$
0
0

Problem/Motivation

In \Drupal\Core\Mail\Plugin\Mail\PhpMail::format() there is a conversion from HTML to text which occurs without checking if the input is an instance of MarkupInterface. This causes corruption of a mail that was in fact plain text and contains text that resembles HTML.

E.g.

Today I learnt Greek letters alphaβ they are hard to write.
In HTML, ampersand must be written as &.
I saw your house and <wow> it is great.
If a<b and b<c then a<c.

Steps to reproduce

Install a contrib module that allows sending of messages in plain text format. An example is simplenews. Type a message like the example above.

Proposed resolution

Only call htmlToText() if the input implements MarkupInterface.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.


[meta] Clean up .info.yml files

$
0
0

Problem/Motivation

Current settings included in module, theme and profile .info.yml files should be separated into more appropriate config files, like .settings.yml, .libraries.yml, .regions.yml.

examples with more details:
https://www.drupal.org/project/ideas/issues/1398772#comment-10533558

Proposed resolution

Minimize the configuration included in .info files, as a preparation to use composer for dependency management.

Remaining tasks

Create subtasks to clean up the .info files.

Docs:
Module .info: https://www.drupal.org/docs/creating-custom-modules/let-drupal-know-abou...
Theme .info: https://www.drupal.org/docs/theming-drupal/defining-a-theme-with-an-info...
Profile .info: https://www.drupal.org/docs/distributions/creating-distributions/how-to-...

Hide menu link if view/view-display is empty

$
0
0

Hello,

I have just faced a problem - I need menu link produced by a view display to be hidden if the view output is empty. I've searched in the web, but could't find good solution. Nevertheless, I've discovered, that there is such function for blocks - under "Advanced" -> "Other" -> "Hide block if the view output is empty:Yes/No".

Is there a way to accomplish same effect for menu link/tab? Is it possible to implement this functionality in the view module?

Thanks in advance!

Support third party settings for components within a section

$
0
0

Problem/Motivation

There's an issue to support adding third party settings to sections: #2942661: Sections should have third-party settings, but it would be great to also support third party settings for individual components (blocks) within a section.

For example, modules like Block Class, Field Formatter Class or Fences Block use third party settings on block config entities to allow the user to add arbitrary CSS classes to a block. It seems that the only way to do this with a Layout Builder block is to modify the settings form for the individual block plugin you want to modify and store the configuration along with the other configuration for that block.

Proposed resolution

SectionComponent should implement ThirdPartySettingsInterface

Remaining tasks

N/A

User interface changes

N/A

API changes

Because there was an existing similar approach ($additional)), deprecations are added with full BC

Data model changes

Data model addition

Release notes snippet

N/A

Uncacheable view fields are not evaluating correctly in twig statements inside rewrite output.

$
0
0

After investigating this issues:
#2764651: Global: View Result Counter does not evaluate properly in IF statements
#2821221: Views Counter variable only equal to zero with Twig
I have discovered that uncacheable view fields are not evaluating correctly in twig statements inside rewrite output. So for example if you put IF Statement inside the rewrite output to check the View Result Counter it will not work correctly.

{% if counter==2 %}
Hello World
{% endif %}

or even(string comparison):

{% if counter=='2' %}
Hello World
{% endif %}

From what I have understood while reviewing the source code when the Drupal\views\Plugin\views\style\StylePluginBase::renderFields renders the field the Drupal\views\Plugin\views\field\UncacheableFieldHandlerTrait::render return the placeholder of that field. So during the evaluation of the statement the variable will contain the placeholder instead of the actual value and the above example converts to:

{% if '{{ counter }}'=='2' %}
Hello World
{% endif %}

which results always to false.

A simple way to confirm this is put inside the rewrite output of a View
{% if counter=='{{ counter }}' %}
Hello World
{% endif %}
which results always to true.

Currently from what I saw only Counter and BulkForm are using UncacheableFieldHandlerTrait.

Roadmap to CKEditor 5 stable in Drupal 9

$
0
0

This lays out what remains to be done after #3231364: Add CKEditor 5 module to Drupal core lands in Drupal core.

This plan was originally taken from the IS at #2966864: Add optional support for CKEditor 5 in D9 so we can remove CKE 4 from Drupal 10, and after that from #3201824: Roadmap to core.

💯 Roadmap to Alpha

  1. ✅ Create the ckeditor5 module
  2. ✅ Create an @Editor PHP plugin with the ID ckeditor5.
  3. ✅ Create a Drupal.editors JS plugin with the ID ckeditor5.
  4. ✅ Getting CKE5 (CKEditor 5) to load at all on the /node/add/article form.
  5. #3201820: Manually test that CKE 5 can be used in off-canvas
  6. ✅ Enable a Drupal + CKE5 ecosystem
    1. #3196178: Provide test module to verify contrib can extend CKEditor5
    2. #3200008: Validation and editor settings
  7. ✅ A CKE5 configuration UI
    1. #3198297: Toolbar UI for selecting and sorting buttons
  8. ✅ Ensure Quick Edit integration works
    1. #3201648: Add test coverage for Quick Edit integration
    2. #3205090: Field html not restored when cancelling Quick Edit
  9. ✅ Evaluate CK4 plugins and match features
    1. #3194650: Support media elements and browse media library
    2. #3194111: Support inline image upload
    3. #3201646: Add support for image caption (<img data-caption>)
  10. #3201821: Add JavaScript test coverage for CKE 5
  11. #3206686: IE11 warning for CKE5 in Drupal 9

💯 Roadmap to Beta

  1. #3215506: Plugins should be enableable based on toolbar configuration
  2. ✅ Ensure filter_html's HTML restrictions are respected inside CKE5 — tackled in #3201637: Figure out how to prevent data loss during upgrade/migration path
  3. #3206687: Toolbar UI accessibility review
  4. #3201641: Improve the HTML filter configuration UX
  5. Enable translation features for CKEditor 5
    1. #3202664: CKEditor 5's UI language should match Drupal's interface translation

Roadmap to Stable

  1. Ensure that sites can update from using CKE4 to CKE5 safely when using no contributed CKEditor modules
    1. Ensure that Arbitrary HTML is not lost: #3216021: Automatically use CKE5's General HTML Support feature on text formats without any TYPE_HTML_RESTRICTOR filter + add `sourceEditing` button
    2. #3201637: Figure out how to prevent data loss during upgrade/migration path
    3. #3216015: Generate CKEditor 5 configuration based on pre-existing text format configuration
    4. #3245079: Automatic upgrade path always enables all <h*> tags when only >=1 was enabled before
    5. #3245320: Automatic upgrade path always disables image uploads — in the UI
    6. #3227822: GHS: ensure it works with our custom plugins, to allow adding additional attributes
  2. Ensure contrib modules can do everything: translations, automatic upgrade path from CKE4 …
    1. #3226335: Follow-up for #3216015: allow contrib & custom Drupal modules providing CKEditor 4 plugins to specify their CKEditor 5 equivalents + settings to be migrated
    2. #3228464: [upstream] API for contrib projects to load CKEditor translations
    3. #3228778: Drupal-specific CKEditor 5 plugins should be able to use Drupal's JS translation API: Drupal.t()
    4. #3245723: Follow-up for #3201637: omitting PrimitiveTypeConstraint violations for filter settings is implemented too broadly
    5. #3245807: DX: allow contrib modules to subclass \Drupal\Tests\ckeditor5\Kernel\ValidatorsTest
    6. #3248430: Improve Drupal.ckeditor5 documentation
  3. ✅ Ensure CKE5 equivalent plugins of CKE4 generate/support equivalent markup: #3222801: [META] Ensure CKE5 equivalent plugins of CKE4 generate/support equivalent markup
    1. Infra: #3215466: Attribute values not accounted for in CKEditor5PluginManager::getProvidedElements
    2. Infra: #3207660: Allow using a subset of the tags supported by the enabled CKEditor 5 plugins
    3. #3222851: <cite>
    4. #3222847: <img width height>
    5. #3222838: Configure basicStyles.Italic to output <em> instead of <i>
    6. #3222842: <a hreflang> + <blockquote cite>
    7. #3222847: <img width height>
    8. #3220293: Make all supported heading types visible in the UI
    9. #3222840: <ol start>
    10. #3222852: <dl> <dt> <dd> by introducing "Manually editable HTML tags" configuration on Source Editing
    11. #3224256: <h* id> (or more generically: <$block id>)
    12. #3222808: Follow-up for #3201646: markup in image captions is lost
    13. #3228346: Follow-up for #3222852: revert ineditable attributes (<blockquote cite> and <a hreflang>) now that Source Editing plugin can handle arbitrary elements & attributes
    14. #3246168: Images are not linkable through UI; already linked images are unlinked (data loss!)
    15. #3246169: Embedded media are not linkable through UI; already linked embedded media are unlinked (data loss!)
    16. #3222756: [upstream] Allow using images from external source
  4. Ensure CKE5 functionality matches that of Drupal core's CKE4:
    1. #3201646: Add support for image caption (<img data-caption>)
    2. #3211050: Add "Alignment" plugin
    3. #3211125: Add "Block Indentation" plugin, but only allow list indentation
    4. #3211282: Add plugins which are provided as a part of essential plugin: Undo/Redo
    5. #3211610: Add "Horizontal line" plugin.
    6. #3224652: [drupalImage] Add ckeditor5-image's imageresize plugin to allow image resizing
    7. #3222797: [upstream] Upgrade path from CKEditor 4's StylesCombo
    8. #3227871: Add ckeditor5-paste-from-office to allow pasting from Microsoft Office & Google Docs
    9. #3227875: Add ckeditor5-remove-format to allow removing formatting from pasted content
    10. #3227890: Add ckeditor5-special-characters to allow inserting special characters for users that do not know the native picker
    11. #3230230: [upstream] Enable table captions; override CKE5's default downcast to generate <table><caption></table> instead of <figure><table><figcaption></figure>
    12. #3245720: [PP-1] [drupalMedia] Support choosing a view mode for <drupal-media>
    13. #3245950: [upstream] [assuming CKE5 Jan 2022 release adds <script> to GHS] Add the "HTML Embed" CKE5 plugin when it supports visualizing <script> tags
    14. #3246365: [drupalMedia] Show the Image Media's default alt text that is being overridden
    15. #3246380: [drupalMedia] Media previews do not update after alt text was modified
    16. #3246385: [drupalMedia] Support captions and alignment on <drupal-media>
    17. #3247246: Attribute value encoding not compatible with Xss::filter()
    18. #3247634: [upstream] Unlinking linked inline images while GHS is enabled: wrapping <a> is impossible to remove
    19. #3248448: Dialog loading text is unstyled
    20. #3224261: Front-end performance: concatenate CKEditor 5 JS assets for every unique configuration
  5. ✅ Documentation gates:
    1. #3205654: ckeditor5_hook_help()
    2. #3201186: Create ckeditor5.api.php (the core equivalent of README.md) + CKEditor5PluginDefinition::toArray()
    3. #3243850: hook_ckeditor5_plugin_info_alter()'s example sets ['drupal']['config'], but that's not one of the documented definition properties
  6. Theming CKEditor 5
    1. #3194084: Support ckeditor_stylesheets setting in theme info, allow CSS to work for both CKEditor 4 and 5
    2. #3202666: Follow-up for #3198297 Improve admin CSS DX
  7. Media improvements
    1. #3196593: Ease the transition to Media: save image uploads in CKEditor 5 as media entities when media is enabled? (or module specific solution if core issue won't land)
    2. #3073901: Determine an upgrade path from CKEditor image button to media library (or module specific solution if core issue won't land)
  8. Accessibility
  9. Test coverage, reliability and maintainability matching or exceeding CKEditor 4's:
    1. #3206522: Add FunctionalJavascript test coverage for media library
    2. #3206523: Add FunctionalJavascript test coverage for image upload
    3. #3201641: Improve the HTML filter configuration UX
    4. #3228920: Improve internal consistency: consistent variable names and return type syntax
    5. #3228334: Refactor HTMLRestrictionsUtilities to a HtmlRestrictions value object
    6. #3228580: Follow-up for #3222852: additional test coverage for real-time validation race conditions
    7. #3229078: Unit tests for all @CKEditor5Plugin plugin classes
    8. #3231327: Plugin definition DX: validate ckeditor5.drupal.elements items
    9. #3231328: [PP-1] Make SmartDefaultSettings to take into account attribute value restrictions
    10. #3231334: [PP-1] Add validation for attributes allowed or forbidden on all elements
    11. #3231336: [PP-1] Add validation for HTML restrictor filters that only set forbidden_tags
    12. #3231337: [drupalMedia] Remove manual dataDowncast from DrupalMediaEditing
    13. #3231362: Refactor ImageUpload's ::validateImageUploadSettings() into the proper validate and submit methods
    14. #3238257: Fragment link pointing to <textarea> should be redirected to CKEditor 5 instance when CKEditor 5 replaced that textarea
    15. #3228505: Plugin definition DX: automatically check for plugin definitions whether their ::getDefaultSettings() matches the config schema
    16. #3243867: ckeditor5_module_implements_alter() looks like it has incorrect logic
    17. #3245400: Add an @throws PHPDoc everywhere exceptions are thrown
    18. #3246280: Defense in depth: add anti-CSRF token to this module's routes
    19. #3246521: Make plugin.manager.ckeditor4to5upgrade.plugin a private service
    20. #3246524: Make more (all?) classes @internal
    21. #3247683: Disable CKEditor 5's automatic link decorators (in Drupal filters should be used instead) + explicitly test manual link decorators
    22. #3247711: Simplify and accelerate builds: update our use of the CKEditor 5 DLL manifest
    23. #3248188: Plugin definition DX: validate drupal.conditions
    24. #3248432: Split DrupalImageEditing into multiple plugins
    25. #3248425: Ensure that all classes and functions in Drupal-specific CKEditor 5 plugins are documented
    26. #3248423: Decide how CKEditor 5-provided types should be referenced
  10. Low-hanging fruit major UX improvements over CKEditor 4:
    1. #3227354: Add support for ckeditor5-autoformat
  11. Superior configuration UX:
    1. #3201641: Improve the HTML filter configuration UX
    2. #3216015: Generate CKEditor 5 configuration based on pre-existing text format configuration
    3. #3225033: Make image upload plugin depend on editor_file_reference filter + ensure good UX for this
    4. #3226694: Follow-up for #3216015: refactor SmartDefaultSettings to return messages rather than sending them
    5. #3227948: Hide incompatible filters
    6. #3245967: Messages upon switching to CKEditor 5 are overwhelming
    7. #3248177: Language toolbar item cannot be removed from the toolbar
  12. ✅ Moving things into core that can only happen once it is in core:
    1. #3231324: Use core icons where possible after moving to core
    2. #3231325: Use pre-existing filter format config from YAML instead of duplicating it in PHP
  13. Performance
    1. #3248469: Research if the CKE off-canvas CSS reset could be optimized

Roadmap after Stable

  1. Upstream improvements that would simplify or improve CKEditor 5:
    1. #3226673: API addition: \Drupal\editor\Plugin\EditorPluginInterface::getDefaultSettings() should accept old Editor + Format to generate smart defaults
    2. #3230829: editor_form_filter_format_form_alter() does not remove "editor_plugin" from form state when needed
    3. #3231322: Fix a @todo: move a form alteration to the CKEditor 5 plugin's subform definition
    4. #3231341: Deprecate EditorLinkDialog and EditorImageDialog in Drupal 9, remove in Drupal 10
    5. #3231342: Introduce ConfigEntityForm to standardize use of validation constraints for config entities
    6. #3231347: Add Editor::setFilterformat()
    7. #3231354: [META] Discuss: merge the Editor config entity into the FilterFormat config entity
    8. #3246260: [PP-1] Simplify CKEditor5ImageController once #2940383 lands
  2. Obsoleteness of upgrade path in Drupal 11:
    1. #3239012: Remove the upgrade path from CKEditor 4

Use lifecycle: experimental instead of the current experimental: true in the .info.yml-files

$
0
0

Problem/Motivation

With #3124762: Add 'lifecycle' key to .info.yml files committed, we now have a lifecycle key to indicate the status of a module/theme.

Currently, experimental themes use the key/value pair: experimental: true in their .info.yml-files.
This issue is here to replace that with the key/value pair: lifecycle: experimental.

The patch in this issue started out in #3215045: Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation, but was split into its own issue to prevent scope creep.

Steps to reproduce

Proposed resolution

- Replace all occurrences of key/value pairexperimental: true in Core's *.info.yml-files with lifecycle: experimental.
Currently there are 2 occurrences:

    core/modules/system/tests/themes/experimental_theme_test/experimental_theme_test.info.yml
    core/themes/claro/claro.info.yml

- Key/value pair experimental: true will be properly deprecated in #3250342: [PP-1] Deprecate "experimental: true" in .info.yml

Remaining tasks

Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

Note to people with The Power

Please assign credit for this patch according to issue #3215045: Highlight obsolete module's status at admin/reports/status page, providing warning and link with explanation up to #34

Refactor (if feasible) use of jquery is function to use vanillaJS

$
0
0

Problem/Motivation

As mentioned in the parent issue #3238306: [META] Where possible, refactor existing jQuery uses to vanillaJS to reduce jQuery footprint, we are working towards reducing our jQuery footprint. One of the ways to accomplish this is to reduce the number of jQuery features used in Drupal core. We have added eslint rules that identify specific features and fail tests when those features are in use.

There are (or will be) individual issues for each jQuery-use eslint rule. This one is specific to jquery/no-is, which targets the jQuery is function.

Steps to reproduce

Proposed resolution

Remaining tasks

  • In core/.eslintrc.jquery.json Change "jquery/no-is": 0, to "jquery/no-is": 2, to enable eslint checks for uses of jQuery css(). With this change, you'll be able to see uses of the undesirable jQuery feature by running yarn lint:core-js-passing from the core directory
  • Add the following lines to core/scripts/dev/commit-code-check.sh so the DrupalCI testing script can catch this jQuery usage on all files, not just those which have changed
    # @todo Remove the next chunk of lines before committing. This script only lints
    #  JavaScript files that have changed, so we add this to check all files for
    #  jQuery-specific lint errors.
    cd "$TOP_LEVEL/core"
    node ./node_modules/eslint/bin/eslint.js --quiet --config=.eslintrc.passing.json .
    
    CORRECTJQS=$?
    if [ "$CORRECTJQS" -ne "0" ]; then
      # No need to write any output the node command will do this for us.
      printf "${red}FAILURE ${reset}: unsupported jQuery usage. See errors above."
      STATUS=1
      FINAL_STATUS=1
    fi
    cd $TOP_LEVEL
    # @todo end lines to remove

    Add the block about 10 lines before the end of the file, just before if [[ "$FINAL_STATUS" == "1" ]] && [[ "$DRUPALCI" == "1" ]]; then, then remove it once all the jQuery uses have been refactored.

  • If it's determined to be feasible, refactor those uses of jQuery is() to use Vanilla (native) JavaScript instead.

User interface changes

API changes

Data model changes

Release notes snippet


Fix mismatch of $base_url with Symfony request object

$
0
0

Follow-up to #2528988: Remove the option to specify a base_url from within settings.php

Problem/Motivation

- $base_url is not the same as $base_root . $request->getBasePath() in Symfony.
- This leads to lots of problems with TrustedRedirectResponse() as it thinks we redirect to an external path.
- Therefore #2528988: Remove the option to specify a base_url from within settings.php did not reach its goal to unify both approaches, but made it in fact almost impossible to work-around the mismatch

Proposed resolution

- Use Symfony function to find the script instead of $_SERVER['SCRIPT_NAME']

Remaining tasks

- Do it

ContentEntity source plugin shouldn't throw exception when the bundle key is missing: unavoidable in rollback situations

$
0
0

Problem/Motivation

The ContentEntity source plugin throws an exception when it is configured to use a bundleable entity as source, but the bundle source configuration cannot match an existing bundle. IMHO this shouldn't happen.

This source plugin is used by the d7_entity_reference_translation follow-up migrations which are (re-)generated on the fly, while the migrations are executed. See EntityReferenceTranslationDeriver, MigrateUpgradeImportBatch and MigrationWithFollowUpInterface for reference. The problem is that when e.g. node migrations (and the supporting configuration migration d7_node_type) gets rolled back, the previously generated d7_entity_reference_translation follow-up migration derivatives still exist, but since the node_type config entities do not exist anymore, the ContentEntity plugin throws an exception without any good reason: since it adds the bundle condition to its entity query, that will return zero rows for a missing bundle.

Steps to reproduce

See above.

Proposed resolution

Do not throw exception when the bundle source configuration cannot match an existing bundle. Instead, log a debug message.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

allow entity queries to query reverse relationships

$
0
0

I just discovered that entity queries can handle relationships -- these docs in QueryInterface::condition() explain it:

   * @param $field
   *   Name of the field being queried. It must contain a field name, optionally
   *   followed by a column name. The column can be the reference property,
   *   usually "entity", for reference fields and that can be followed
   *   similarly by a field name and so on. Additionally, the target entity type
   *   can be specified by appending the ":target_entity_type_id" to "entity".
   *   Some examples:
   *   - nid
   *   - tags.value
   *   - tags
   *   - tags.entity.name
   *   - tags.entity:taxonomy_term.name
   *   - uid.entity.name
   *   - uid.entity:user.name

It would be really nice to be able to do reverse relationships as well.

Add grouping to views REST Serializer formatter

$
0
0

Problem/Motivation

Currently it is not possible to group REST results in views.
views rest formatter

Proposed resolution

Implement grouping functionality.

User interface changes

Add grouping select to views formatter settings.
views rest formatter grouped

Field mapping options in media type form are not sorted correctly

$
0
0

Problem/Motivation

The list of fields in the field mapping section of the media type form is not sorted.

Steps to reproduce

Proposed resolution

The $options should be sorted with natcasesort().

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Viewing all 293349 articles
Browse latest View live


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