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

Merge Requests

More

Recent comments

πŸ‡ΉπŸ‡·Turkey emircanerkul 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 emircanerkul 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 emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

Attaching branch changes as a diff file.

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul 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 emircanerkul 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 emircanerkul 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 emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

Workaround prevents redirectToEntityEditForm function from running.

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul 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 emircanerkul 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 emircanerkul 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 emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul 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 emircanerkul 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 emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

@gausarts I'm facing the same issue.

Using drupal/blazy 2.22.0 and core 9.5.11 with responsive_image

πŸ‡ΉπŸ‡·Turkey emircanerkul 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 emircanerkul 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 emircanerkul Turkey

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

πŸ‡ΉπŸ‡·Turkey emircanerkul 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 emircanerkul 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 emircanerkul 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.

πŸ‡ΉπŸ‡·Turkey emircanerkul Turkey

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

Production build 0.69.0 2024