Hungary
Account created on 25 August 2009, over 16 years ago
#

Merge Requests

Recent comments

🇭🇺Hungary denes.szabo Hungary

Sry, the status…

🇭🇺Hungary denes.szabo Hungary

I can confirm this patch solves the form display problem. Tested and working as expected.

🇭🇺Hungary denes.szabo Hungary

The patch is working fine, solves the problem. Thank you!

🇭🇺Hungary denes.szabo Hungary

MR Updated - Refactored isContentForm() Method

I've completed a refactor of the isContentForm() method to improve separation of concerns and code clarity. The method was previously handling two distinct responsibilities (form environment and non-form contexts), which has now been properly separated.
Changes implemented:

* isContentForm() - Now exclusively handles form validation and determines whether a form qualifies as a content form. Restored support for ignoring specific forms via a configurable exclusion list that can be modified through hooks.
* isContentFormPage() - New method that specifically handles Gin's form layout customization logic based on routes (extracted from the original method).
* Code improvements - Restructured the codebase into smaller, more focused methods with single responsibilities for better maintainability and readability.

This refactor improves code organization while maintaining backward compatibility with the form exclusion feature.

🇭🇺Hungary denes.szabo Hungary

@dyvyat I am using the latest D11 and the updated module versions:

- drupal/gin: 5.0.3
- drupal/gin_toolbar: 3.0.2
- drupal/core: 11.2.4
- drupal/masquerade: 2.0.0

🇭🇺Hungary denes.szabo Hungary

denes.szabo created an issue.

🇭🇺Hungary denes.szabo Hungary

denes.szabo changed the visibility of the branch manage_display-3542479 to active.

🇭🇺Hungary denes.szabo Hungary

denes.szabo changed the visibility of the branch 3.x to hidden.

🇭🇺Hungary denes.szabo Hungary

denes.szabo changed the visibility of the branch manage_display-3542479 to hidden.

🇭🇺Hungary denes.szabo Hungary

denes.szabo changed the visibility of the branch 3542479-handling-the-content to active.

🇭🇺Hungary denes.szabo Hungary

denes.szabo changed the visibility of the branch 3542479-handling-the-content to hidden.

🇭🇺Hungary denes.szabo Hungary

I tested the latest fix and I can confirm the MR#40 fixed all issues with PHP 8.4.

🇭🇺Hungary denes.szabo Hungary

I have a website with domain module and ~5 translations on the site.

I can reproduce this exception when I make an sql backup with drush (with a bash alias, like: cd ~/website/; vendor/bin/drush cr; vendor/bin/drush sql-dump --gzip >filename.gz).

Then, I get this error in the php error log when I try to access a translated node on the site.

To fix it, I have to clear the cache, then the site and the node above are accessible again.

🇭🇺Hungary denes.szabo Hungary

I fixed another deprecation issue in the a0a7abef5d341f4f7b12f3b38e2f3cf69b750652 commit:

I added a price field type definition yml and the PriceItem and PriceModifiedItem use it as the category attribute.

🇭🇺Hungary denes.szabo Hungary

Remaining Drupal coding standard issues.


FILE: price/src/NumberFormatterFactoryInterface.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
 8 | ERROR | The text '@deprecated Replaced by CurrencyFormatterInterface.' does not match the standard format: @deprecated in %deprecation-version% and is removed
   |       | from %removal-version%. %extra-info%. (Drupal.Commenting.Deprecated.IncorrectTextLayout)
 8 | ERROR | Each @deprecated tag must have a @see tag immediately following it (Drupal.Commenting.Deprecated.DeprecatedMissingSeeTag)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: price/src/NumberFormatterFactory.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  7 | ERROR | The trigger_error message 'The  __NAMESPACE__ \NumberFormatterFactory is deprecated. Instead, use \Drupal\price\CurrencyFormatter. See
    |       | http://drupal.org/node/the-change-notice-nid.' does not match the strict standard format: %thing% is deprecated in %deprecation-version% and is removed
    |       | from %removal-version%. %extra-info%. See %cr-link% (Drupal.Semantics.FunctionTriggerError.TriggerErrorTextLayoutStrict)
 12 | ERROR | The text '@deprecated Use \Drupal\price\CurrencyFormatter instead.' does not match the standard format: @deprecated in %deprecation-version% and is
    |       | removed from %removal-version%. %extra-info%. (Drupal.Commenting.Deprecated.IncorrectTextLayout)
 12 | ERROR | Each @deprecated tag must have a @see tag immediately following it (Drupal.Commenting.Deprecated.DeprecatedMissingSeeTag)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: price/src/Event/PriceEvents.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
 13 | ERROR   | The text '@deprecated No longer fired. Subscribe to NUMBER_FORMAT instead.' does not match the standard format: @deprecated in %deprecation-version%
    |         | and is removed from %removal-version%. %extra-info%. (Drupal.Commenting.Deprecated.IncorrectTextLayout)
 17 | WARNING | The @see url '\Drupal\price\Event\NumberFormatEvent' does not match the standard: http(s)://www.drupal.org/node/n or
    |         | http(s)://www.drupal.org/project/aaa/issues/n (Drupal.Commenting.Deprecated.DeprecatedWrongSeeUrlFormat)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: price/src/Event/NumberFormatEvent.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
 10 | ERROR   | The text '@deprecated No longer fired, switch to NumberFormatDefinitionEvent.' does not match the standard format: @deprecated in
    |         | %deprecation-version% and is removed from %removal-version%. %extra-info%. (Drupal.Commenting.Deprecated.IncorrectTextLayout)
 12 | WARNING | The @see url '\Drupal\price\Event\PriceEvents' does not match the standard: http(s)://www.drupal.org/node/n or
    |         | http(s)://www.drupal.org/project/aaa/issues/n (Drupal.Commenting.Deprecated.DeprecatedWrongSeeUrlFormat)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

🇭🇺Hungary denes.szabo Hungary

denes.szabo made their first commit to this issue’s fork.

🇭🇺Hungary denes.szabo Hungary

The problem is: the trash module provides operation links for entities to restore or purge the entity from trash.

But, before you need to configure the module to allow the trash functionality to the entity type. If the trash already enabled to the entity type, then the purge and restore link templates will be added to the entity.

So, the fix is simple: if an entity has no link template for these actions, then do not provide them.

I have similar problem: on a fresh Drupal CMS install I am not able to access the dashboard or people list page, I got this error.

The website encountered an unexpected error. Try again later.

Drupal\Core\Entity\Exception\UndefinedLinkTemplateException: No link template 'restore' found for the 'dashboard' entity type in Drupal\Core\Entity\EntityBase->toUrl() (line 211 of core/lib/Drupal/Core/Entity/EntityBase.php).
Drupal\Core\Config\Entity\ConfigEntityBase->toUrl() (Line: 160)
Drupal\dashboard\Entity\Dashboard->toUrl() (Line: 393)
trash_entity_operation()
call_user_func_array() (Line: 355)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}() (Line: 307)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 354)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 133)
Drupal\Core\Entity\EntityListBuilder->getOperations() (Line: 242)
Drupal\Core\Entity\EntityListBuilder->buildOperations() (Line: 224)
Drupal\Core\Entity\EntityListBuilder->buildRow() (Line: 108)
Drupal\Core\Config\Entity\DraggableListBuilder->buildRow() (Line: 40)
Drupal\dashboard\DashboardListBuilder->buildRow() (Line: 163)
Drupal\Core\Config\Entity\DraggableListBuilder->buildForm()
call_user_func_array() (Line: 528)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 97)
Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm() (Line: 219)
Drupal\Core\Form\FormBuilder->getForm() (Line: 121)
Drupal\Core\Config\Entity\DraggableListBuilder->render() (Line: 23)
Drupal\Core\Entity\Controller\EntityListController->listing()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

I have the fix, I am trying to create a merge request…

🇭🇺Hungary denes.szabo Hungary

I got the same error with the latest 3.1.0 version.

I fixed it, attached the fix.

🇭🇺Hungary denes.szabo Hungary

I can confirm, this fix solved my problem on my site.

🇭🇺Hungary denes.szabo Hungary

Re-rolled the patch against the latest dev 2.0.x.

🇭🇺Hungary denes.szabo Hungary

@RobLoach thank you, merged!

🇭🇺Hungary denes.szabo Hungary

Thank you guys, nice improvement! Merged.

🇭🇺Hungary denes.szabo Hungary

Changed the version to 8.x-2.x.

🇭🇺Hungary denes.szabo Hungary

I added the hook_field_views_data() hook implementation from the views which handles the entity_reference field.

In my project it seems ok.

🇭🇺Hungary denes.szabo Hungary

Denes.Szabo made their first commit to this issue’s fork.

🇭🇺Hungary denes.szabo Hungary

Thank you guys, but the 2.0.x is the active dev branch. Meaningless to work on an outdated code.

🇭🇺Hungary denes.szabo Hungary

@Matroskeen

I mean: The rabbit_hole already installed but not configured - the config is empty, the rabbit hole settings form was not submitted - or there was no entity type checked.

I do not know why sb want this situation, enable the rb, but does not configure it properly, but on my (inherited) site this is the status.

Whatever: if this config should used in array environment, then it should be an array.

The empty value default set to array case was already there (I mentioned it before) I just added the default array value to all similar code.

🇭🇺Hungary denes.szabo Hungary

I got this error also, fresh 10.2.3.

The problem is: The code suppose the $entity_types is array. It is not if you have not setup the module, its NULL.

Then the array_map tries to use it as an array.

 $entity_types = \Drupal::config('rabbit_hole.settings')->get('enabled_entity_types') ?? [];
  $affected_bundle_types = array_map(function($entity_type_id) use ($entity_type_manager) {
    return $entity_type_manager->getStorage($entity_type_id)->getEntityType()->getBundleEntityType();
  }, $entity_types);

Quick solution is: $entity_types = \Drupal::config('rabbit_hole.settings')->get('enabled_entity_types') ?? [];

Same error exists in the src/BehaviorSettingsManager. But there it has been handled similar way alreay in the line 41.

Patch to fix these issues is attached.

🇭🇺Hungary denes.szabo Hungary

I have no idea, we have a problem here and it can be solved by a Json:encode.

Can you specify how I can reproduce this error?

🇭🇺Hungary denes.szabo Hungary

I can confirm, after apply sidharth_soman's patch the module seems was better according to the coding standard.

I fixed just one small word in it:

// Chenge view mode according to their role. -> // Change view mode according to their role.

Attached.

🇭🇺Hungary denes.szabo Hungary

@DuaelFr Thanks form your contribution!

🇭🇺Hungary denes.szabo Hungary

Denes.Szabo made their first commit to this issue’s fork.

🇭🇺Hungary denes.szabo Hungary

Thank you for your contribution, the 2.0.2 just released.

🇭🇺Hungary denes.szabo Hungary

Thank you for your contribution, the 2.0.2 just released.

🇭🇺Hungary denes.szabo Hungary

Thank you for your contribution, the 2.0.2 just released.

🇭🇺Hungary denes.szabo Hungary

Thank you guys and sorry for the delay…

Production build 0.71.5 2024