Turkey
Account created on 26 February 2021, over 3 years ago
#

Merge Requests

More

Recent comments

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@joristhedrupalist created one from yours but unfortunately it did not fix the conflict so, i pushed correct one.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

emircan erkul β†’ made their first commit to this issue’s fork.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Can't we get some from ConfigEntityStorage::MAX_ID_LENGTH and use for machine names? 32+16=48 would be sweet spot IMO and ConfigEntityStorage::MAX_ID_LENGTH become 166-16=150

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

emircan erkul β†’ made their first commit to this issue’s fork.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

#103 Fixing/suppressing

unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.PHPCS(DrupalPractice.FunctionCalls.InsecureUnserialize.InsecureUnserialize)

Notice: unserialize(): Error at offset 0 of 207 bytes in Drupal\metatag\Plugin\Field\FieldWidget\MetatagAsync->extractFormValues() (line 209 of modules/contrib/metatag/src/Plugin/Field/FieldWidget/MetatagAsync.php).
Drupal\metatag\Plugin\Field\FieldWidget\MetatagAsync->extractFormValues(Object, Array, Object) (Line: 237)

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Sorry path was a bit wrong here is correct one

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

In my case, $.fn.once was not ready when script initialized which causes all headache.

Attached file solved my issue. Yes i should find the root cause but couldn't. Probably order of the loading those libraries causes but effected areas was huge to handle in my case. Anyway it's just temporary, we soon upgrade to D10.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Emircan Erkul β†’ made their first commit to this issue’s fork.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Emircan Erkul β†’ made their first commit to this issue’s fork.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

My PR includes secure attribute options for both. We can not make httpOnly true because eu_cookie_compliance uses those cookies via JS.

If the HttpOnly flag (optional) is included in the HTTP response header, the cookie cannot be accessed through client side script (https://owasp.org/www-community/HttpOnly)

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@vasike included as MR from 2.0.x. I only included valueForm function's return type because this one only causing the problem.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Find out one of our custom modules causing this problem. Tracing that one was extremely difficult maybe impossible, found by checking and disabling things manually.

- $build['#cache']['contexts'][] = ['url', 'user'];
- $build['#cache']['tags'][] = ['user:' . $current_uid, 'group_content_list'];
+ $build['#cache']['contexts'] = array_merge($build['#cache']['contexts'], ['url', 'user']);
+ $build['#cache']['tags'] = array_merge($build['#cache']['tags'], ['user:' . $current_uid, 'group_content_list']);

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Hi Rajab, Thanks for the review. Applied your suggestions and created MR.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@jive01 no it will not due to jquery once. I'm attaching changes in PR as diff.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Looks like it will take some time. Until then here is the patch;

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Attaching branch changes as a diff file.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

#5 https://www.drupal.org/project/varbase_total_control/issues/3259139#comm... πŸ› Dashboard stopped working Active proposed solution solves the problem.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Update: might not be related, after removing settings.local.php this error disappears. In my environment, there are problems with NullBackendFactory

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@eaajithe Shouldn't be there any entity update hook for existing entries?

I was trying to update entities and got an error

The SQL storage cannot change the schema for an existing field (logpath in events_logging entity) with data.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

I just need that temporarily to be removed from our system flawlessly. But requiring that forces egulias/email-validator package to use 3.0.x instead of 4.0.x by

composer why egulias/email-validator
swiftmailer/swiftmailer  v6.3.0       requires   egulias/email-validator (^2.0|^3.1)

I'm using https://git.drupalcode.org/issue/swiftmailer-3359916/-/commits/3359916-d...

I think there is no easy way to enforce egulias/email-validator 4.0

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Reviewed popup_onload_statistics sub-module needs refactoring. For the main module, I did.

Here is drupal-check result.

16/16 [β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“] 100%

 ------ --------------------------------------------------------------------- 
  Line   modules/popup_onload_statistics/popup_onload_statistics.admin.inc    
 ------ --------------------------------------------------------------------- 
  14     Function drupal_get_query_parameters not found.                      
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  53     Function theme not found.                                            
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
 ------ --------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   modules/popup_onload_statistics/popup_onload_statistics.module       
 ------ --------------------------------------------------------------------- 
  49     Function drupal_add_js not found.                                    
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  62     Constant MENU_CALLBACK not found.                                    
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  71     Constant MENU_NORMAL_ITEM not found.                                 
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  81     Function drupal_get_query_parameters not found.                      
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  92     Function drupal_write_record not found.                              
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  94     Function drupal_json_output not found.                               
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
 ------ --------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------- 
  Line   modules/popup_onload_statistics/popup_onload_statistics.theme.inc    
 ------ --------------------------------------------------------------------- 
  35     Function l not found.                                                
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
  42     Function theme not found.                                            
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
 ------ --------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------- 
  Line   popup_onload.module      [FIXED]                                                  
 ------ --------------------------------------------------------------------------- 
  98     Access to constant ROUTE_OBJECT on an unknown class RouteObjectInterface.  
         πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols        
 ------ --------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------------ 
  Line   src/Form/PopupOnLoadForm.php   [FIXED]                                                                                   
 ------ ------------------------------------------------------------------------------------------------------------ 
  76     Method Drupal\popup_onload\Form\PopupOnLoadForm::save() should return int but return statement is missing.  
 ------ ------------------------------------------------------------------------------------------------------------ 

 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/PopupOnLoadHtmlRouteProvider.php   [FIXED]                                                                                                                              
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  46     Method Drupal\popup_onload\PopupOnLoadHtmlRouteProvider::getCollectionRoute() should return Symfony\Component\Routing\Route|null but return statement is missing.    
  71     Method Drupal\popup_onload\PopupOnLoadHtmlRouteProvider::getSettingsFormRoute() should return Symfony\Component\Routing\Route|null but return statement is missing.  
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

 [ERROR] Found 14 errors
πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

emircanerkul β†’ made their first commit to this issue’s fork.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

emircanerkul β†’ made their first commit to this issue’s fork.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Workaround prevents redirectToEntityEditForm function from running.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Tested, the error no longer appears but the page redirected to /delete route.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Thank you @Joe Huggans,

I solved mine. My problem was more like an unsynced database issue. Even core.extension says the module is installed it looks like installed but not its dependencies. Uninstalling and installing this module solved. Of course when u try to uninstall it gives same error. Just need to disable services manually (removing drush.services.yml and the command file in /Drush/Commands folder (which automatically loaded))

Using Drush 12, Core 10.2.1, path_redirect_import dev branch, migrate tool with https://www.drupal.org/files/issues/2023-11-23/3403792-2.patch β†’

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

I do not have a downgrade drush 12->11 option due to Drupal >10.2.0 forces me to use Drush 12.

I'm using https://www.drupal.org/files/issues/2023-11-23/3403792-2.patch β†’ migrate_tools patch and path_redirect_import dev version, checked everything and the paths look correct but couldn't find any reason why I still getting the same error.

```
Error: Class "Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands" not found in include() (line 30 of /app/docroot/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php).
```

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@Joe Huggans did u find anything?

I'm also facing the same issue. I use path_redirect_import dev and migrate tool with Drush 12's required folder path patch ( https://www.drupal.org/files/issues/2023-11-23/3403792-2.patch β†’ ).

But I'm still stuck and still getting `Error: Class "Drupal\migrate_tools\Drush\Commands\MigrateToolsCommands" not found in include() (line 30 of /app/docroot/modules/contrib/path_redirect_import/src/Drush/Commands/PathRedirectImportCommands.php).`

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

Thank you, Damien, yes mine conflicts with the SF module too.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@jsacksick

I can't install dev commerce.

https://git.drupalcode.org/project/commerce/-/blob/8.x-2.x/composer.json...

It looks like the composer hasn't updated. Address dependency should have a beta tag as like patch.

>> composer require 'drupal/commerce:2.x-dev@dev' -W

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/commerce[dev-2.x, 2.x-dev] require drupal/address ^2.0 -> found drupal/address[dev-2.x, dev-2.0.x, 2.0.0-beta1, ..., 2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - drupal/commerce 2.x-dev is an alias of drupal/commerce dev-2.x and thus requires it to be installed too.
    - Root composer.json requires drupal/commerce 2.x-dev@dev -> satisfiable by drupal/commerce[2.x-dev (alias of dev-2.x)].
πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

And if you need more complex condition

$query = new SelectQuery('MyObj__c');
$query->conditions[] = ["Foo = 'bar' OR (zee = 'bang' and foobar > 1)"]

https://www.drupal.org/project/salesforce/issues/2879844#comment-12094587 β†’

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

After I disable `Responsive image 1px placeholder` option, i able to get fallback img with style

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@gausarts I'm facing the same issue.

Using drupal/blazy 2.22.0 and core 9.5.11 with responsive_image

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

I agree, it needs some refactoring to prevent hardcoding lock ID in multiple places.

Yes, it definitely affects performance but this is the Drupal way of locking. IDK maybe we need to switch commerce's locking system to that.

Regarding negating, yes you're right [done]. But the naming is weird, Instead of lockMayBeAvailable, I would prefer isLockable.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@jsacksick

In the comment, the dev pointed out that he assumes. We just need to call getCartIds without needing to load it.

// Getting the cart data and validating the cart IDs received from the
// session requires loading the entities. This is a performance hit, but
// it's assumed that these entities would be loaded at one point anyway.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

@jsacksick, sorry my bad. I thought the title would be enough to describe the problem. Details are updated.

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

At least, Why @jsacksick

I checked Pipelines, it says `few arguments to function Drupal\commerce_order\OrderRefresh::__construct(), 4 passed` But actually i already but the 5th one and its there. There should some cache etc in the pipeline isn't it?

πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey
<?php

namespace Drupal\xxx\EventSubscriber;

use Drupal\commerce_cart\CartManagerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Drupal\commerce_cart\Event\CartEvents;
use Drupal\commerce_cart\Event\CartOrderItemAddEvent;

class CartLimiterEventSubscriber implements EventSubscriberInterface {

  /**
   * The cart manager.
   *
   * @var \Drupal\commerce_cart\CartManagerInterface
   */
  protected $cartManager;

  /**
   * Constructs an CartLimiterEventSubscriber object.
   *
   * @param \Drupal\commerce_cart\CartManagerInterface $cart_manager
   *   The cart manager.
   */
  public function __construct(CartManagerInterface $cart_manager) {
    $this->cartManager = $cart_manager;
  }

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    $events = [CartEvents::CART_ORDER_ITEM_ADD => ['onCartItemAdd', 100]];
    return $events;
  }

  public function onCartItemAdd(CartOrderItemAddEvent $event) {
    $order_item = $event->getOrderItem();
    $cart = $event->getCart();

    // Remove all other items
    $items = $cart->getItems();
    if (count($items) > 1) {
      foreach ($items as $item) {
        if ($item->id() != $order_item->id()) {
          $this->cartManager->removeOrderItem($cart, $item);
        }
      }
    }
  }

}
services:
  xxx.cart_limiter_event_subscriber:
    class: Drupal\xxx\EventSubscriber\CartLimiterEventSubscriber
    arguments: ['@commerce_cart.cart_manager']
    tags:
      - { name: event_subscriber }
πŸ‡ΉπŸ‡·Turkey emircan erkul Turkey

BTW, I hate whole d7 answers (All should be destroyed). It is just a waste of time and probably misleads the AI-generated answers too.

https://www.drupal.org/forum/support/module-development-and-code-questio... β†’ Here more a clearer and fresh answer.

Production build 0.71.5 2024