My solution would be to check if exposed_form is based on InputRequired plugin -> render view.
BEF uses the same plugin but has an option to disable it, but I am not sure if we should explicit check for that.
I changed the description:
This module allows you to grant access for user roles to view unpublished nodes of a type.
->
This module allows you to grant access for user roles to view unpublished nodes of a type of other user.
Not when only the owner should see the unpublished node. For this, there is already a permission View own unpublished content.
Only when other people need access to unpublished content, which are not super admin with Bypass content access control.
The update hook does also not clean up properly the photoswipe.settings configuration.
I added a test for the update hook photoswipe_update_9003 and new photoswipe_update_9013 (new hook).
photoswipe_update_9012 just removes the configuration.
The comment of core/tests/Drupal/KernelTests/Core/Routing/ExceptionHandlingTest.php was outdated.
The $message parameter in \Drupal\Tests\shortcut\Functional\ShortcutLinksTest::assertShortcutQuickLink is not used by core itself, but I just changed the text also.
Bump to latest version and add the config changes also in .eslintrc.legacy.json.
So perhaps the bug is fixed via symfony/http-foundation update(
📌
Update Symfony to 7.3.7 / 6.4.29
Active
) ?
Test is done, at least for the HTML output, by \Drupal\Tests\field\FunctionalJavascript\Number\NumberFieldTest::testNumberFormatter.
We can keep a default value for trimming, perhaps set it to a higher number.
Slack does trim a URL link text in form of http://www.example.com/content/articles/archive?[...]year=2012&month=february#com
This could be new option for URL only without entered title and disabled plain text.
The origin bug, can not be fixed when we just remove the default settings.
What I saw while fixing the test. We have a test which can not be configured via UI nor the formatter support it. (Case: url_only=false, url_plain=true)
I could remove it.
Ok. No. I will not migrate removed update hooks.
Would be possible, but it is anyway impossible to skip required version. e.g. 1.3.x to 2.5.x without 2.0.x.
I will just leave the updates there, then it is fine.
In case I change my mine, example with openculturas_custom:
/**
* Implements hook_removed_post_updates().
*/
function openculturas_custom_removed_post_updates(): array {
$needs_migration = [
'openculturas_custom_post_update_set_allowed_values_function_for_field_status' => '2.2.0',
'openculturas_custom_post_update_set_allowed_values_function_for_field_premiere' => '2.2.0',
'openculturas_custom_post_update_grant_administer_openculturas_custom_configuration' => '2.2.0',
];
$migrated = \Drupal::state()->get(__FUNCTION__);
if ($migrated === NULL) {
$needs_migration = [];
}
return $needs_migration + [];
}
/**
* Implements hook_update_N().
*/
function openculturas_custom_update_9302(): void {
$removed_updates = [
'openculturas_custom_post_update_set_allowed_values_function_for_field_status',
'openculturas_custom_post_update_set_allowed_values_function_for_field_premiere',
'openculturas_custom_post_update_grant_administer_openculturas_custom_configuration',
];
\Drupal::service('update.post_update_registry')->registerInvokedUpdates($removed_updates);
\Drupal::state()->set('openculturas_custom_removed_post_updates', TRUE);
}
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.