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

List failed projects when a fetch fails.

$
0
0

Currently after update fails for some projects I get an information like "Failed to get available update data for 2 projects.".

It would be more helpful to get a list of projects. This way I can block updates of some projects in `hook_update_projects_alter`. Mostly useful for projects without public updates e.g. `Progressive` theme/module.

I'm attaching a patch. This is against my local repo. Let me know if you need patch against Drupal repo.

In effect of this simple patch you would get two messages:

  • Failed to get available update data for @count projects.
  • Some Module Name, Other Module

"Enable newly added modules" link to enable modules where dependencies are met

$
0
0

UPDATE: Posting as a feature request for the link to be able to actually enable modules where dependencies are met, to eliminate the step of searching.

I'm using Opingo LMS which is built on drupal 7.56.

When I install modules, the hyperlink of 'Enable newly added modules' points to 'admin/modules'

instead of enabling the newly added module. (I verified this in modules/system/system.updater.inc )

Is this supposed to link that way or actually have the ability to enable it to avoid having to search for the newly installed module?

Hope this question is in the correct component.

Simplify performance settings page

$
0
0

Updated: Comment #-

Problem/Motivation

The "Use internal page cache" checkbox on the Performance settings page is confusing: you can always check it, but it's only going to have any effect if the "Page cache maximum age" setting is set to anything else than "none".

Proposed resolution

Only show the "Use internal page cache" checkbox when a maximum age is configured, using Form API's #states.

Remaining tasks

None.

User interface changes

Only show the "Use internal page cache" checkbox when a maximum age is configured, using Form API's #states.

API changes

None.

block_content_update_8400 fails

$
0
0

Problem/Motivation

After I made composer updates to Drupal 8.5 I ran drush updb --entity-updates.
It fails on the following update:

 [notice] Update started: block_content_update_8400
 [error]  Exception thrown while performing a schema update. SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value: ALTER TABLE {block_content_field_revision} CHANGE `status` `status` TINYINT NOT NULL; Array
(
)
 [error]  Update failed: block_content_update_8400 

block_content_field_revision table is not empty.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

How to remove the div surrounding the view block ?

$
0
0

I created a view block that I added in the navigation bar.

When I inspect my page, I have a div around my block.

How can I delete this div ?

I want to have only :

<section class="views-element-container block block-views block-views-blockmenu-page-utilisateur-block-2 clearfix" id="block-views-block-menu-page-utilisateur-block-2">

Query settings missing when display type Entity Reference

$
0
0

I just notice there is no query settings under advance in view interface if the display type "Entity Reference", is this bug? it supposed to be like this?
I Drupal 7 we used to have that option.

This is a bug, it turns out that the 'cache' setting should have been hidden and not the 'query' setting.

Comments are not filtered on language

$
0
0

Hey guys!
The situation, I have a Drupal 8 multilingual node where Dutch is the main language and French is the other.
If I add a comment to the Dutch node translation and approve it, it will show. But it will also show in the French translation.
I think it is rather weird to see a mix of Dutch and French below a Dutch node.

You can easily recreate this issue on simply test me.

P.S. as a quick workaround I created a view which shows me the comments based on the current node and filtered on a language. But it would be better that this approach is not necessary.

Traits on WebTestBase cause PHP Fatal error in php 5.6

$
0
0

Problem/Motivation

When updating the acquia_contenthub module, we found that running our test suite against 5.6.32 and below caused php fatal errors. Test output below.

The crux of the issue is use statements for traits contain the same name as the traits in WebTestBase namespace. Not sure why this doesn't fail in php7, but so far its only in php 5.6

$ php core/scripts/run-tests.sh --php /home/travis/.phpenv/shims/php --verbose --url http://localhost:8080 acquia_contenthub
Drupal test run
---------------
Tests to be run:
  - Drupal\acquia_contenthub\Tests\FieldClearingNodeTest
  - Drupal\acquia_contenthub\Tests\IntegrationTest
  - Drupal\acquia_contenthub\Tests\NodeFormTest
  - Drupal\acquia_contenthub\Tests\ParagraphsTest
  - Drupal\acquia_contenthub\Tests\TaxonomyTermTest
  - Drupal\Tests\acquia_contenthub\Unit\ContentHubEntitiesTrackingTest
  - Drupal\Tests\acquia_contenthub\Unit\ContentHubEntityDependencyTest
  - Drupal\Tests\acquia_contenthub\Unit\ContentHubEntityEmbedHandlerTest
  - Drupal\Tests\acquia_contenthub\Unit\Controller\ContentHubExportQueueControllerTest
  - Drupal\Tests\acquia_contenthub\Unit\Controller\ContentHubReindexTest
  - Drupal\Tests\acquia_contenthub\Unit\Encoder\ContentHubCdfEncoderTest
  - Drupal\Tests\acquia_contenthub\Unit\EntityManagerTest
  - Drupal\Tests\acquia_contenthub\Unit\Form\NodeFormTest
  - Drupal\Tests\acquia_contenthub\Unit\Form\NodeTypePreviewImageFormTest
  - Drupal\Tests\acquia_contenthub\Unit\ImportEntityManagerTest
  - Drupal\Tests\acquia_contenthub\Unit\Normalizer\ContentEntityNormalizerTest
  - Drupal\Tests\acquia_contenthub\Unit\Normalizer\ContentEntityViewModesExtractorTest
  - Drupal\Tests\acquia_contenthub\Unit\Plugin\QueueWorker\ContentHubImportQueueBaseTest
  - Drupal\Tests\acquia_contenthub\Unit\QueueItem\ImportQueueItemTest
  - Drupal\Tests\acquia_contenthub\Unit\Session\ContentHubUserSessionTest
Test run started:
  Friday, March 2, 2018 - 06:09
Test summary
------------
Drupal\acquia_contenthub\Tests\FieldClearingNodeTest          45 passes             1 exceptions   9 messages
PHP Fatal error:  Cannot use Drupal\Tests\node\Traits\ContentTypeCreationTrait as ContentTypeCreationTrait because the name is already in use in /home/travis/build/drupal/docroot/core/modules/simpletest/src/WebTestBase.php on line 22
Fatal error: Cannot use Drupal\Tests\node\Traits\ContentTypeCreationTrait as ContentTypeCreationTrait because the name is already in use in /home/travis/build/drupal/docroot/core/modules/simpletest/src/WebTestBase.php on line 22

Proposed resolution

Rename the remaining traits so they don't conflict.

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.


Visual regression tests fail because plugins are discovered in different order

$
0
0

Problem/Motivation

CKEditor plugin buttons are displayed in different order on input format settings page 'admin/config/content/formats/manage/basic_html' on different environments. Visual regression testing therefore is not possbile.

In thunder_admin we mitigate this issue by sorting the plugin buttons in preprocess, see diff here.

Proposed resolution

Sort plugin definitions after discovery.

Adding File Usage "File" relationship results in broken/missing handler

$
0
0

I am trying to add a relationship "file usage" to a view. I click the submit button, but the relationship never gets added and UI never closed. I can add other relationships as expected.


To replicate (with "standard" profile):

  1. Create a new view listing node content (no displays need to be added).
  2. Don't touch the base view config in any way (the default "title" field will be the only field, etc.)
  3. Add a File Usage "File" relationship via the UI

After these steps the relationship config dialog reports "The handler for this item is broken or missing" and no config form is displayed. The relationship can then be saved on the view (without configuration) but cannot be used.

Immediately upon adding the relationship an error similar to the following is printed in the views UI:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fid' in 'field list': SELECT node_field_data.created AS node_field_data_created, node_field_data.nid AS nid, fid AS fid FROM {node_field_data} node_field_data WHERE (( (node_field_data.status = :db_condition_placeholder_0) )) ORDER BY node_field_data_created DESC LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 )

And a barrage of notices are logged, containing and/or repeating:

Notice: Undefined index: id in Drupal\views\Plugin\ViewsHandlerManager->getHandler() (line 109 of /var/www/drupal-8/core/modules/views/src/Plugin/ViewsHandlerManager.php).
Notice: Undefined variable: items in Drupal\views\Plugin\views\relationship\Broken->buildOptionsForm() (line 79 of /var/www/drupal-8/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php).
Notice: Undefined index: original_configuration in Drupal\views\Plugin\views\relationship\Broken->buildOptionsForm() (line 61 of /var/www/drupal-8/core/modules/views/src/Plugin/views/BrokenHandlerTrait.php).

Provide a single command to install & run Drupal

$
0
0

Problem/Motivation

Let's assume you are a first time Drupal user. You want to to install Drupal, so you google it:

Before installation.
Step 1: Download and extract Drupal.
Step 2: Create the database.
Step 3: Create settings.php and the files directory.
Step 4: Run the installation script.
Step 5: Setting up the files directory.
Step 6: Install Drupal in another language.
Step 7: Built-in Installation Profiles.

Let's compare that to many projects out there:

npm require X
npm install
🍷

The goal of this issue is to provide a similar experience for first time Drupal users.

This command might not be for you when you:

  • Know how to run docker
  • Have drush or drupal console installed on your machine
  • You know already how to setup Drupal

Proposed resolution

The steps we need to execute are:

  • Install Drupal (setting the file system up, creating a database, install some install profile)
  • Start a webserver

Luckily there is SQLITE and the PHP built in webserver out there.

Detailed plan

How to test

  1. Apply patch
  2. Run $ composer run-script dev-site from the command line
  3. Visit the URL printed out in the console in your browser.

Remaining tasks

  • Patch needs instructions in INSTALL.txt as noted in Detailed plan section above.

User interface changes

API changes

Data model changes

PHP 7.2: Warning: count(): Parameter must be an array or an object that implements Countable a theme_table()

$
0
0

Warning: count(): Parameter must be an array or an object that implements Countable a theme_table() (línia 1998 de /var/local/html/dadesobertes/includes/theme.inc).

Views Pager includes duplicates with Random Sort

$
0
0

Steps to recreate:

- Install Drupal 8x
- Create 50 dummy pages
- Create a view (either page or block)
- Set the view to show the field title (or teaser content)
- Add sort criteria as Global: Random (asc)
- Make sure no other sort criteria is listed
- Add a pager to show 5 items (Full | Paged, 5 Items)

Navigate to the view that you have created. This should results in showing 50 unique nodes being randomly sorted and displayed 5 per page.

What actually happens when clicking through pager is that we get duplicates appearing. It would appear that the pager is requesting 5 nodes and sorting these by random. The next pager repeats this request, resulting in duplicates being pulled through. The nodes are not seeded in a sequence between pages.

Using AJAX makes no difference the issue is present in both AJAX and Non AJAX views.

I noticed this was also an issue Drupal 7 with the solution being available as a module:
https://www.drupal.org/project/views_random_seed

Unfortunately this module in not available for Drupal 8.

Deleting users can result in a duplicate primary key in poll_vote

$
0
0

Hi

Is using v 7.27-dev

When Cancel/delet an account and
mark> Delete the account and make its content belong to the Anonym user.

Messages are:
The update has been performed. - (GREEN)

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '17-0-111.111.111.111' for key 'PRIMARY': UPDATE {poll_vote} SET uid=:db_update_placeholder_0 WHERE (uid = :db_condition_placeholder_0) ; Array ( [:db_update_placeholder_0] => 0 [:db_condition_placeholder_0] => 211 ) in poll_user_cancel() (line 992 of /home/www/xx.xxxxx.xx/modules/poll/poll.module). - (RED)

But the account is not deleted

What to do?

Pafla

UI telling you a field is shared across languages is way too subtle

$
0
0

Postponed on #867830: "unpublished" status of rendered entities is not accessible (and looks bad).

Problem/Motivation

When setting up an entity bundle to be translatable, people have a choice of making each field translatable or not. The user interface signals untranslatable fields with (all languages) on the UI but that is way too subtle.

Proposed resolution

Make the marker more recognizable.

Remaining tasks

1. Add a tooltip.
2. Decide on text of marker.
2. Get #867830: "unpublished" status of rendered entities is not accessible (and looks bad) in first.
3. Get this in.

User interface changes

A better marker for fields shared among all languages.

API changes

None.

Data model changes

None.


Make it easier to override the cid generation of route

$
0
0

When we need to override the construction of the route CID, we must rewrite the entire Drupal\Core\Routing\RouteProvider::getRouteCollectionForRequest() method. It would be more elegant to isolate the construction of the a CID string in a method RouteProvider::getRouteCid(), in order only override this method.

This solution was made following the discussion on the resource consumption caused by the use of Cache Context for route in the issue 2799543: https://www.drupal.org/node/2799543.

The initial idea was proposed by @fgm in his comment https://www.drupal.org/node/2799543#comment-12249865.

Return translated term name on views "Content: Has taxonomy term ID (with depth)"

$
0
0

I have a view that lists nodes, filtered by contextual filter "Content: Has taxonomy term ID (with depth)".
In the view I override the view title in the contextual filter setting with "{{ arguments.term_node_tid_depth }}" token.

All the terms have translation, but I noticed that the title is always displayed in the default language.

Here's the patch that I used to fix the issue.
It uses the same method of retrieving the translation as used in "IndexTid.php" in the same folder.

Steps to reproduce:

  • Enable content_translation module
  • add Spanish language
  • Enable content translation to Spanish for taxonomy terms
  • Create a taxonomy term (e.g. Butterfly) and translate it into Spanish (Mariposa)
  • Change the taxonomy_term view to use the "Has taxonomy term ID (with depth)" argument, as well as the depth
  • Ensure that "Replace title" is checked, and {{ arguments.term_node_tid_depth }} is used as the title replacement
  • Go to the taxonomy term page in Spanish
  • The English title will be shown instead of Spanish - this is the bug.

 The term name is not translated correctly.
 The term name is correctly translated.

"The entity type block_content does not have a "published" entity key." notices when updating from 8.4 to 8.5

$
0
0

Problem/Motivation

Steps to reproduce:

  1. Checkout 8.4.x (17ebfff72673728bc8495d67f35061ad8bdcc299)
  2. Install the standard profile via drush without creating custom blocks
  3. Checkout 8.5.x (bf47414a25e8d8f1fb2b5101a2c18c6829d99627)
  4. Run updates via drush (drush updb -y)

Expected result: only success messages are displayed
Actual result: the "The entity type block_content does not have a "published" entity key." notice is displayed twice

Proposed resolution

TBD

Remaining tasks

  • Find a solution
  • Write a patch
  • Reviews

User interface changes

None

API changes

TBD

Data model changes

None

ConfigSync.php tries to include non-existing file config.admin.inc

$
0
0

Problem/Motivation

I am searching for a way to import config in sync directory for automated PHPunit tests and when looking at the code of the config module, I found the following lines:

https://cgit.drupalcode.org/drupal/tree/core/modules/config/src/Form/Con...

$batch = [
          'operations' => [],
          'finished' => [get_class($this), 'finishBatch'],
          'title' => t('Synchronizing configuration'),
          'init_message' => t('Starting configuration synchronization.'),
          'progress_message' => t('Completed step @current of @total.'),
          'error_message' => t('Configuration synchronization has encountered an error.'),
          'file' => __DIR__ . '/../../config.admin.inc',
        ];

But I can't find any config.admin.inc file in the code. Is it normal?

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Form API #ajax not working on link element

$
0
0

Problem/Motivation

When adding Form API #ajax parameter to a Link type element:

    $form['link'] = [
      '#type' => 'link',
      '#title' => $this->t('AJAX link'),
      '#url' => Url::fromRoute('ajax_example.example_form_ajax', [], ['query' => ['some_parameter' => 'some_value']]),
      '#ajax' => [
        'callback' => [$this, 'ajaxCallback'],
        'wrapper' => $container_id,
      ],
    ];

, form values are not included in the AJAX request, resulting with a confusing error: "An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (50 MB) that this server supports." that has nothing to do with the actual problem and originates from \core\lib\Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber.php.

This bug seriously limits development possibilities when using AJAX API, because the only way a link can influence a form is by adding query parameters to the FormBuilder as in my Ajax Example sandbox, and always having to build a new form with empty storage etc, instead of working with the current form.

Proposed resolution

I checked the request object and when a link has #ajax parameter, the resulting request object has no form values in $request->query->parameters, as opposed to a submit element for example. Solution most likely requires modifying javascript to include form values in the request.

Also it'd be good to change the error message to be more descriptive, as the problem has nothing to do with file uploads.

Viewing all 296542 articles
Browse latest View live


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