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

Current element values missing from vertical tabs when shown in 2-column layout

$
0
0

Problem/Motivation

One of the most awesome benefits of adding vertical tabs in Drupal 7 was the javascript that allowed people to see what the current values were without having to pop-open the fieldsets. This benefit has been lost by moving the tabs to the right hand column.

I did a little research into the development of this new display of vertical tabs, and it looks like the current values are supposed to be present - at least according to the screenshots shown in this issue - the one that got committed.

Missing summaries

Perhaps they were forgotten, or removed later for some other reason?

Proposed resolution

Put back the awesomeness that was vertical tabs - javascript revealing current values from within fieldsets. In Drupal 7.38 it's handled in /misc/collapse.js, line 56-101, propably doesn't work one-by-one to D8.

Remaining tasks

see above

User interface changes

see above

API changes

none

#1936700: Book module usability: Stop using vertical tabs


Prevent line breaks in draggable (first) table cells

$
0
0

Problem/Motivation

Right now, every element in a draggable table's first cell (this is where the drag-handle and the indentation are added) are floated to right (or to left for RTL languages). This makes the hierarchy of the taxonomy terms hard to follow, and besides that it is almost impossible to change the level of those taxonomy terms thats drag-handle is rendered on the left (RTL: right) side of the table cell (because of the high number of the preceding indentation elements).

Screenshots about the current output:

Taxonomy overview page with hierarchy on Seven themeTaxonomy overview page with hierarchy on Claro theme

Steps to reproduce

  1. Install Drupal with the Standard profile
  2. Add about 10 taxonomy term to the 'Tags' vocabulary.
  3. Adjust the same taxonomy term hierarchy as on the attached screenshots.
  4. Check the overview page of the 'Tags' vocabulary with a smaller browser window width.

Proposed resolution

Proposed look for a taxonomy overview page with hierarchy on Claro theme

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Content moderation state filter incorrectly groups content type condition

$
0
0

Problem/Motivation

If you have the content moderation state filter in an OR group, then it adds a bundle condition to that group which bypasses the moderation state filter itself.

  1. Enable content moderation, workflows, and views UI.
  2. Enable the workflow for at least one content type at /admin/config/workflow/workflows/manage/editorial.
  3. Edit the moderated content view at /admin/structure/views/view/moderated_content.
  4. Set up the conditions so that it matches the following example structure:
    1. Default group is an And group with Content revision: Is Latest Translation Affected Revision.
    2. Group 2 is an Or group with Content revision: Moderation state <> Published and (Get the actual content from a content revision.) Content: Changed > -1 day.
    3. The logical operator between the Default group and Group 2 is And.

    Picture of the Views conditions just described

  5. Preview the query.

You end up with something like the following where clause:

WHERE
  ((node_field_revision2.nid IS NULL) AND (node_field_revision.revision_translation_affected = '1')) AND
  ((node.type IN ('article', 'page')) OR
  ((content_moderation_state.workflow = 'editorial') AND (content_moderation_state.moderation_state <> 'published')) OR
  ((node_field_data_node_field_revision.changed > 1581335239-86400)))

Rather than showing content that is an article and page and is in the correct moderation state, it will show me content that is either an article/page or is not in the published state. I think that's because the bundle condition is added directly to the group:

$this->query->addWhere($this->options['group'], "$entity_base_table_alias.{$entity_type->getKey('bundle')}", $moderated_bundles, 'IN');

Which contrasts to how the workflow and state IDs are handled further down:

    // The values are strings composed from the workflow ID and the state ID, so
    // we need to create a complex WHERE condition.
    $field = new Condition('OR');
    foreach ((array) $this->value as $value) {
      list($workflow_id, $state_id) = explode('-', $value, 2);

      $and = new Condition('AND');
      $and
        ->condition("$this->tableAlias.workflow", $workflow_id, '=')
        ->condition("$this->tableAlias.$this->realField", $state_id, $operator);

      $field->condition($and);
    }

    $this->query->addWhere($this->options['group'], $field);

Proposed resolution

Ensure an AND is used between the bundle condition and the workflow/state conditions (rather than just inheriting the current group's).

Remaining tasks

  1. Review the patch

Using the layout builder discard changes button should ignore any input and skip validation

$
0
0

Problem/Motivation

Unable to use layout builders "Discard changes" button when the entity 'layout_builder' form mode has validation errors.

The layout builder override form renders the entity form in the 'layout_builder' mode. If a form field is added which has server or client side validation which fails, then the discard button will not work. The discard button should work independently from the rest of the form.

Steps to reproduce

  1. Create an entity type and enable layout builder on it. Allow entities to customize individual layouts.
  2. Add a required text field to the entity.
  3. Add a new form mode to the entity type with machine name 'layout_builder', if it does not exist already.
  4. Edit the layout_builder form mode for the entity type, and configure the previously created required text field so it is visible on this form mode.
  5. Save.
  6. Create and save the entity
  7. Access the layout builder page for the entity, make changes.
  8. Try to use the discard button, without adding a value to the required text field.
  9. You will see: HTML validation errors because the text field is not filled.

Proposed resolution

When using the discard button: You should see: the browser ignores form input and skips to the discard confirmation page.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

EntityStorageBase::loadByProperties() is broken on PostgreSQL when using two or more properties

$
0
0

I faced with problem when try to load entities using loadByProperties method. If I set two and more properties I don't get any results.
So, I create a new content type test_content_type with two fields: field_first - stirng, limited (1) and field_second - string, unlimited.
test_content_type-fields

I create nodes of this content type
test_content_type-fields

and I try to load that content with the next command

$res = Drupal::entityTypeManager()
  ->getStorage('node')
  ->loadByProperties([
    'field_first' => '12345',
    'field_second' => 'test_value_1'
  ]);

I have nothing in result. I investigate the problem and found next issue in the method translateCondition of the Drupal\Core\Entity\Query\Sql\pgsql\Condition class. In the project we use PostgradeSQL database.
test_content_type-fields

In line #21 there is the base code, in line #22 my fix. As we can see in case when $condition['value'] is array placeholders starts from $n = 1. And this method builds placeholders :value1, :value2 and etc for each parameter in one property.
But if we set two properties, we will have next situation. The compile() method of the class Drupal\Core\Entity\Query\Sql\Condition runs translateCondition foreach element (searching property) in array that passed to loadByProperties. In my case for field_first and field_second.
test_content_type-fields

So, as result we have placeholder :value1 as for field_first and as for field_second. I debug SQL query and there is next:

SELECT base_table.vid AS vid, base_table.nid AS nid 
FROM node base_table 
INNER JOIN node__field_first node__field_first ON node__field_first.entity_id = base_table.nid 
INNER JOIN node__field_second node__field_second ON node__field_second.entity_id = base_table.nid 
INNER JOIN node_field_data node_field_data ON node_field_data.nid = base_table.nid 
WHERE ((LOWER(node__field_first.field_first_value) IN (LOWER('12345')))) AND ((LOWER(node__field_second.field_second_value) IN (LOWER('12345')))) AND (node_field_data.default_langcode IN ('1'))

As we can see for both fields node__field_first.field_first_value and node__field_second.field_second_value query use one searching value 12345. It because in line #21 of translateCondition method each condition starts from number 1. It clearly seen at the kint debug of condition:
test_content_type-fields

If I use next command:

$res = Drupal::entityTypeManager()
  ->getStorage('node')
  ->loadByProperties([
    'field_first' => ['12345', '45678']
    'field_second' => 'test_value_1'
  ]);

The SQL query will be:

SELECT base_table.vid AS vid, base_table.nid AS nid
FROM node base_table 
INNER JOIN node__field_first node__field_first ON node__field_first.entity_id = base_table.nid 
INNER JOIN node__field_second node__field_second ON node__field_second.entity_id = base_table.nid 
INNER JOIN node_field_data node_field_data ON node_field_data.nid = base_table.nid 
WHERE ((LOWER(node__field_first.field_first_value) IN (LOWER('12345'),LOWER('45678')))) AND ((LOWER(node__field_second.field_second_value) IN (LOWER('12345')))) AND (node_field_data.default_langcode IN ('1'))

And kint debug:
test_content_type-fields

We see, that for the field_first query has two placeholders :value1 and :value2, but for field_second again used placeholder :value1 instead of :value3. And as result we search `12345` in field_second instead of `test_value_1`.

If I uncomented line #22 and hide code in line #21

      //$n = 1;
      $n = count($sql_query->getArguments()) + 1;

And call to loadByProperties method I get next results. I display case when first field has multiple values.
SQL query become correct:

SELECT base_table.vid AS vid, base_table.nid AS nid 
FROM node base_table 
INNER JOIN node__field_first node__field_first ON node__field_first.entity_id = base_table.nid 
INNER JOIN node__field_second node__field_second ON node__field_second.entity_id = base_table.nid 
INNER JOIN node_field_data node_field_data ON node_field_data.nid = base_table.nid WHERE ((LOWER(node__field_first.field_first_value) IN (LOWER('12345'),LOWER('45678')))) AND ((LOWER(node__field_second.field_second_value) IN (LOWER('test_value_1')))) AND (node_field_data.default_langcode IN ('1'))

The field node__field_second.field_second_value has correct searching value test_value_1

And in condition kint debug we see that all placeholders are correct:
test_content_type-fields

Please review described issue and if there is relevant fix it. Because it's very uncomfortable lose functionality of loadByProperties method.

Drupal.ajax does not guarantee that "add new JS file to page" commands have finished before calling said JS

$
0
0

Problem/Motivation

It is impossible to load additional JS libraries in an Ajax response and then call that code through Ajax commands, because Drupal.ajax does not guarantee that the JS library will already have loaded.

See #23 and #31 for details.

Proposed resolution

TBD.

Remaining tasks

TBD.

User interface changes

None.

API changes

TBD

TBD

Original report by [username]

Hi,

Thanks for your module, it works perfect for me.

But I found there one small bug there: if all my .js files are mapped to the external CDN, ajax redirects doesn't execute. After some tests I found that CDN rewrites all js urls, even for ajax. So I attached a small patch that solved this problem for me.

Best regards,
Spleshka.

Allow the user to choose their language upon registration

$
0
0

Language selector is not displayed on /user/register

Yet on admin/config/people/accounts/form-display the selector is set to be displayed

bah

[meta] Release Drupal 10 in 2022

$
0
0

Problem/Motivation

  • Drupal 9 requires Symfony 4, which will be end-of-life in November 2023.
  • It also requires CKEditor 4, which the maintainers specifically extended security coverage of from 2022 to 2023 at our request.
  • Sites need at least a year to update, and given the progress on the Drupal 9 beta to date, targeting a release six months ahead of time was a very good idea. We should repeat that for Drupal 10.

On the other hand:

  • Numerous large requirements were descoped from Drupal 9 to Drupal 10 (forking the remaining jQuery UI components, adopting CKEditor 5, creating a Starterkit theme tool to replace Classy, etc.) These things will easily take 18 months or more to complete.

  • Regardless of whether Drupal 10 requires Symfony 5 or 6, we're better off releasing Drupal 10 at least six months after November 2021, so that we have lead time to integrate with a stable release of either 5.4 (the LTS) or 6.0, both of which will be released in November 2021.

  • Finally, since both Drupal 8 is supported until November 2021, trying to release Drupal 10 earlier would require non-trivial maintenance overhead.

Proposed resolution

Release Drupal 10 in 2022. Target June 2022.

  1. #3118154: [meta] Deprecate dependencies, libraries, modules, and themes that will be removed from Drupal 10 core by 9.2.0-beta1
  2. #3118147: [meta] Set Drupal 10 platform requirements
  3. Alpha requirements
  4. #3118149: [meta] Requirements for tagging Drupal 10.0.0-beta1
  5. Beta targets

Remaining tasks

  1. Determine when to open 10.0.x for development.

  2. Increase and finalize the platform requirements for Drupal 10 earlier in the process. (We're running into both technical and community drawbacks from the fact that database requirements are down to the wire for the D9 beta.) Set a specific earlier deadline? Increase them to at least the obvious minima as soon as the branch opens, as we did for PHP? Etc.

  3. Set beta and RC dates as well as potential fallback scenarios once 9.0.0 ships (based on how our Drupal 9 schedules end up working out).

  4. Begin identifying requirements in child issues and start the most critical/disruptive requirements (like CKEditor 5 and replacing the jQuery UI Dialog) as soon as possible.

  5. Decide whether to open 10.1.x to development earlier (potentially as early as 9.3.0-alpha1), since spending another six months in feature freeze so soon after 9.0 development might be unnecessary (given how close D10 will be to D9) as well as detrimental to innovation.


Fix up minor problems in help topics

$
0
0

Please wait until #3041924: [META] Convert hook_help() module overview text to topics is otherwise fixed before making patches for this issue. It is currently Postponed.

We have made a few typos and there may be other minor problems with help topics to fix up... This issue is to collect them.

Here is the list of fixes to do:

  1. benjifisher found this typo: in system.config_error.html.twig:
    enter the URL for your 403/403 pages, starting 
    

    Should say 403/404.

  2. alexpott found this in contact.setting_default.html.twig
    <p>{% trans %}Set a site-wide contact form to be the default contact form (the form that is shown on the <em>/contact</em> URL).{% endtrans %}</p>
    

    It's possible the /contact path is altered so might not be on /contact. I think we should link to the site wide contact form using the contact.site_page route.

  3. On #3150364: Add a description for the language toolbar button to the CKEditor help page some text is being added to the CKEditor hook_help about the Language button that can be added to the toolbar. We need to make sure that information is also in our CKEditor topic or in an appropriate multilingual topic, or both, once that issue is finalized.
  4. On #3150364: Add a description for the language toolbar button to the CKEditor help page they also made a list of accessibility features and a section about making accessible text. I'm not sure we covered that well in our topic on Accessibility, so we should check. See this screenshot of the output of one of the patches:
    Accessibility information in help for CKEditor
  5. On #3067727: Convert comment, node, path, taxonomy module hook_help() to topic(s), the patch on #41 introduced the idea of adding a "Who can...?" section between Goal and Steps on Task topics, which tells what permissions you need to do the task. This seems like a good idea that maybe we should replicate on other Task topics?
  6. On #3047711-43: Convert file, image, media, media_library, responsive_image module hook_help() to topic(s), catch brought up the question of terminology to use for "bundles" (entity sub-types). We had adopted in the core.structure topic the terminology of calling them "entity sub-types", as we did in the User Guide. But we may want to reconsider that. If we decide a different term is better, we need to update several topics that adopted this terminology.

Correctly determine when to display fields as inline

$
0
0

When Drupal displays a field, the template is field.html.twig, which generates block-level markup including optional labels, attributes, and supports multiple values.

For the node title, uid and created fields Drupal supplies an overridden template (e.g. field--node--title.html.twig) that generates simplified inline markup without label or title_attributes.

If the site owner has hooked the node title to setDisplayConfigurable(), then the inline display is incorrect. The label is missing, markup is inline, and the markup might not match normal CSS selectors for fields (for example if the CSS selector specifically matches on div). For the node created field, also the metadata rel="schema:author" is missing.

Solution

Add a '#inline_field' variable to the field templates so that they can distinguish whether they are called in a context where they should return block markup or inline markup.

The detailed rules for inline markup are as follows:

  1. The page title is always inline.
  2. The node title, uid and created fields are inline except if setDisplayConfigurable() has been called.
  3. To preserve back-compatibility, rule 2) only applies if an additional entity type property has been set - reusing the mechanism from #2923701: Mechanism to disable preprocessing of node base fields so they can be configured via the field UI.

Workaround

/**
 * Implements hook_theme_registry_alter().
 */
function XXX_theme_registry_alter(&$theme_registry) {
  // Disable the 'inline' versions of node base field templates to workaround
  // https://www.drupal.org/node/2993647.
  unset($theme_registry['field__node__title']);
  unset($theme_registry['field__node__uid']);
  unset($theme_registry['field__node__created']);
}

Form prefix/suffix redesign in Claro

$
0
0

Problem/Motivation

In form-text.css, .form-element width is set to 100% at widths up to 600px. This pushes prefixes and suffixes to a new line in a way that doesn't look good. (Found using Umami profile on Chrome at admin/config/media/image-toolkit)

Proposed resolution

Implement a new design to solve this:

This image is just a reference. Please use this Figma link to check spacing and other definitions.

Remaining tasks

  • Create a new design
  • Accessibility review
  • Create a new patch

User interface changes

A new design for prefix will be available.

Release notes snippet

Roadmap to stabilize Claro

$
0
0

Problem/Motivation

Claro is aimed to be an experimental admin theme in Drupal 8.8.0 which according to Drupal development roadmap is aimed to be released on December 4, 2019. Drupal 8.8.0 feature freeze is on the week of October 14, 2019. Claro must reach at least beta status by then to be included in a stable release.

Claro beta criteria

Once the following level of feature completeness has been reached, we will consider tagging beta release for Claro:

  • No known data integrity or security issues
  • Everything that requires a big BC break has been solved
  • Claro supports complex content authoring tasks including most prominent contrib modules (limited validation done by maintainers of Claro acceptable at this point)
  • Claro supports most commonly used admin pages
  • All commonly used global components have been designed and implemented

Must-haves for the beta release:

Features
Bugs
Core inclusion

Should-haves for beta stability

Accessibility

Claro stable criteria

Once the following level of feature completeness has been reached, we will consider tagging stable release for Claro:

  • All core-gates are met
  • Claro supports complex content authoring tasks including most prominent contrib modules (with more extensive validation that includes maintainers of contrib projects)
  • Claro supports all Drupal core admin interfaces
  • All global components supported by Seven have been designed and implemented
  • Drupal module designs align with the new Drupal Design System (Quickedit, Contextual Links, Settings Tray, Toolbar)

Must-have issues for stable release:

Features
Accessibility
Usability improvements
Design improvements
Technical debt
  • #3059847: Move hard coded AJAX progress bar classes to a theme function
  • #3084579: Claro Core inclusion that removes the duplicate JS
  • #3060697: Use dropbutton variants with #dropbutton_type instead of custom classes
  • #3084810: Decouple Claro from Classy
  • #3024996: Remove tableselect.js and media_library.view.js overrides
  • #3084916: Add a new Drupal.theme JavaScript function for theming the the show/hide row weight toggle and its wrapper in draggable tables
  • Bugs
    Performance

    Should-have issues for stable release:

    Could-have issues for stable release:

    Post-stable

    Not scoped

      InvalidArgumentException: Source path has to start with a slash. in Drupal\Core\Path\AliasManager->getAliasByPath() line 186 of core/lib/Drupal/Core/Path/AliasManager.php

      $
      0
      0

      I have updated the Drupal core version 8.5.5 to 8.6.13.
      I am trying to access config > System > Basic site settings (admin/config/system/site-information) it is getting the below error.

      The website encountered an unexpected error. Please try again later.InvalidArgumentException: Source path has to start with a slash. in Drupal\Core\Path\AliasManager->getAliasByPath() (line 186 of core/lib/Drupal/Core/Path/AliasManager.php).

      Drupal\system\Form\SiteInformationForm->buildForm(Array, Object)
      call_user_func_array(Array, Array) (Line: 518)
      Drupal\Core\Form\FormBuilder->retrieveForm('system_site_information_settings', Object) (Line: 275)
      Drupal\Core\Form\FormBuilder->buildForm('system_site_information_settings', Object) (Line: 93)
      Drupal\Core\Controller\FormController->getContentResult(Object, Object)
      call_user_func_array(Array, Array) (Line: 123)
      Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
      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: 151)
      Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
      Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
      Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
      Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
      Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
      Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 119)
      Drupal\cdn\StackMiddleware\DuplicateContentPreventionMiddleware->handle(Object, 1, 1) (Line: 47)
      Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
      Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
      Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
      Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
      

      t() calls dependency injection in Form Builders

      Naming convention of color shades in the Drupal Design System (e.g. for Claro)

      $
      0
      0

      Problem/Motivation

      Follow-up to #3154539: Implement new Gray scale on Claro.

      As jwilson3 mentioned we should rethink the naming convention of the colors in the Drupal Design System.

      Instead of naming color variables that are near to impossible to remember if you need to lighten or darken one, I'd suggest naming the css variables on a numeric scale.

      Proposed resolution

      We'll come up with a new naming convention for colors in the Drupal Design System.

      Remaining tasks

      • Define new color naming convention
      • Update colors in the Drupal Design System
      • Update naming in Claro

      User interface changes

      API changes

      Possible CSS Vars naming changes.

      Data model changes

      Release notes snippet

      Note for naming changes.


      Create smaller variations for form elements

      $
      0
      0

      Problem/Motivation

      Several places in Claro use the regular size for input fields and take a lot of vertical space.

      Proposed resolution

      As we have for buttons, we need smaller and more compact input and selects for smaller forms like the content page filter or the people page filter.

      Input full specs: https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Drupal-Design-system...
      Select full specs: https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Drupal-Design-system...

      Remaining tasks

      • Create designs
      • Create specs
      • Create styles for smaller inputs/selects.
      • It should be possible to target a single element by adding a class to that element
      • It should also be possible to target all elements within a form by adding a single class to the form. Although button variants already exist, button CSS will need updating to allow variant-styling based on a parent class such as .form--small
      • Implement it on views filters and textarea formatting select.

      User interface changes

      Some forms will result on taking less space.

      Testing instructions

      Small size:
      - Filters for the following lists:
      /admin/content
      /admin/people
      Extra Small size:
      Textarea formatting select
      node/add/page

      PluginWithFormsInterface and PluginWithFormsTrait should reference each other in docs

      Elements that use .visually-hidden and .focusable aren’t read when using VoiceOver in iOS or in Chrome

      $
      0
      0

      Problem/Motivation

      Elements that use .visually-hidden and .focusable classes (such as the skiplink) are not read when using the VoiceOver screenreader in iOS (iPhone or iPad) or in Chrome on a Mac.

      For an easy demo of this problem, try listening to the skiplinks here on d.o with VoiceOver either on an iOS device or in Chrome on a Mac. Even though d.o is using D7 and the classes have different names, the styles are the same as in D8.

      This problem doesn’t appear in the Seven theme because it sets the position to absolute when focusable elements are focused.

      Proposed resolution

      Using the HTML5 Boilerplate version of the visually-hidden and focusable styles and removing position: static from the focusable styles fixed this problem for me.

      Required Tests

      Let's make sure there are no regressions in these other AT:

      • JAWS - Untested
      • NVDA - Untested
      • VoiceOver - Untested
      • ChromeVox - Untested

      Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 150 of /var/www/stage-community/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php)

      $
      0
      0

      Hi all,

      In my page, a have a view with a form where I show users, and if they are enabled or disabled(their state), and I give the option to change it. I mean, in the form, I can select/deselect a user(s). When a user(or users)is selected, I can choose an action that will be taken over it(enable or disable, options), and I press a button to make this changes. Using Drupal core 8.9.2 version it was working ok. Since I've updated the core version to 8.9.3, it is not working anymore. I get this error:

      An AJAX HTTP error occurred.
      HTTP Result Code: 500
      Debugging information follows.
      Path: /batch?id=117&op=do_nojs&op=do
      StatusText: 500 Service unavailable (with message)
      ResponseText: The website encountered an unexpected error. Please try again later.

      And in the error report page(Error report) I can see:
      Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 150 of /var/www/stage-community/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php)

      And the message in the Watchdog table is:
      a:6:{s:5:"%type";s:57:"Drupal\Component\Plugin\Exception\PluginNotFoundException";s:8:"@message";s:34:"The "" entity type does not exist.";s:9:"%function";s:53:"Drupal\Core\Entity\EntityTypeManager->getDefinition()";s:5:"%file";s:78:"/var/www/stage-community/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php";s:5:"%line";i:150;s:17:"@backtrace_string";s:4733:"#0 /var/www/stage-community/web/modules/contrib/group/group.module(246): Drupal\Core\Entity\EntityTypeManager->getDefinition(NULL)
      #1 /var/www/stage-community/web/modules/contrib/group/group.module(260): group_query_entity_query_alter(Object(Drupal\Core\Database\Driver\mysql\Select))
      #2 /var/www/stage-community/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): group_query_views_entity_query_alter(Object(Drupal\Core\Database\Driver\mysql\Select), NULL, NULL)
      #3 /var/www/stage-community/web/core/lib/Drupal/Core/Database/Query/Select.php(480): Drupal\Core\Extension\ModuleHandler->alter('query', Object(Drupal\Core\Database\Driver\mysql\Select))
      #4 /var/www/stage-community/web/core/modules/views/src/Plugin/views/query/Sql.php(1491): Drupal\Core\Database\Query\Select->preExecute()
      #5 /var/www/stage-community/web/modules/contrib/views_bulk_operations/src/Service/ViewsBulkOperationsActionProcessor.php(348): Drupal\views\Plugin\views\query\Sql->execute(Object(Drupal\views\ViewExecutable))
      #6 /var/www/stage-community/web/modules/contrib/views_bulk_operations/src/ViewsBulkOperationsBatch.php(120): Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor->populateQueue(Array, Array)
      #7 /var/www/stage-community/web/core/includes/batch.inc(295): Drupal\views_bulk_operations\ViewsBulkOperationsBatch::operation(Array, Array)
      #8 /var/www/stage-community/web/core/includes/batch.inc(137): _batch_process()
      #9 /var/www/stage-community/web/core/includes/batch.inc(93): _batch_do()
      #10 /var/www/stage-community/web/core/modules/system/src/Controller/BatchController.php(55): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
      #11 [internal function]: Drupal\system\Controller\BatchController->batchPage(Object(Symfony\Component\HttpFoundation\Request))
      #12 /var/www/stage-community/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
      #13 /var/www/stage-community/web/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
      #14 /var/www/stage-community/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
      #15 /var/www/stage-community/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
      #16 /var/www/stage-community/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
      #17 /var/www/stage-community/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #18 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #19 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #20 /var/www/stage-community/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #21 /var/www/stage-community/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #22 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #23 /var/www/stage-community/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #24 /var/www/stage-community/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #25 /var/www/stage-community/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #26 /var/www/stage-community/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
      #27 {main}";}

      I have no clue what the problem could be... Can you help me please?

      getDisplayLabel() on null in Drupal\profile\Entity\Profile->label() profile.php

      $
      0
      0

      HI all,

      Normally I can find patches for these kind of "on null" errors, but I cannot find this one.
      And I am not confident enough to start changing things in the code yet.

      When I go to
      Manage>People>Profiles

      I get this error:

      Error: Call to a member function getDisplayLabel() on null in Drupal\profile\Entity\Profile->label() (line 92 of /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/modules/contrib/profile/src/Entity/Profile.php)
      #0 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/Entity/EntityBase.php(281): Drupal\profile\Entity\Profile->label()
      #1 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/modules/contrib/profile/src/ProfileListBuilder.php(118): Drupal\Core\Entity\EntityBase->toLink()
      #2 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/Entity/EntityListBuilder.php(235): Drupal\profile\ProfileListBuilder->buildRow(Object(Drupal\profile\Entity\Profile))
      #3 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/Entity/Controller/EntityListController.php(23): Drupal\Core\Entity\EntityListBuilder->render()
      #4 [internal function]: Drupal\Core\Entity\Controller\EntityListController->listing('profile')
      #5 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
      #6 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/Render/Renderer.php(573): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
      #7 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
      #8 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
      #9 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
      #10 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
      #11 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #12 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #13 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #14 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #15 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #16 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #17 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #18 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
      #19 /home/arbitil424/domains/struvaa.nl/public_html/Drupal8/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
      #20 {main}

      Code that is causing the error

      profile.php

       public function label() {
          $profile_type = ProfileType::load($this->bundle());
          $label = $this->t('@type #@id', [
            '@type' => $profile_type->getDisplayLabel() ?: $profile_type->label(),
            '@id' => $this->id(),
          ]);
      

      Help and/or advice is most welcome!

      Viewing all 297515 articles
      Browse latest View live


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