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

media_library_update_8701() fails during update from 8.6.15 to 8.7.0

$
0
0

I'm still looking into this, but wanted to create an issue so others can help out if they are seeing the same problem.

When I run drush updb it fails with this error:

The display context is not a valid context.

I traced that error to Drupal\Component\Plugin\ContextAwarePluginBase->getContextDefinition(), and left a debug_print_backtrace() before the Exception gets thrown, producing:

#0  Drupal\Component\Plugin\ContextAwarePluginBase->getContextDefinition() called at [/app/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php:115]
#1  Drupal\Core\Plugin\ContextAwarePluginBase->getContextDefinition() called at [/app/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php:53]
#2  Drupal\Core\Plugin\ContextAwarePluginBase->getContext() called at [/app/web/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php:140]
#3  Drupal\Component\Plugin\ContextAwarePluginBase->getContextValue() called at [/app/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php:94]
#4  Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->getSectionList() called at [/app/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php:104]
#5  Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->getDisplay() called at [/app/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php:371]
#6  Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->isLayoutBuilderEnabled() called at [/app/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php:432]
#7  Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage->isApplicable() called at [/app/web/core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php:100]
#8  Drupal\layout_builder\SectionStorage\SectionStorageManager->findByContext() called at [/app/web/core/modules/layout_builder/src/LayoutEntityHelperTrait.php:124]
#9  Drupal\layout_builder\InlineBlockEntityOperations->getSectionStorageForEntity() called at [/app/web/core/modules/layout_builder/src/LayoutEntityHelperTrait.php:38]
#10 Drupal\layout_builder\InlineBlockEntityOperations->isLayoutCompatibleEntity() called at [/app/web/core/modules/layout_builder/src/InlineBlockEntityOperations.php:169]
#11 Drupal\layout_builder\InlineBlockEntityOperations->handlePreSave() called at [/app/web/core/modules/layout_builder/layout_builder.module:206]
#12 layout_builder_entity_presave()
#13 call_user_func_array() called at [/app/web/core/lib/Drupal/Core/Extension/ModuleHandler.php:403]
#14 Drupal\Core\Extension\ModuleHandler->invokeAll() called at [/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:349]
#15 Drupal\Core\Config\Entity\ConfigEntityStorage->invokeHook() called at [/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:491]
#16 Drupal\Core\Entity\EntityStorageBase->doPreSave() called at [/app/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php:445]
#17 Drupal\Core\Entity\EntityStorageBase->save() called at [/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:263]
#18 Drupal\Core\Config\Entity\ConfigEntityStorage->save() called at [/app/web/core/lib/Drupal/Core/Entity/EntityBase.php:394]
#19 Drupal\Core\Entity\EntityBase->save() called at [/app/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:613]
#20 Drupal\Core\Config\Entity\ConfigEntityBase->save() called at [/app/web/core/modules/media_library/media_library.install:77]
#21 media_library_update_8701() called at [/app/vendor/drush/drush/commands/core/drupal/update.inc:65]
#22 drush_update_do_one() called at [/app/vendor/drush/drush/commands/core/drupal/batch.inc:163]
#23 _drush_batch_worker() called at [/app/vendor/drush/drush/commands/core/drupal/batch.inc:111]
#24 _drush_batch_command() called at [/app/vendor/drush/drush/includes/batch.inc:98]
#25 drush_batch_command() called at [/app/vendor/drush/drush/commands/core/drupal/update.inc:235]
#26 _update_batch_command() called at [/app/vendor/drush/drush/commands/core/core.drush.inc:1231]
#27 drush_core_updatedb_batch_process() called at [/app/vendor/drush/drush/includes/command.inc:422]
#28 _drush_invoke_hooks() called at [/app/vendor/drush/drush/includes/command.inc:231]
#29 drush_command() called at [/app/vendor/drush/drush/includes/command.inc:199]
#30 drush_dispatch() called at [/app/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:67]
#31 Drush\Boot\BaseBoot->bootstrap_and_dispatch() called at [/app/vendor/drush/drush/includes/preflight.inc:67]
#32 drush_main() called at [/app/vendor/drush/drush/drush.php:12]

I don't have much ContextAwarePlugin experience but it appears that its looking for a "display" context on the image style that media_library_update_8701 is creating. But I do not know why or what exactly that means.


AuthenticationManager's role in setting the current user to anymous is not clearly documented

$
0
0

API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Authentic...

> If no provider set an active user then the user is set to anonymous.

I don't think that's technically true: AFAICT this class returns NULL if no provider sets an active user. It's true that Drupal *overall* sets the user to anonymous, but that sentence gives the inaccurate impression that the code in this class will be doing that.

Not sure what to suggest for better wording though!

Move file uri/scheme functions from file.inc and FileSystem to StreamWrapperManager

$
0
0

Problem/Motivation

See #2229865: [meta] Modernize File/StreamWrapper API, we need to move file scheme functions out of file.inc. StreamWrapperManager is a good place for them, but some were already moved to FileSystem earlier.

Proposed resolution

Deprecate both the remaining undeprecated functions in file.inc and those that were already moved to FileSystem in favor of methods on StreamWrapperManager:

StreamWrapperManager is be a good place for them, as it is already injected into FileSystem and closely related to that stuff.

See #126 there for example:

Hm, on closer investigation, I don't think any of these additional methods belong into this new service.

* file_uri_target() is the counter-part to file_uri_scheme(), which is already on file_system
* file_stream_wrapper_uri_normalize() is also very related to these, they're all about (stream wrapper) URI's, not file URLs.
* file_valid_uri() is again about stream wrapper URI's and as a small wrapper around two functions/methods that were already moved to file_system.
* file_build_uri() also is about creating stream wrapper URIs and is tightly connected to these other functions.

FileSystem is getting quite big with that other issue, so maybe these methods could be on the stream wrapper manager, but then we'd also need to move some existing methods from FileSystem to that to avoid a cross-dependency.

Remaining tasks

Make method names more consistent.

User interface changes

API changes

Data model changes

Release notes snippet

Failure with media_library during core update from 8.6.15 to 8.7.0/1 failed

$
0
0

HI,

Sorry if I don't report the right way, I do this for the first time!

Since the 8.7 release, I tried to update my site from 8.6.15 to 8.7.0 and now to 8.7.1 : both failed with this error message:

module media_library
Mise à jour #8701

Échec : Drupal\Core\Entity\EntityStorageException : 'image_style' entity with ID 'media_library' already exists. dans Drupal\Core\Entity\EntityStorageBase->doPreSave() (ligne 481 de D:\Site\d8_sc\core\lib\Drupal\Core\Entity\EntityStorageBase.php).

And the report log has two update type error messages:

LogicException : Getting the base fields is not supported for entity type Style d'image. dans Drupal\Core\Entity\EntityFieldManager->buildBaseFieldDefinitions() (ligne 209 de D:\Site\d8_sc\core\lib\Drupal\Core\Entity\EntityFieldManager.php).
Importance Erreur

Drupal\Core\Entity\EntityStorageException : 'image_style' entity with ID 'media_library' already exists. dans Drupal\Core\Entity\EntityStorageBase->doPreSave() (ligne 481 de D:\Site\d8_sc\core\lib\Drupal\Core\Entity\EntityStorageBase.php).

Note that I do have an image style named media_library, but even if I rename its machine name as media_library_custom, when I run the update it doesn't work better.

My site is not broken and the core is marked as updated, but some features (as media widget) don't work as they should, and when I try to re-run …/update.php, it appears that 16 core module updates are waiting to be executed:

16 mises à jour en attente
system module

Initialize 'expand_all_items' values to system_menu_block.
Clear the menu cache. @see https:www.drupal.orgprojectdrupalissues3044364
Clear the library cache and ensure aggregate files are regenerated.

media_library module

8701 - Create the 'media_library' image style.
8702 - Updates the media library view widget display (contextual) filters.
Create and configure Media Library form and view displays for media types.
Add a table display to the media library view and link gridtable displays.

comment module

Add comment settings.

layout_discovery module

Recalculate dependencies for the entity_form_display entity.
Recalculate dependencies for the entity_view_display entity.

media module

Keep media items viewable at media{id}.

menu_link_content module

Update custom menu links to be revisionable.

taxonomy module

Update taxonomy terms to be revisionable.
Remove the 'hierarchy' property from vocabularies.

views module

Update exposed filter blocks label display to be disabled.
Rebuild cache to allow placeholder texts to be translatable.

My site is installed locally with Acquia Dev Desktop. I use drush but not Composer.
I'm no coder AT ALL, so I haven't a clue about what can be done to fix this, but it's been a while since I get repeatedly the first error message (LogicException : Getting the base fields is not supported for entity type) anytime I make a change on a field (changes are generally made despite the message though), so clearly something has been corrupted in the code (or the database?) but I was unable to determine where this was coming from since I don't mess with code and only use those community modules:

D:\Site\d8_sc>drush pm-list
 Package              Name                                                         Type    Status         Version       
 Administration       Admin Toolbar (admin_toolbar)                                Module  Enabled        8.x-1.26      
 Administration       Admin Toolbar Extra Tools (admin_toolbar_tools)              Module  Not installed  8.x-1.26      
 Administration       Admin Toolbar Links Access Filter                            Module  Not installed  8.x-1.26      
                      (admin_toolbar_links_access_filter)                                                               
 Administration       Adminimal Admin Toolbar (adminimal_admin_toolbar)            Module  Enabled        8.x-1.9       
 Administration       Module Missing Message Fixer (module_missing_message_fixer)  Module  Not installed  8.x-1.0-alpha 
                                                                                                          3             
 Bootstrap            Bootstrap Library (bootstrap_library)                        Module  Enabled        8.x-1.11      
 Chaos tool suite     Chaos Tools (ctools)                                         Module  Enabled        8.x-3.2       
 Chaos tool suite     Chaos Tools Blocks (ctools_block)                            Module  Not installed  8.x-3.2       
 (Experimental)                                                                                                         
 Chaos tool suite     Chaos Tools Views (ctools_views)                             Module  Not installed  8.x-3.2       
 (Experimental)                                                                                                         
 CKEditor             CKEditor CodeMirror (ckeditor_codemirror)                    Module  Enabled        8.x-2.2       
 CKEditor             CKEditor InsertHTML (ckeditor_inserthtml)                    Module  Not installed  8.x-1.0       
 CKEditor             CKEditor Non-breaking space Plugin (nbsp)                    Module  Enabled        8.x-1.2       
 Content Type Clone   Content Type Clone (content_type_clone)                      Module  Enabled        8.x-1.x-dev   
 Core                 Actions (action)                                             Module  Not installed  8.7.1         
 Core                 Activity Tracker (tracker)                                   Module  Not installed  8.7.1         
 Core                 Aggregator (aggregator)                                      Module  Not installed  8.7.1         
 Core                 Automated Cron (automated_cron)                              Module  Enabled        8.7.1         
 Core                 Ban (ban)                                                    Module  Not installed  8.7.1         
 Core                 BigPipe (big_pipe)                                           Module  Enabled        8.7.1         
 Core                 Block (block)                                                Module  Enabled        8.7.1         
 Core                 Book (book)                                                  Module  Enabled        8.7.1         
 Core                 Breakpoint (breakpoint)                                      Module  Enabled        8.7.1         
 Core                 CKEditor (ckeditor)                                          Module  Enabled        8.7.1         
 Core                 Color (color)                                                Module  Enabled        8.7.1         
 Core                 Comment (comment)                                            Module  Enabled        8.7.1         
 Core                 Configuration Manager (config)                               Module  Enabled        8.7.1         
 Core                 Contact (contact)                                            Module  Enabled        8.7.1         
 Core                 Content Moderation (content_moderation)                      Module  Not installed  8.7.1         
 Core                 Contextual Links (contextual)                                Module  Enabled        8.7.1         
 Core                 Custom Block (block_content)                                 Module  Enabled        8.7.1         
 Core                 Custom Menu Links (menu_link_content)                        Module  Enabled        8.7.1         
 Core                 Database Logging (dblog)                                     Module  Enabled        8.7.1         
 Core                 Field (field)                                                Module  Enabled        8.7.1         
 Core                 Field UI (field_ui)                                          Module  Enabled        8.7.1         
 Core                 Filter (filter)                                              Module  Enabled        8.7.1         
 Core                 Forum (forum)                                                Module  Not installed  8.7.1         
 Core                 Help (help)                                                  Module  Enabled        8.7.1         
 Core                 History (history)                                            Module  Enabled        8.7.1         
 Core                 Inline Form Errors (inline_form_errors)                      Module  Not installed  8.7.1         
 Core                 Internal Dynamic Page Cache (dynamic_page_cache)             Module  Enabled        8.7.1         
 Core                 Internal Page Cache (page_cache)                             Module  Enabled        8.7.1         
 Core                 Layout Builder (layout_builder)                              Module  Not installed  8.7.1         
 Core                 Layout Discovery (layout_discovery)                          Module  Enabled        8.7.1         
 Core                 Media (media)                                                Module  Enabled        8.7.1         
 Core                 Menu UI (menu_ui)                                            Module  Enabled        8.7.1         
 Core                 Node (node)                                                  Module  Enabled        8.7.1         
 Core                 Path (path)                                                  Module  Enabled        8.7.1         
 Core                 Quick Edit (quickedit)                                       Module  Enabled        8.7.1         
 Core                 RDF (rdf)                                                    Module  Enabled        8.7.1         
 Core                 Responsive Image (responsive_image)                          Module  Enabled        8.7.1         
 Core                 Search (search)                                              Module  Enabled        8.7.1         
 Core                 Settings Tray (settings_tray)                                Module  Enabled        8.7.1         
 Core                 Shortcut (shortcut)                                          Module  Enabled        8.7.1         
 Core                 Statistics (statistics)                                      Module  Not installed  8.7.1         
 Core                 Syslog (syslog)                                              Module  Enabled        8.7.1         
 Core                 System (system)                                              Module  Enabled        8.7.1         
 Core                 Taxonomy (taxonomy)                                          Module  Enabled        8.7.1         
 Core                 Testing (simpletest)                                         Module  Not installed  8.7.1         
 Core                 Text Editor (editor)                                         Module  Enabled        8.7.1         
 Core                 Toolbar (toolbar)                                            Module  Enabled        8.7.1         
 Core                 Tour (tour)                                                  Module  Enabled        8.7.1         
 Core                 Update Manager (update)                                      Module  Enabled        8.7.1         
 Core                 User (user)                                                  Module  Enabled        8.7.1         
 Core                 Views (views)                                                Module  Enabled        8.7.1         
 Core                 Views UI (views_ui)                                          Module  Enabled        8.7.1         
 Core                 Workflows (workflows)                                        Module  Not installed  8.7.1         
 Core (Experimental)  Field Layout (field_layout)                                  Module  Not installed  8.7.1         
 Core (Experimental)  Media library (media_library)                                Module  Enabled        8.7.1         
 Core (Experimental)  Migrate Drupal Multilingual (migrate_drupal_multilingual)    Module  Not installed  8.7.1         
 Core (Experimental)  Workspaces (workspaces)                                      Module  Not installed  8.7.1         
 Custom               Linkit (linkit)                                              Module  Enabled        8.x-4.3       
 Date                 Year only (yearonly)                                         Module  Enabled        8.x-1.3       
 Date/Time            Calendar (calendar)                                          Module  Enabled        8.x-1.x-dev   
 Date/Time            Calendar Datetime (calendar_datetime)                        Module  Enabled        8.x-1.x-dev   
 Date/Time            Date range formatter (date_range_formatter)                  Module  Enabled        8.x-3.1       
 Development          Devel (devel)                                                Module  Enabled        8.x-2.1       
 Development          Devel Generate (devel_generate)                              Module  Enabled        8.x-2.1       
 Development          Devel Kint (kint)                                            Module  Enabled        8.x-2.1       
 Development          Web Profiler (webprofiler)                                   Module  Not installed  8.x-2.1       
 Display Suite        Display Suite (ds)                                           Module  Not installed  8.x-3.1       
 Display Suite        Display Suite Devel (ds_devel)                               Module  Not installed  8.x-3.1       
 Display Suite        Display Suite Extras (ds_extras)                             Module  Not installed  8.x-3.1       
 Display Suite        Display Suite Switch View Mode (ds_switch_view_mode)         Module  Not installed  8.x-3.1       
 Entity               Automatic Entity Labels (auto_entitylabel)                   Module  Enabled        8.x-2.1-beta1 
 Examples             Migrate Example (migrate_example)                            Module  Not installed  8.x-4.2       
 Examples             Migrate Example (Advanced) (migrate_example_advanced)        Module  Not installed  8.x-4.2       
 Examples             Migrate JSON Example (migrate_json_example)                  Module  Not installed  8.x-4.2       
 Examples             Views Bulk Operations example                                Module  Not installed  8.x-2.5       
                      (views_bulk_operations_example)                                                                   
 Feeds                Feeds (feeds)                                                Module  Enabled        8.x-3.0-alpha 
                                                                                                          5             
 Field Formatters     Field Formatter Class (field_formatter_class)                Module  Enabled        8.x-1.1       
 Field types          Date time day (date_time_day)                                Module  Not installed  8.x-1.4       
 Field types          Datetime (datetime)                                          Module  Enabled        8.7.1         
 Field types          Datetime Range (datetime_range)                              Module  Enabled        8.7.1         
 Field types          Entity Reference Display (entity_reference_display)          Module  Enabled        8.x-1.2       
 Field types          Entity Reference Revisions (entity_reference_revisions)      Module  Enabled        8.x-1.6       
 Field types          File (file)                                                  Module  Enabled        8.7.1         
 Field types          Image (image)                                                Module  Enabled        8.7.1         
 Field types          Link (link)                                                  Module  Enabled        8.7.1         
 Field types          Options (options)                                            Module  Enabled        8.7.1         
 Field types          Simple Google Maps (simple_gmap)                             Module  Enabled        8.x-1.4       
 Field types          Telephone (telephone)                                        Module  Enabled        8.7.1         
 Field types          Text (text)                                                  Module  Enabled        8.7.1         
 Field types          Time Field (time_field)                                      Module  Enabled        8.x-1.12      
 Field types          Time Range (time_range)                                      Module  Enabled        8.x-1.1       
 Fields               Element class formatter (element_class_formatter)            Module  Enabled        8.x-1.0       
 Fields               Field Group (field_group)                                    Module  Enabled        8.x-3.0-beta1 
 Fields               Heading (heading)                                            Module  Enabled        8.x-1.4       
 Fields               Inline Entity Form (inline_entity_form)                      Module  Enabled        8.x-1.0-rc1   
 Filters              Entity Embed (entity_embed)                                  Module  Enabled        8.x-1.0-beta3 
 Media                Crop API (crop)                                              Module  Enabled        8.x-1.5       
 Media                Entity Browser (entity_browser)                              Module  Enabled        8.x-2.1       
 Media                Entity Browser example (entity_browser_example)              Module  Not installed  8.x-2.1       
 Media                Entity Browser IEF (entity_browser_entity_form)              Module  Not installed  8.x-2.1       
 Media                ImageWidgetCrop (image_widget_crop)                          Module  Enabled        8.x-2.2       
 Media                ImageWidgetCrop examples (image_widget_crop_examples)        Module  Enabled        8.x-2.2       
 Migrate              Field Group Migrate (field_group_migrate)                    Module  Not installed  8.x-3.0-beta1 
 Migration            Migrate (migrate)                                            Module  Enabled        8.7.1         
 Migration            Migrate Drupal (migrate_drupal)                              Module  Not installed  8.7.1         
 Migration            Migrate Drupal UI (migrate_drupal_ui)                        Module  Not installed  8.7.1         
 Migration            Migrate Plus (migrate_plus)                                  Module  Enabled        8.x-4.2       
 Migration            Migrate Source CSV (migrate_source_csv)                      Module  Enabled        8.x-2.2       
 Migration            Migrate Tools (migrate_tools)                                Module  Enabled        8.x-4.1       
 Multilingual         Configuration Translation (config_translation)               Module  Not installed  8.7.1         
 Multilingual         Content Translation (content_translation)                    Module  Enabled        8.7.1         
 Multilingual         Interface Translation (locale)                               Module  Enabled        8.7.1         
 Multilingual         Language (language)                                          Module  Enabled        8.7.1         
 Other                Allowed Formats (allowed_formats)                            Module  Enabled        8.x-1.1       
 Other                Bootstrap DateTime Picker (bootstrap_datetime)               Module  Enabled        8.x-1.2       
 Other                Configuration Update Base (config_update)                    Module  Enabled        8.x-1.6       
 Other                Configuration Update Reports (config_update_ui)              Module  Enabled        8.x-1.6       
 Other                Content Import (contentimport)                               Module  Not installed  8.x-4.x-dev   
 Other                Embed (embed)                                                Module  Enabled        8.x-1.0       
 Other                Entity Mask (ctools_entity_mask)                             Module  Not installed  8.x-3.2       
 Other                Entity Type Clone (entity_type_clone)                        Module  Enabled        8.x-1.3       
 Other                Entity Usage (entity_usage)                                  Module  Enabled        8.x-2.0-alpha 
                                                                                                          8             
 Other                Libraries (libraries)                                        Module  Not installed  8.x-3.0-alpha 
                                                                                                          1             
 Other                Linked Field (linked_field)                                  Module  Enabled        8.x-1.1       
 Other                Menu Block (menu_block)                                      Module  Enabled        8.x-1.5       
 Other                Menu Trail By Path (menu_trail_by_path)                      Module  Enabled        8.x-1.1       
 Other                Meta position (meta_position)                                Module  Enabled        8.x-1.0       
 Other                Pathauto (pathauto)                                          Module  Enabled        8.x-1.4       
 Other                Publication Date (publication_date)                          Module  Enabled        8.x-2.0-beta1 
 Other                Simple timeline (simple_timeline)                            Module  Enabled        8.x-1.1       
 Other                Single Date Time Picker (single_datetime)                    Module  Not installed  8.x-1.6       
 Other                Taxonomy unique (taxonomy_unique)                            Module  Not installed  8.x-2.1       
 Other                Telephone Validation (telephone_validation)                  Module  Not installed  8.x-2.2       
 Other                Token (token)                                                Module  Enabled        8.x-1.5       
 Paragraphs           Bootstrap Paragraphs (bootstrap_paragraphs)                  Module  Enabled        8.x-2.0-beta6 
 Paragraphs           Bootstrap Paragraphs Contact Form (bp_contact)               Module  Not installed  8.x-2.0-beta6 
 Paragraphs           Bootstrap Paragraphs Webform (bp_webform)                    Module  Not installed  8.x-2.0-beta6 
 Paragraphs           Paragraphs (paragraphs)                                      Module  Enabled        8.x-1.8       
 Paragraphs           Paragraphs Demo (paragraphs_demo)                            Module  Not installed  8.x-1.8       
 Paragraphs           Paragraphs Library (paragraphs_library)                      Module  Enabled        8.x-1.8       
 Paragraphs           Paragraphs Type Permissions (paragraphs_type_permissions)    Module  Enabled        8.x-1.8       
 Search               Database Search (search_api_db)                              Module  Not installed  8.x-1.11      
 Search               Database Search Defaults (search_api_db_defaults)            Module  Not installed  8.x-1.11      
 Search               Search API (search_api)                                      Module  Not installed  8.x-1.11      
 User interface       Accordion Menus (accordion_menus)                            Module  Not installed  8.x-2.0       
 User interface       Superfish (superfish)                                        Module  Not installed  8.x-1.3       
 Views                Views Bootstrap (views_bootstrap)                            Module  Enabled        8.x-4.1       
 Views                Views Bulk Operations (views_bulk_operations)                Module  Enabled        8.x-2.5       
 Views                Views Reference Field (viewsreference)                       Module  Enabled        8.x-1.4       
 Views                Views Slideshow (views_slideshow)                            Module  Enabled        8.x-4.6       
 Views                Views Slideshow Cycle (views_slideshow_cycle)                Module  Enabled        8.x-4.6       
 Views                Views templates (views_templates)                            Module  Enabled        8.x-1.0-alpha 
                                                                                                          1             
 Views Bulk           Actions Permissions (actions_permissions)                    Module  Not installed  8.x-2.5       
 Operations                                                                                                             
 Views Bulk           Views Bulk Edit (views_bulk_edit)                            Module  Enabled        8.x-2.2       
 Operations                                                                                                             
 Web services         HAL (hal)                                                    Module  Not installed  8.7.1         
 Web services         HTTP Basic Authentication (basic_auth)                       Module  Not installed  8.7.1         
 Web services         JSON:API (jsonapi)                                           Module  Not installed  8.7.1         
 Web services         RESTful Web Services (rest)                                  Module  Enabled        8.7.1         
 Web services         Serialization (serialization)                                Module  Enabled        8.7.1         
 Webform              Webform (webform)                                            Module  Enabled        8.x-5.2       
 Webform              Webform Access (webform_access)                              Module  Not installed  8.x-5.2       
 Webform              Webform Attachment (webform_attachment)                      Module  Not installed  8.x-5.2       
 Webform              Webform Bootstrap (webform_bootstrap)                        Module  Not installed  8.x-5.2       
 Webform              Webform Devel (webform_devel)                                Module  Not installed  8.x-5.2       
 Webform              Webform Image Select (webform_image_select)                  Module  Not installed  8.x-5.2       
 Webform              Webform Node (webform_node)                                  Module  Not installed  8.x-5.2       
 Webform              Webform Scheduled Email Handler (webform_scheduled_email)    Module  Not installed  8.x-5.2       
 Webform              Webform Shortcuts (webform_shortcuts)                        Module  Not installed  8.x-5.2       
 Webform              Webform Submission Export/Import [EXPERIMENTAL]              Module  Not installed  8.x-5.2       
                      (webform_submission_export_import)                                                                
 Webform              Webform Submission Log (webform_submission_log)              Module  Not installed  8.x-5.2       
 Webform              Webform Templates (webform_templates)                        Module  Not installed  8.x-5.2       
 Webform              Webform UI (webform_ui)                                      Module  Enabled        8.x-5.2       
 Webform Demo         Webform Demo: Application/Evaluation System                  Module  Not installed  8.x-5.2       
                      (webform_demo_application_evaluation)                                                             
 Webform Demo         Webform Demo: Event Registration System                      Module  Not installed  8.x-5.2       
                      (webform_demo_event_registration)                                                                 
 Webform Demo         Webform Demo: Region Contact System                          Module  Not installed  8.x-5.2       
                      (webform_demo_region_contact)                                                                     
 Webform example      Webform Element Example (webform_example_element)            Module  Not installed  8.x-5.2       
 Webform example      Webform Example Composite (webform_example_composite)        Module  Not installed  8.x-5.2       
 Webform example      Webform Examples (webform_examples)                          Module  Not installed  8.x-5.2       
 Webform example      Webform Examples Accessibility                               Module  Not installed  8.x-5.2       
                      (webform_examples_accessibility)                                                                  
 Webform example      Webform Handler Example (webform_example_handler)            Module  Not installed  8.x-5.2       
 Webform example      Webform Remote Post Example (webform_example_remote_post)    Module  Not installed  8.x-5.2       
 Autre                Adminimal (adminimal_theme)                                  Theme   Enabled        8.x-1.4       
 Autre                Bootstrap Barrio (bootstrap_barrio)                          Theme   Enabled        8.x-4.17      
 Autre                Bootstrap Barrio SASS SC Subtheme (bootstrap_sass_sc)        Theme   Disabled       8.x-1.6       
 Autre                Bootstrap Barrio SC Custom Subtheme (barrio_sc)              Theme   Enabled        8.x-4.17      

Thanks for your help.

Sort values of "Component" field for core issues alphabetically

$
0
0

Problem/Motivation

The Drupal (core) project has an extensive list of components in the Component form select element when creating a new issue. Because the options are not listed alphabetically, it is hard to find the right component.

Proposed resolution

Sort the options alphabetically.

Abstract RenderCache into a separate service that is capable of cache redirects in a non-render array-specific way

$
0
0

Problem/Motivation

The render system has \Drupal\Core\Render\RenderCache(Interface). This is capable of doing cache redirects, based on bubbled cache contexts. I.e. compare the originally known cache contexts with those that the final-to-be-cached data depends upon, and if that set is different, cache it as a cache redirect. (See RenderCache's docs for details.)

This is useful outside of the render system too.

Proposed resolution

Abstract RenderCache into a service (name TBD, initial quick thought: RedirectingCache) that RenderCache can use, so that RenderCache is just one of many things able to use this generic concept.

Remaining tasks

TBD

User interface changes

None.

API changes

None, pure API addition.

Data model changes

None.

Unify sentence closings of core module description lines on Extend page

$
0
0

I know this part is rarely visible, but some customers pay attention to it.
I think we can add the point to the end of the sentence of the Migrate module and make the description more accurate.

Always set X-Drupal-Cache and X-Drupal-Dynamic-Cache headers, even for responses that are not cacheable

$
0
0

Problem/Motivation

Currently if a response is not cacheable Drupal sets X-Drupal-Dynamic-Cache = UNCACHEABLE, but in some cases it does not. See DynamicPageCacheSubscriber::onResponse for details.

Proposed resolution

Always set X-Drupal-Dynamic-Cache header.

  1. This changes the existing X-Drupal-Dynamic-Cache: UNCACHEABLE to X-Drupal-Dynamic-Cache: UNCACHEABLE (poor cacheability).
  2. This adds X-Drupal-Dynamic-Cache: UNCACHEABLE (no cacheability) (for responses which aren't instances of CacheableResponseInterface).
  3. This adds X-Drupal-Dynamic-Cache: UNCACHEABLE (policy) (when the Dynamic Page Cache request/response policy tagged services deny caching).

This makes it much easier for developers to understand what the Dynamic Page Cache module is doing, and why.

Remaining tasks

None.


Tour tip display under toolbar

$
0
0

Problem/Motivation

When toolbar is deployed (tablet format) or tip should display a link in toolbar, tip is hidden by toolbar.

Proposed resolution

Tip should be display at top of everything. I suggest to set z-index to 1001 instead of 101.

Saving a node with many images: node gets unpublished

$
0
0

Hello,

I use the image module ("image field" - drupal 7 core) to store images in a node. In rare cases, there are up to 150 images stored in a node.

Drupal seems to have a problem with so many images (for example 140) in a node:

  • If I edit the node (for example add some text to the body field) and save it again, the node gets unpublished.
  • I edit the node again and click "published". But after saving the node, it is still unpublished.
  • I can only publish it on the page ".../admin/content"

This only happens with nodes that have lots of images.

Is this a general problem or perhaps a problem with my server settings?

Fields' "default value" functionality only works in formatters and widgets, not at the data level and hence not in HTTP APIs

$
0
0

When GET:ting data for nodes like /jsonapi/node/article the referenced images are correctly appearing in response so we get:

"field_image": {
                    "data": {
                        "type": "file--file",
                        "id": "1c563a12-6bb7-4aa0-be83-d2ba62c420cc",
                        "meta": {
                            "alt": "test",
                            "title": "",
                            "width": 320,
                            "height": 240
                        }
                    }

But if the entity type has a default image the file reference data is:

"field_image": {
                    "data": null,
...

Reproduce:
1. Create an article with an image. => Request works.
2. Set a default image to article image field.
3. Create a new article using the default image. => Request gives null value to field_image.

Alternate fix for comment_update_8701 fails if there are comments without field_name

$
0
0

Problem/Motivation

#3052147: comment_update_8701 fails if there are comments without field_name prevents sites from updating with problematic comments. @webchick had a great idea posted at the same time as that was committed.

This might be a silly question, but why can we not do a query like the one in #34 in the update if we detect this condition? Set field_name to "unknown" and programmatically create a stub entity with a machine name of "unknown" or something and assign entity_type there, flag an error in the logs and tell people to look at their comments and manually sort them out?

Proposed resolution

Try updating null values to placeholders that would be impossible via the UI or code - maybe something like %unknown%

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Allow loading CSS and JavaScript directly from templates

$
0
0

Problem/Motivation

The current method of adding CSS and JavaScript through libraries assumes that all CSS and JavaScript is reusable, which isn't always the case. Especially CSS is for the most time very dependent on the markup it was first built for. If the markup changes, the CSS should be changed and vice versa.

This creates backwards compatibility issues in core, since themes could override just markup or CSS. If markup or CSS is modified individually and core parts get changed over time, the implementation in the theme is prone to bugs.

Proposed resolution

Allow attaching CSS and JavaScript directly in templates. When themes override the template, they also have to take ownership over the CSS and JavaScript that was attached in the template since it doesn't exist in the library system.

Remaining tasks

User interface changes

-

API changes

New API to attach CSS and JavaScript in templates.

Example:

{{ attach_css('style.css') }}
{{ attach_javascript('javascript.js', ['core/jquery']) }}

Data model changes

Release notes snippet

Add optional support for CKEditor 5 in D9 so we can remove CKE 4 from Drupal 10

$
0
0

Problem/Motivation

Drupal 8 is running on CKEditor 4.x. CKEditor 5.x has gone stable and looks like it has enhancements to help improve the authoring experience.

CKEditor 5 also no longer relies on inline JavaScript, which requires a more permissive Content Security Policy due to its use in CKEditor 4 (#2789139: [upstream] CSP requires 'unsafe-inline' because of CKEditor 4).

Proposed resolution

Upgrade CKEditor in Drupal to 5.x.

Remaining tasks

TBD

User interface changes

TBD

API changes

A migration guide has been provided from migrating from 4.x to 5.x, covering plugins, skins, and APIs:

Data model changes

TBD

Enable a Tour icon in a modal dialog

$
0
0

Problem/Motivation

Some modals could really use a tour (e.g. contextual filters or arguments can be daunting for new developers).
Atm however it's not possible to initiate Tour from within a (modal) dialog because the dialog is modal an Tour appears in the admin menu.

This is a follow up issue for Tour tip display under toolbar. In there the question was raised if we should show Tour tips above or below dialogs. If we want to support tour for dialogs it should be above.

Proposed resolution

We could add an icon near the close icon in the modal.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Interface previews through optional "preview" or "placeholder" templates

Field tokens for "historical data" fields (revisions) contain a hyphen, breaking twig templates and throwing an assertion error

$
0
0

Problem/Motivation

This is easily reproducible on simplytest.me:

1. Install Drupal w/ standard profile
2. Add an article node with garbage info
3. Create a view with base table of Content Revisions, displaying fields.
4. Add field "Tags" under category "Content (historical data)"
5. In settings for that field, rewrite the field using "Override the output of this field with custom text" (actually doesn't matter what you pick, you just need something that exposes the replacement tokens)
6. Observe that the replacement token for that field contains a hyphen: "{{ field_tags-revision_id__target_id }}"

Before

Suggested token names contain a hypen
Field is rendered as 0

The problem is that you cannot have hyphens in twig variables like that. I believe it should be two underscores instead based on what I've seen in some other issues.

Proposed resolution

- Use the field alias instead, but don't break things that use field name in the view.
- Views post-update that is run as batch to be scalable for sites with many views.
- Write a test to assert the problem.
- Write a test to assert the post-update.

After

Suggested token names contain no hyphen
Field is rendered as normal tag

Remaining tasks

- Re-roll patch for 8.8.x branch. :|
- Review current patch.
- Manually test the patch for views post-update to confirm that the view was updated automatically.

Completed

- Rewrote views post-update to use Batch API and added a test for views post-update.
- Patch #25 with views post-update, fix and test to assert the issue.
- Manual testing (DONE): Add Before/After screenshots.

Original report by bkosborne

This causes a couple issues:

1. There's an assertion in PluginBase::viewsTokenReplace() that checks if tokens are valid twig variables. So if the token replacement is performed for whatever reason, this assertion will fail and cause a 500 error.
2. I believe this would also prevent twig from performing the replacement correctly and/or using the proper field template for the field, but I can't be sure because I didn't test that behavior. The replacement token replaces the string 0 or 1, but not the actual value for the field.

I did a little big of digging and see that the token name for a given field is literally the "id" of the field, see FieldPluginBase::getFieldTokenPlaceholder(). Not sure on the solution here since I'm completely unfamiliar with this code.

ReferenceAccessConstraintValidator check is broken for existing entities

$
0
0

Problem/Motivation

Users get violation errors when trying to add add a file to a field which contains existing files they do not have access to. This could be the case with anonymous users, as they may only have access to files they have uploaded themselves.

Details

\Drupal\Core\Entity\Plugin\Validation\Constraint\ReferenceAccessConstraintValidator::validate is supposed to check whether you have view access to entities being added to an entity reference and is used by ImageItem and FileItem.

The logic is that existing references are skipped, but new references have their access checked. However, I believe there are two bugs in the code:

  1. The code assumes $referenced_entities is keyed by entity ID, but it is actually keyed by delta
  2. The code checks whether the existing referenced entity is in the array of existing referenced entities, when it should check whether the value being validated is in the array

The combination of both of these bugs means I do not believe this is a security risk, as it will only affect validating existing references, which this check is supposed to ignore entirely.

Specifically the bugs are in:

        $referenced_entities = $existing_entity->{$value->getFieldDefinition()->getName()}->referencedEntities();
        // Check permission if we are not already referencing the entity.
        foreach ($referenced_entities as $ref) {
          if (isset($referenced_entities[$ref->id()])) {

$referenced_entities is keyed by delta, not by entity ID, so checking $referenced_entities[$ref->id()] is the wrong thing to do here.

We are supposed to be checking whether $id is in the list (the item we're validating). However, we're checking whether $ref->id() is in the list, which (aside from the above bug), would always be the case, as we've retrieved it from the list one line above.

Use aria-current=page in pagination links.

$
0
0

Problem/Motivation

WAI-ARIA 1.1 introduces a useful new property: aria-current.

One place where we can use this is on pagination links. Currently, the pager styles in Seven and Bartik have a visual indication of the current page, together with a .visually-hidden span to say it is the current page (which screen readers announce). It's working fine at the moment, but we can modernize this.

The idea behind the aria-current="page" is to indicate this in a machine-readable way that can be conveyed to assistive technology though the platform-level accessibility APIs. The advantage is that screen readers, etc., can present the information in a way that is more consistent with native applications on host platform, such as:

  • Announce it with a platform-localized string (from assistive tech on the host OS), instead of an author-localized string (from Drupal translations).
  • Decide how/when to announce the fact, possibly based on user preferences in the host OS or assistive tech (e.g. screen reader verbosity prefs).

Demo page:http://design-patterns.tink.uk/aria-current/ (includes test results for various devices)

Proposed resolution

  • Add aria-current="page" to the current page link in the pager.
    Important: this should go on the <a> element, not the <li>wrapper.
  • Remove the visually-hidden phrase "current page" from inside the current-page link. Just use<span class="visually-hidden">Page: </span> like all the other numbered links.

Remaining tasks

  • Assess: is there sufficient support for aria-current="page" across various browsers, assistive tech, and OS? Ask around the wider accessibility community. In particular, we'd like to know where it isn't supported yet, to assess the regression risk.
    • DONE: support looks good in general (comment #3). iOS + macOS Safari work, and there are several browser/screen-reader combinations working on Windows.
    • DONE: ChromeVox + desktop Chrome Browser. Not currently working, see comment #7.
    • TODO: monitor Android Talkback, not working yet (comment #6).
    • TODO: monitor support with MS Edge + JAWS. Watch this bug report: No support for aria-current in Edge.
    • TODO: Monitor support for MS Edge + Narrator. WAI-ARIA 1.1 is support is "in development" according to MS Edge Platform Status
    • TODO: Test in ChromeVox on ChromeOS, unknown. See comment #7
    • TODO: test macOS Voiceover with Chrome.
  • Assess: does this impact on a template in the Stable and Classy themes?
  • Write a patch.
  • Tests?

Sign-offs needed

IMPORTANT: Possible regression risk - get sign-off from an accessibility maintainer, @andrewmacpherson or @mgifford.
Don't commit this until we're confident there's enough support across various OS, browsers, and assistive tech. It can wait until the time is right, and go in any minor release.

User interface changes

  • Improved semantics for assisitive technology. Replace an invisible text span with machine readable attribute.
  • No changes to visual design, or CSS.

API changes

None.

Data model changes

None.

Commit Credits needed

@RachelOlivero - researched Android Talkback support, comments #6 and #38.

Make it possible to configure exposed filter operators

$
0
0

Hello,

Thanks for this wonderful module !

I was wondering if its possible to configure exposed operators.

Problem:
When we expose operator, all available operators are visible to users. I want only specified operators to be visible to users. For example, for a field_xyz I have following operators available:

  • Is one of
  • Is all of
  • Is none of
  • Is empty (NULL)
  • Is not empty (NOT NULL)

I only want users to see follwings:

  • Is one of
  • Is all of
  • Is none of

I don't want users to see NULL and NOT NULL operators.

It would be great if we have an option to do so.

Thanks in advance!

Viewing all 295812 articles
Browse latest View live


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