🇦🇹Austria @JordiK

Account created on 17 July 2016, almost 8 years ago
#

Recent comments

🇦🇹Austria JordiK

Coming here from Allow modules to skip TFA through a hook Closed: duplicate .

The MR does not merge to the latest 2.x-dev.

@dpi - an example of an event subscriber which allows a modules to skip TFA would be very helpful (for documentation).

🇦🇹Austria JordiK

Thank you for the sift reaction, @cmlara!

As far as I get the intention from looking at Allow TFA requirement to be configured per user Needs work it is solving a similar problem in a much more complicated way. I personally find the hook approach much easier and slightly better documented. It is in line with the comment #4 in the related issue.
I was also thinking of showing a list of modules in the TFA configuration, which use this hook. In this way admins can recognize at a glance if the TFA can be potentially skipped.

As for the second part of your comment - I will open a MR for 2.x-dev.

🇦🇹Austria JordiK

Small change - adding hardcoded 'entity_id' for the query table field. Works like a charm now.

🇦🇹Austria JordiK

I have the same problem as in #12. Using D10 and 9.1.x-dev.
If there are menu links with children, the urls are not replaced.
The patch in #12 solves this issue perfectly.

🇦🇹Austria JordiK

Does this error occur on a clean install and with the style plugin set to Table and not Table with aggregation options?

🇦🇹Austria JordiK

You can achieve this by simply overriding the twig.html template of your view (or view type).
More info you can find here: Working with Twig templates

Creating a new style plugin is not in the plans. And it is definitely more work than overriding a bunch of default table-styling.

🇦🇹Austria JordiK

Did you get this behavior on a clean install? Anything in the logs - warnings, errors? What is your filed configuration?

🇦🇹Austria JordiK

If you are using AJAX to sort/paginate/filter the view - check out 💬 Ajax submit: Automatically save values when changed Needs review .
I just added a new patch solving the same problem there.

🇦🇹Austria JordiK

Had some weird behavior when the view is sorted/paginated/filtered with AJAX.
The widget works only on the first page and after a fresh reload. The moment the view is reloaded through AJAX after e.g. column sort with AJAX the functionality breaks.
Similar to 💬 Changes not saving properly after filtering/sorting table Active .

Modified the AJAX attached to the form field by adding the original path as url and the rest of the parameters. Now it works fine for me.
Adding patch.

🇦🇹Austria JordiK

Same issue here. If the view is ajax enabled, sorting, filtering, pagination etc. breaks the functionality of the module.
Can provide steps to reproduce, if the maintainers care.

🇦🇹Austria JordiK

The test did not fail because of the patch - it is apparently a test problem.
Patches 📌 Post Drupal 10 Image captcha issue Needs work and 📌 Add gitlab CI Needs work fail after being green with the same error.

🇦🇹Austria JordiK

After some investigation I found the source of error (at least in my case).
When setting up Captcha to appear on a form in Captcha points, the challenge type was set to "Default".
Although the default type was set to "Image" in the global Captcha settings, this was never checked.
Since the function imageCaptchaAfterBuildProcess explicitly checks for "image_captcha/Image" by getting "default" it skips the rendering of the Reload button.

A quick and dirty solution can be to set the challenge type to "Image" manually.
A more elegant and robust way is in the patch attached - enabling the check of the global default.

🇦🇹Austria JordiK

The latest MR5956 did not apply on D10.2.3, stopping at core/modules/layout_builder/layout_builder.services.yml.
Here is the re-roll for D10.2. as a patch.

🇦🇹Austria JordiK

This has to go into the documentation.
In order to have the site admin permissions as in Group 1.0, do the following:
1. Create a group role "Site Administrator"
2. Scope: Insider
3. Global role: Administrator
4. Check "Admin role"

This role should sync with the site role "Administrator".

🇦🇹Austria JordiK

Re-rolling the patch to 2.2.x-dev, using the proper groupRelationship instead of groupContent and omitting the changes to ChainGroupPermissionCalculatorTest.php.

🇦🇹Austria JordiK

Here is the error message:

Path: /drupal10/views/ajax?_wrapper_format=drupal_ajax&view_name=a_test&view_display_id=page_1&view_args=1&view_path=%2Fgroup%2F1%2Fa_test_ajax_403&view_base_path=group%2F%25group%2Fa_test_ajax_403&view_dom_id=8f389401b820d9fcea507caac2ede0c96a4640105588e58078e48d7405ec2c0a&pager_element=0&order=label&sort=asc&_drupal_ajax=1&ajax_page_state%5Btheme%5D=olivero&ajax_page_state%5Btheme_token%5D=&ajax_page_state%5Blibraries%5D=eJxdjFEOwiAQRC8E5UhmgbGuUpYsFOT2msbU6M_kzZtkPK-XwgXOf8AEUbioe6G0UGjcYRPnh5H0RhV3BeJZMnVeqbFkWxEkR9J5jkUGFNH6aX2S8L2oIA03m0lVxr8dHGHqrA2b81RhOmNUd-RCd3r-iE3invACs1BMjA. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: in Drupal\views\Controller\ViewAjaxController->ajaxView() (line 201 of D:\xampp\htdocs\drupal10\core\modules\views\src\Controller\ViewAjaxController.php).

🇦🇹Austria JordiK

For a non-bootstrap theme the JS is loaded. I disabled the CSS.

🇦🇹Austria JordiK

The patch from #3254097: Group's use of uasort returns booleans, switch to spaceship operator. applies perfectly to Group 1.6 and was already committed to 3.x.

🇦🇹Austria JordiK

Since #41 neither of the later patches (#53 and #55) worked for me. Here is a re-roll of the #41 patch to the latest dev version.
For me it works without any errors with most of the base fields. The patch also applies cleanly to the beta10.

🇦🇹Austria JordiK

Here is a full list of occurrences of the function with file name, line number and in which function. I can gladly look into it and provide a patch, but we I would need guidance on whether we do a typecasting like in #16 or a check if NULL as in #25?

\core\lib\Drupal\Component\Utility\SortArray.php"(105,12): return strnatcasecmp($a_title, $b_title);
\core\lib\Drupal\Core\Config\Entity\ConfigEntityBase.php"(237,14): return strnatcasecmp($a_label, $b_label);
\core\lib\Drupal\Core\Datetime\Entity\DateFormat.php"(91,14): return strnatcasecmp($a_label, $b_label);
\core\lib\Drupal\Core\Entity\EntityDisplayModeBase.php"(72,19): $type_order = strnatcasecmp($a_type, $b_type);
\core\lib\Drupal\Core\Language\Language.php"(161,16): return strnatcasecmp($a_name, $b_name);
\core\lib\Drupal\Core\Layout\LayoutPluginManager.php"(204,16): return strnatcasecmp($a->getCategory() ?? '', $b->getCategory() ?? '');
\core\lib\Drupal\Core\Layout\LayoutPluginManager.php"(206,14): return strnatcasecmp($a->getLabel() ?? '', $b->getLabel() ?? '');
\core\lib\Drupal\Core\Plugin\CategorizingPluginManagerTrait.php"(95,16): return strnatcasecmp($a['category'], $b['category']);
\core\lib\Drupal\Core\Plugin\CategorizingPluginManagerTrait.php"(97,14): return strnatcasecmp($a[$label_key], $b[$label_key]);
\core\lib\Drupal\Core\Plugin\DefaultLazyPluginCollection.php"(100,12): return strnatcasecmp($a->getPluginId(), $b->getPluginId());
\core\lib\Drupal\Core\Test\TestDiscovery.php"(190,20): uksort($list, 'strnatcasecmp');
\core\lib\Drupal\Core\Test\TestDiscovery.php"(192,23): uksort($tests, 'strnatcasecmp');
\core\modules\config\src\Form\ConfigSingleExportForm.php"(89,28): uasort($entity_types, 'strnatcasecmp');
\core\modules\config\src\Form\ConfigSingleImportForm.php"(262,28): uasort($entity_types, 'strnatcasecmp');
\core\modules\config_translation\src\Controller\ConfigTranslationEntityListBuilder.php"(123,12): return strnatcasecmp($a_value, $b_value);
\core\modules\config_translation\src\Controller\ConfigTranslationMapperList.php"(69,16): return strnatcasecmp($a_title, $b_title);
\core\modules\filter\src\FilterPluginCollection.php"(100,14): return strnatcasecmp($a->provider, $b->provider);
\core\modules\help\src\Plugin\HelpSection\HelpTopicSection.php"(146,16): return strnatcasecmp($a_label, $b_label);
\core\modules\shortcut\src\Entity\Shortcut.php"(186,14): return strnatcasecmp($a->getTitle(), $b->getTitle());
\core\modules\system\src\Entity\Action.php"(178,14): return strnatcasecmp($a_type, $b_type);
\core\modules\views_ui\tests\src\Functional\FilterEntityReferenceWebTest.php"(46,14): return strnatcasecmp($a->getTitle(), $b->getTitle());
\core\modules\workspaces\src\WorkspaceRepository.php"(67,16): return strnatcasecmp($a->label(), $b->label());

🇦🇹Austria JordiK

I see the same message as in #27, but the patch in #25 did not solve it for me.

🇦🇹Austria JordiK

Got stuck in the same spot. While running drush ubdatedb got this error:

>  [notice] Update started: system_post_update_add_description_to_entity_form_mode
>  [error]  The "" entity type does not exist.
>  [error]  Update failed: system_post_update_add_description_to_entity_form_mode

Got the following error in the log:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 139 of \core\lib\Drupal\Core\Entity\EntityTypeManager.php).

The code which triggered the error was sending NULL to the EntityTypeManager:

#0 D:\xampp\htdocs\asemply\web\core\lib\Drupal\Core\Entity\EntityDisplayModeBase.php(96): Drupal\Core\Entity\EntityTypeManager->getDefinition(NULL)

After several hours of investigation solved it the brutal way. In EntityDisplayModeBase changed the function calculateDependencies() to this check if $this->targetEntityType is defined:

  public function calculateDependencies() {
    parent::calculateDependencies();
    if ($this->targetEntityType) {
      $target_entity_type = \Drupal::entityTypeManager()->getDefinition($this->targetEntityType);
      $this->addDependency('module', $target_entity_type->getProvider());
      return $this;
    }
  }

The database update ran smoothly afterwards. After it finished I reverted the modified function to its original state.

🇦🇹Austria JordiK

So, here is something that worked for me - removed the bootstrap CSS.
In case the language selector has to work also on non-bootstrap themes, I would suggest to leave the styling to the site builders and also avoid adding the bootstrap CSS, as it currently conflicts with non-bootstrap themes (e.g. Adminimal).

🇦🇹Austria JordiK

And can you please share more info about your setup and steps to reproduce? Error logs etc.?

🇦🇹Austria JordiK

Can you please test if it works with the LazyBuilder Use Lazy Builders to build widget form Needs work ?

🇦🇹Austria JordiK

Is there a way to make this module Bootstrap version independent?
The Drupal Bootstrap 3 is still used by roughly 115.000 pages vs approx. 5.000 with Bootstrap 5.

I would argue, that we do not need to download additional JS and CSS in languages_dropdown.libraries.yml if the underlying theme is Bootstrap. So in essence, we have to remove the last line to avoid any bootstrap version conflicts:

dependency-js:
  remote: https://github.com/FezVrasta/popper.js
  version: VERSION
  license:
    name: MIT
    url: https://github.com/FezVrasta/popper.js/blob/master/LICENSE.md
    gpl-compatible: true
  js:
    https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.9.2/umd/popper.min.js: { type: external, minified: true }
    <strong>https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js: { type: external, minified: true }</strong>
🇦🇹Austria JordiK

Glad to hear it worked. Closing.

🇦🇹Austria JordiK

Can you try and update the database with drush updatedb or through update.php? Seems you lost the rate_widget column somewhere on the way. After that try uninstalling.

🇦🇹Austria JordiK

For everyone getting the menu_token/src/Service/MenuTokenMenuLinkManager error: truncate all the cache tabled and the error is gone.

🇦🇹Austria JordiK

Can you please describe your environment a bit more in detail? Rate version, Drupal version and when do you get this error?

🇦🇹Austria JordiK

Attach the unvote-helper.js to the rate widget in views.

🇦🇹Austria JordiK

Proper handling of the fivestar template.
In the previous (and committed patch), after undoing a vote in fivestar, the first star remained until a page refresh. Corrected.

🇦🇹Austria JordiK

I could reproduce the behavior, the patch in #2 solves the issue.

🇦🇹Austria JordiK

The whole thread is 4 years old and concerns porting the D7 version to D8, which was done long ago.
Closing this as outdated.

🇦🇹Austria JordiK

Syntax error, upload again.

🇦🇹Austria JordiK

Refined the logic a bit, removed the NotFoundHttpException and its use statement.

🇦🇹Austria JordiK

Good idea! Will you be able to tackle this and document this a bit more in detail?
What about the votingapi_result table? Do we need to recalculate it?
Thank you for the efforts!

🇦🇹Austria JordiK

Datetime is a core module and there is a big chance the module is already enabled, but we cannot rely on that.
Adding the module dependency for datetime to rate.info.yml.

🇦🇹Austria JordiK

Added the vote source only for anonymous users.
If the user is authenticated, the vote is retrieved regardless where they voted from.

🇦🇹Austria JordiK

Please provide exact steps to reproduce this issue. Thank you!

🇦🇹Austria JordiK

Can you please give exact steps to reproduce this issue? Also some more information on your setup (which entities, how are comments added etc.)? As helpful pictures are in other cases, this one sentence and the two small pictures are insufficient to reproduce this issue.

🇦🇹Austria JordiK

Thank you for the patch! Committed to 3.0.x-dev.

🇦🇹Austria JordiK

Thank you! Commited to 3.0.x-dev.

🇦🇹Austria JordiK

This is a duplicate of #3276383: Views integration with media entities throws error . Patch was already provided there.
In the 3.0.x-dev version it was already solved. Will get in to a new release in the coming days.
Closing this here.

🇦🇹Austria JordiK

The patch in #31 does not apply and is actually not needed.
Adding the $query->accessCheck(TRUE); in RateWidgetBase.php at line 442 is sufficient before the query is executed.
Thank you for the patches!
Committing to 3.0.x-dev.

🇦🇹Austria JordiK

While changing the name of the variable one instance of it remained unchanged leading to errors. Corrected patch included.

🇦🇹Austria JordiK

If you are really interested in providing a patch and changing the README.txt to README.md (as you do in so many contrib modules), then please make an effort to update the most recent README.txt and also follow the Drupal guidelines on README.md templates.
Just renaming the file to .md and adding a couple of headings is not sufficient.

🇦🇹Austria JordiK

Checked the patch #2 - it works as expected. Did some coding standards changes, here is a new patch, wich will be committed.
Thank you @thedut, nice work!

Production build 0.69.0 2024