PHPUnit does not complain that the mock was not used with $mock->expects($this->any()), but with $mock->expects($this->atLeastOnce()).
fyi: It was only set to 8.4 not 8.4.0. The other issues set it to 8.2.0/8.3.0.
This MR touch the same of 🐛 Url::createFromRequest ignores query parameters Needs work . I would say, let's extend the test there and close the issue here.
@mstrelan
Done. Somehow I could not believe that we do not have a unit test for the date formatter. :D
I replaced the kernel test with a unit test.
A test only would result into:
❯ ddev phpunit core/tests/Drupal/Tests/Core/Datetime/DateFormatterTest.php
Clearing old webdriver sessions
PHPUnit 11.5.42 by Sebastian Bergmann and contributors.
Runtime: PHP 8.3.25
Configuration: /var/www/html/core/phpunit.xml.dist
F 1 / 1 (100%)
Time: 00:00.032, Memory: 6.00 MB
There was 1 failure:
1) Drupal\Tests\Core\Datetime\DateFormatterTest::testFormat
Drupal\Core\Language\LanguageManagerInterface::getConfigOverrideLanguage() was not expected to be called.
/var/www/html/core/lib/Drupal/Core/Datetime/DateFormatter.php:342
/var/www/html/core/lib/Drupal/Core/Datetime/DateFormatter.php:129
/var/www/html/core/tests/Drupal/Tests/Core/Datetime/DateFormatterTest.php:39
Just try:
Fatal error:
$hook = function() { };
([]) + ($hook()) ?? [];
Fixed:
$hook = function() { };
([]) + ($hook() ?? []);
I believe this is a UX problem. 🐛 Incorrect behaviour for block page visibility Needs work
I entered <front> into pages and selected Hide for the listed pages. But my block was still visible.
Ok, I need to postponed it, because the origin annotation does not have a label, therefore also not the attribute.
Idea: Use \Drupal\entity_import\Plugin\migrate\process\EntityImportProcessTrait::getLabel in the form t('Process: %id') which can then be overridden by plugins or an own attribute?
I improve the "Steps to reproduce".
There are leftover code from 📌 Remove dependency on jquery_ui_datepicker Needs work . It is not a bug in itself, so the site is not broken, that right.
I started with:
/**
* Implements hook_views_query_alter().
*/
function openculturas_custom_views_query_alter(ViewExecutable $view, \Drupal\views\Plugin\views\query\QueryPluginBase $query): void {
if ($view->id() === 'media_library' && str_starts_with($view->current_display, 'widget')) {
assert($query instanceof \Drupal\views\Plugin\views\query\Sql);
/** \Drupal\views\Plugin\views\query\Sql $query */
$alias = $query->addField('media__field_licenses', 'field_licenses_license');
$query->addWhere(NULL, $alias, 'all_rights_reserved', '!=');
//$query->addWhereExpression($whereGroup, '(media_field_data.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0 AND ***VIEW_OWN_UNPUBLISHED_MEDIA*** = 1) OR ***ADMINISTER_MEDIA*** = 1');
}
}
which result info following sql-statement (preview in views UI):
SELECT "media"."mid" AS "media_mid", "media_field_data"."created" AS "media_field_data_created", "media_field_data"."name" AS "media_field_data_name", "media__field_licenses"."field_licenses_license" AS "media__field_licenses_field_licenses_license", "media_field_data"."mid" AS "mid"
FROM
{media_field_data} "media_field_data"
INNER JOIN {media} "media" ON media_field_data.mid = media.mid
LEFT JOIN {media__field_licenses} "media__field_licenses" ON media_field_data.mid = media__field_licenses.entity_id AND (media__field_licenses.deleted = '0' AND media__field_licenses.langcode = media_field_data.langcode)
WHERE ("media__field_licenses_field_licenses_license" != 'all_rights_reserved') AND (("media_field_data"."status" = '1') AND ("media_field_data"."default_langcode" = '1'))
ORDER BY "media_field_data_created" DESCWhich is valid, but something happens and the following error is shown:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'media__field_licenses_field_licenses_license' in 'where clause': SELECT COUNT(*) AS "expression" FROM (SELECT 1 AS "expression" FROM "media_field_data" "media_field_data" INNER JOIN "media" "media" ON media_field_data.mid = media.mid LEFT JOIN "media__field_licenses" "media__field_licenses" ON media_field_data.mid = media__field_licenses.entity_id AND (media__field_licenses.deleted = :views_join_condition_0 AND media__field_licenses.langcode = media_field_data.langcode) WHERE ("media__field_licenses_field_licenses_license" != :db_condition_placeholder_0) AND (("media_field_data"."status" = :db_condition_placeholder_1) AND ("media_field_data"."default_langcode" = :db_condition_placeholder_2))) "subquery"; Array ( [:db_condition_placeholder_0] => all_rights_reserved [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => 1 [:views_join_condition_0] => 0 )
Yes, 🐛 MediaLibraryUiBuilder service does not properly allow additional contextual filter arguments Needs work resolves the issue.
Rebased. Test-Only fails.
But I will also test the fix in a real use-case.
It was fixed by 🐛 "More" Text doesn't support Tokens, even if it says it does. Active .
Fyi: bef_datepickers.js does nothing, because $.fn.datepicker is not defined without a loaded jquery_ui_datepicker/datepicker.. Which was removed in
📌
Remove dependency on jquery_ui_datepicker
Needs work
.
When jquery_ui_datepicker/datepicker is loaded, then the date input has the jquery datepicker widget behind the native date picker from the browser. :D
Thanks, committed with small changes to make PHPStan happy.
tobiasb → changed the visibility of the branch 3061935-fatal-error-trait to hidden.
The issue 🐛 Move content_translation I18nQueryTrait to migrate module Active was fixed in Drupal core and is part of 11.2. So I think we do not need this anymore.
With NULL as value, we get an error.
Cannot load the "date_format" entity with NULL ID.
This hook can not be used by core/contrib.
When you update a module, you export the changed config locally and commit these changes. (drush updb/drush cex)
Deploy the code + config.
Then you can run drush deploy on the live site.
Both will be added to the view via update hook openculturas_map_update_10004.
I can not change the maintainer list. I just forgot once again. That I need to enable notifications for the project.
Saw the same.
ace.config.set was overridden by the old way, only workerPath worked
I replaced it and updated to latest version.
We do not use a patch atm.
hexabinaer → credited tobiasb → .
Patches are part of tour v2.
tobiasb → created an issue.
I removed the INSTALL.txt. A composer require is enough today.
From 8.x-2.1.
tobiasb → created an issue.
@dadderley You have something in your view which is broken.
The plugin ID comes from https://www.drupal.org/project/views_taxonomy_term_name_into_id →
It needs some love to make phpstan/rector happy.
@ressa
The issue is tagged with "Needs tests", which needs to be done.
@avpaderno
Sure.
The same problem with cookies module.
Remove header:true everything seems to be ok.
But there is also a problem with navigation-utils.js because it does not use "Drupal~behavior", so DOM can be not ready/fully loaded.
No answer until now.
Time for the next step.
I relabeled as a bug report, because I cherry-picked it into 2.4.x.
I relabeled as a bug report, because I cherry-picked it into 2.4.x.
D7 is gone. So bumping Version to 4.x.
There was a test :D
I created a new MR, because I can change the target branch.
tobiasb → changed the visibility of the branch 2985400-urlcreatefromrequest-ignores-query to hidden.
Seems to work fine. It still try to find a translation for en (see screenshot), but not for remote, when the remote uri is build with default server pattern. (ftp.drupal.org)